diff --git a/.github/workflows/debian-package.yaml b/.github/workflows/debian-package.yaml index f2f7d37c7b..787b01d42e 100644 --- a/.github/workflows/debian-package.yaml +++ b/.github/workflows/debian-package.yaml @@ -19,7 +19,7 @@ jobs: timeout-minutes: 5 steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Install system packaging tools env: @@ -133,7 +133,7 @@ jobs: contents: write # Required to upload assets to a release steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Get version and validate release id: get_version diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index bff3a1119b..0da91b5a73 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -2,7 +2,7 @@ name: "Release Automation" on: - pull_request: + pull_request_target: types: [closed] branches: - master @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Extract Version from PR Title env: diff --git a/.github/workflows/rpm-package.yaml b/.github/workflows/rpm-package.yaml index ab47e8b3ad..12a3ae1544 100644 --- a/.github/workflows/rpm-package.yaml +++ b/.github/workflows/rpm-package.yaml @@ -21,7 +21,7 @@ jobs: options: --user root steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Install build tools run: | @@ -116,7 +116,7 @@ jobs: contents: write steps: - - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 + - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - name: Get version and validate release id: get_version diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index fa9c24248f..40458ab0da 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,42 +1,3683 @@ -# API Changelog 2.26 vs. 2.27 +# API Changelog 2.56 + +## DELETE /active-directory +- endpoint added + ## GET /active-directory -- added the optional property 'items/ca_certificate' to the response with the '200' status -- added the optional property 'items/ca_certificate_group' to the response with the '200' status +- endpoint added ## PATCH /active-directory -- added the new optional request property 'ca_certificate' -- added the new optional request property 'ca_certificate_group' -- added the optional property 'items/ca_certificate' to the response with the '200' status -- added the optional property 'items/ca_certificate_group' to the response with the '200' status +- endpoint added ## POST /active-directory -- added the new optional request property 'ca_certificate' -- added the new optional request property 'ca_certificate_group' -- added the optional property 'items/ca_certificate' to the response with the '200' status -- added the optional property 'items/ca_certificate_group' to the response with the '200' status +- endpoint added + + +## GET /active-directory/test +- endpoint added -## PATCH /active-directory/test +## DELETE /admins - endpoint added -## POST /fleets/members/batch +## GET /admins - endpoint added -## PATCH /nodes -- added the new optional request property 'node_key' +## PATCH /admins +- endpoint added -## POST /nodes/batch -- added the new optional request property '/node_key' +## POST /admins +- endpoint added -## GET /storage-classes/members +## DELETE /admins/api-tokens +- endpoint added + + +## GET /admins/api-tokens +- endpoint added + + +## POST /admins/api-tokens +- endpoint added + + +## DELETE /admins/cache +- endpoint added + + +## GET /admins/cache +- endpoint added + + +## PUT /admins/cache +- endpoint added + + +## GET /admins/internal +- :warning: api path removed without deprecation + + +## PATCH /admins/internal +- :warning: api path removed without deprecation + + +## POST /admins/internal +- :warning: api path removed without deprecation + + +## POST /admins/internal/api-tokens +- :warning: api path removed without deprecation + + +## GET /admins/internal/auth-methods +- :warning: api path removed without deprecation + + +## PATCH /admins/internal/failed_login_attempts +- :warning: api path removed without deprecation + + +## GET /admins/internal/roles/operations +- :warning: api path removed without deprecation + + +## GET /admins/internal/settings +- :warning: api path removed without deprecation + + +## PATCH /admins/internal/settings +- :warning: api path removed without deprecation + + +## GET /admins/internal/sso-config +- :warning: api path removed without deprecation + + +## PATCH /admins/internal/sso-config +- :warning: api path removed without deprecation + + +## DELETE /admins/policies/management-access +- endpoint added + + +## GET /admins/policies/management-access +- endpoint added + + +## POST /admins/policies/management-access +- endpoint added + + +## GET /admins/settings +- endpoint added + + +## PATCH /admins/settings +- endpoint added + + +## DELETE /alert-watchers +- endpoint added + + +## GET /alert-watchers +- endpoint added + + +## PATCH /alert-watchers +- endpoint added + + +## POST /alert-watchers +- endpoint added + + +## GET /alert-watchers/test +- endpoint added + + +## GET /alerts +- endpoint added + + +## PATCH /alerts +- endpoint added + + +## GET /alerts/events +- endpoint added + + +## GET /alerts/internal +- :warning: api path removed without deprecation + + +## DELETE /alerts/rules +- endpoint added + + +## GET /alerts/rules +- endpoint added + + +## PATCH /alerts/rules +- endpoint added + + +## POST /alerts/rules +- endpoint added + + +## GET /alerts/rules/catalog +- endpoint added + + +## GET /apartments/internal +- :warning: api path removed without deprecation + + +## DELETE /api-clients +- endpoint added + + +## GET /api-clients +- endpoint added + + +## PATCH /api-clients +- endpoint added + + +## POST /api-clients +- endpoint added + + +## DELETE /api-clients/internal +- :warning: api path removed without deprecation + + +## GET /api-clients/internal +- :warning: api path removed without deprecation + + +## PATCH /api-clients/internal +- :warning: api path removed without deprecation + + +## POST /api-clients/internal +- :warning: api path removed without deprecation + + +## GET /api/api_version +- endpoint added + + +## GET /apps +- endpoint added + + +## PATCH /apps +- endpoint added + + +## GET /apps/nodes +- endpoint added + + +## DELETE /array-connections +- endpoint added + + +## GET /array-connections +- endpoint added + + +## PATCH /array-connections +- endpoint added + + +## POST /array-connections +- endpoint added + + +## GET /array-connections/connection-key +- endpoint added + + +## POST /array-connections/internal/decode-connection-key +- :warning: api path removed without deprecation + + +## GET /array-connections/path +- endpoint added + + +## DELETE /arrays +- endpoint added + + +## GET /arrays +- endpoint added + + +## PATCH /arrays +- endpoint added + + +## GET /arrays/cache +- endpoint added + + +## GET /arrays/cloud-capacity +- endpoint added + + +## PATCH /arrays/cloud-capacity +- endpoint added + + +## GET /arrays/cloud-capacity/supported-steps +- endpoint added + + +## GET /arrays/cloud-config +- endpoint added + + +## PATCH /arrays/cloud-config +- endpoint added + + +## GET /arrays/cloud-config/supported-configs +- endpoint added + + +## DELETE /arrays/cloud-provider-tags - endpoint added +## GET /arrays/cloud-provider-tags +- endpoint added + + +## PUT /arrays/cloud-provider-tags/batch +- endpoint added + + +## DELETE /arrays/erasures +- endpoint added + + +## GET /arrays/erasures +- endpoint added + + +## PATCH /arrays/erasures +- endpoint added + + +## POST /arrays/erasures +- endpoint added + + +## GET /arrays/eula +- endpoint added + + +## PATCH /arrays/eula +- endpoint added + + +## DELETE /arrays/factory-reset-token +- endpoint added + + +## GET /arrays/factory-reset-token +- endpoint added + + +## POST /arrays/factory-reset-token +- endpoint added + + +## DELETE /arrays/internal +- :warning: api path removed without deprecation + + +## GET /arrays/internal +- :warning: api path removed without deprecation + + +## GET /arrays/internal/array-mode +- :warning: api path removed without deprecation + + +## GET /arrays/internal/capabilities +- :warning: api path removed without deprecation + + +## POST /arrays/internal/connectto +- :warning: api path removed without deprecation + + +## DELETE /arrays/internal/disconnectfrom +- :warning: api path removed without deprecation + + +## GET /arrays/internal/erasures +- :warning: api path removed without deprecation + + +## PATCH /arrays/internal/erasures +- :warning: api path removed without deprecation + + +## DELETE /arrays/internal/factory-reset-token +- :warning: api path removed without deprecation + + +## GET /arrays/internal/free-trial-expiration-time +- :warning: api path removed without deprecation + + +## GET /arrays/internal/phonehome-test +- :warning: api path removed without deprecation + + +## GET /arrays/internal/space +- :warning: api path removed without deprecation + + +## GET /arrays/internal/storage-classes +- :warning: api path removed without deprecation + + +## GET /arrays/internal/time +- :warning: api path removed without deprecation + + +## GET /arrays/internal/unified-object-versions +- :warning: api path removed without deprecation + + +## GET /arrays/internal/unsupported-features +- :warning: api path removed without deprecation + + +## GET /arrays/internal/versions +- :warning: api path removed without deprecation + + +## GET /arrays/ntp-test +- endpoint added + + +## GET /arrays/performance +- endpoint added + + +## GET /arrays/performance/by-link +- endpoint added + + +## GET /arrays/space +- endpoint added + + +## DELETE /arrays/tags +- endpoint added + + +## GET /arrays/tags +- endpoint added + + +## PUT /arrays/tags/batch +- endpoint added + + +## GET /audits +- endpoint added + + +## DELETE /billing/krypton/internal +- :warning: api path removed without deprecation + + +## GET /billing/krypton/internal +- :warning: api path removed without deprecation + + +## PATCH /billing/krypton/internal +- :warning: api path removed without deprecation + + +## POST /billing/krypton/internal +- :warning: api path removed without deprecation + + +## GET /billing/krypton/payloads/internal +- :warning: api path removed without deprecation + + +## DELETE /buckets +- endpoint added + + +## GET /buckets +- endpoint added + + +## PATCH /buckets +- endpoint added + + +## POST /buckets +- endpoint added + + +## GET /buckets/performance +- endpoint added + + +## GET /buckets/space +- endpoint added + + +## DELETE /certificate-groups +- endpoint added + + +## GET /certificate-groups +- endpoint added + + +## POST /certificate-groups +- endpoint added + + +## DELETE /certificate-groups/certificates +- endpoint added + + +## GET /certificate-groups/certificates +- endpoint added + + +## POST /certificate-groups/certificates +- endpoint added + + +## GET /certificate-groups/uses +- endpoint added + + +## DELETE /certificates +- endpoint added + + +## GET /certificates +- endpoint added + + +## PATCH /certificates +- endpoint added + + +## POST /certificates +- endpoint added + + +## DELETE /certificates/certificate-groups +- endpoint added + + +## GET /certificates/certificate-groups +- endpoint added + + +## POST /certificates/certificate-groups +- endpoint added + + +## POST /certificates/certificate-signing-requests +- endpoint added + + +## GET /certificates/internal +- :warning: api path removed without deprecation + + +## GET /certificates/uses +- endpoint added + + +## DELETE /connections +- endpoint added + + +## GET /connections +- endpoint added + + +## POST /connections +- endpoint added + + +## DELETE /connections/internal +- :warning: api path removed without deprecation + + +## GET /connections/internal +- :warning: api path removed without deprecation + + +## PATCH /connections/internal +- :warning: api path removed without deprecation + + +## POST /connections/internal +- :warning: api path removed without deprecation + + +## GET /connections/internal/port-connections +- :warning: api path removed without deprecation + + +## GET /container-default-protections +- endpoint added + + +## PATCH /container-default-protections +- endpoint added + + +## GET /controllers +- endpoint added + + +## GET /controllers/internal +- :warning: api path removed without deprecation + + +## GET /data-sealing-keys +- endpoint added + + +## PATCH /data-sealing-keys +- endpoint added + + +## POST /data-sealing-keys +- endpoint added + + +## POST /data-sealing-keys/rotate +- endpoint added + + +## GET /data-sealing-keys/test +- endpoint added + + +## DELETE /directories +- endpoint added + + +## GET /directories +- endpoint added + + +## PATCH /directories +- endpoint added + + +## POST /directories +- endpoint added + + +## GET /directories/groups +- endpoint added + + +## GET /directories/internal/performance +- :warning: api path removed without deprecation + + +## GET /directories/internal/qos +- :warning: api path removed without deprecation + + +## GET /directories/internal/quota +- :warning: api path removed without deprecation + + +## GET /directories/internal/quota/usage +- :warning: api path removed without deprecation + + +## GET /directories/internal/space +- :warning: api path removed without deprecation + + +## POST /directories/locks/nlm-reclamations +- endpoint added + + +## GET /directories/performance +- endpoint added + + +## GET /directories/performance/by-array +- endpoint added + + +## GET /directories/policies +- endpoint added + + +## DELETE /directories/policies/audit-file +- endpoint added + + +## GET /directories/policies/audit-file +- endpoint added + + +## POST /directories/policies/audit-file +- endpoint added + + +## DELETE /directories/policies/autodir +- endpoint added + + +## GET /directories/policies/autodir +- endpoint added + + +## POST /directories/policies/autodir +- endpoint added + + +## DELETE /directories/policies/nfs +- endpoint added + + +## GET /directories/policies/nfs +- endpoint added + + +## POST /directories/policies/nfs +- endpoint added + + +## DELETE /directories/policies/qos +- endpoint added + + +## GET /directories/policies/qos +- endpoint added + + +## POST /directories/policies/qos +- endpoint added + + +## DELETE /directories/policies/quota +- endpoint added + + +## GET /directories/policies/quota +- endpoint added + + +## POST /directories/policies/quota +- endpoint added + + +## DELETE /directories/policies/smb +- endpoint added + + +## GET /directories/policies/smb +- endpoint added + + +## POST /directories/policies/smb +- endpoint added + + +## DELETE /directories/policies/snapshot +- endpoint added + + +## GET /directories/policies/snapshot +- endpoint added + + +## POST /directories/policies/snapshot +- endpoint added + + +## DELETE /directories/policies/user-group-quota +- endpoint added + + +## GET /directories/policies/user-group-quota +- endpoint added + + +## POST /directories/policies/user-group-quota +- endpoint added + + +## GET /directories/qos +- endpoint added + + +## GET /directories/space +- endpoint added + + +## GET /directories/users +- endpoint added + + +## DELETE /directory-exports +- endpoint added + + +## GET /directory-exports +- endpoint added + + +## PATCH /directory-exports +- endpoint added + + +## POST /directory-exports +- endpoint added + + +## GET /directory-group-quotas +- endpoint added + + +## GET /directory-group-quotas/internal +- :warning: api path removed without deprecation + + +## GET /directory-quotas +- endpoint added + + +## DELETE /directory-services +- endpoint added + + +## GET /directory-services +- endpoint added + + +## PATCH /directory-services +- endpoint added + + +## POST /directory-services +- endpoint added + + +## DELETE /directory-services/internal +- :warning: api path removed without deprecation + + +## PATCH /directory-services/internal +- :warning: api path removed without deprecation + + +## DELETE /directory-services/local/directory-services +- endpoint added + + +## GET /directory-services/local/directory-services +- endpoint added + + +## PATCH /directory-services/local/directory-services +- endpoint added + + +## POST /directory-services/local/directory-services +- endpoint added + + +## DELETE /directory-services/local/groups +- endpoint added + + +## GET /directory-services/local/groups +- endpoint added + + +## PATCH /directory-services/local/groups +- endpoint added + + +## POST /directory-services/local/groups +- endpoint added + + +## DELETE /directory-services/local/groups/members +- endpoint added + + +## GET /directory-services/local/groups/members +- endpoint added + + +## POST /directory-services/local/groups/members +- endpoint added + + +## DELETE /directory-services/local/users +- endpoint added + + +## GET /directory-services/local/users +- endpoint added + + +## PATCH /directory-services/local/users +- endpoint added + + +## POST /directory-services/local/users +- endpoint added + + +## DELETE /directory-services/local/users/members +- endpoint added + + +## GET /directory-services/local/users/members +- endpoint added + + +## POST /directory-services/local/users/members +- endpoint added + + +## DELETE /directory-services/roles +- endpoint added + + +## GET /directory-services/roles +- endpoint added + + +## PATCH /directory-services/roles +- endpoint added + + +## POST /directory-services/roles +- endpoint added + + +## DELETE /directory-services/roles/policies/management-access +- endpoint added + + +## GET /directory-services/roles/policies/management-access +- endpoint added + + +## POST /directory-services/roles/policies/management-access +- endpoint added + + +## GET /directory-services/test +- endpoint added + + +## PATCH /directory-services/test +- endpoint added + + +## DELETE /directory-snapshots +- endpoint added + + +## GET /directory-snapshots +- endpoint added + + +## PATCH /directory-snapshots +- endpoint added + + +## POST /directory-snapshots +- endpoint added + + +## GET /directory-snapshots/internal +- :warning: api path removed without deprecation + + +## GET /directory-user-quotas +- endpoint added + + +## GET /directory-user-quotas/internal +- :warning: api path removed without deprecation + + +## DELETE /dns +- endpoint added + + +## GET /dns +- endpoint added + + +## PATCH /dns +- endpoint added + + +## POST /dns +- endpoint added + + +## DELETE /dns/internal +- :warning: api path removed without deprecation + + +## GET /dns/internal +- :warning: api path removed without deprecation + + +## PATCH /dns/internal +- :warning: api path removed without deprecation + + +## POST /dns/internal +- :warning: api path removed without deprecation + + +## PATCH /download-files/internal +- :warning: api path removed without deprecation + + +## DELETE /download-jobs/internal +- :warning: api path removed without deprecation + + +## GET /download-jobs/internal +- :warning: api path removed without deprecation + + +## PATCH /download-jobs/internal +- :warning: api path removed without deprecation + + +## POST /download-jobs/internal +- :warning: api path removed without deprecation + + +## GET /drives +- endpoint added + + +## PATCH /drives +- endpoint added + + +## GET /drives/internal +- :warning: api path removed without deprecation + + +## PATCH /drives/internal +- :warning: api path removed without deprecation + + +## GET /drives/internal/capacity-limit +- :warning: api path removed without deprecation + + +## PATCH /drives/internal/capacity-limit +- :warning: api path removed without deprecation + + +## POST /drives/internal/capacity-limit +- :warning: api path removed without deprecation + + +## PATCH /drives/internal/erase +- :warning: api path removed without deprecation + + +## PATCH /drives/internal/evac +- :warning: api path removed without deprecation + + +## PATCH /drives/internal/placement +- :warning: api path removed without deprecation + + +## PATCH /drives/internal/powercontrol +- :warning: api path removed without deprecation + + +## GET /feature-flags/internal +- :warning: api path removed without deprecation + + +## POST /feature-flags/internal +- :warning: api path removed without deprecation + + +## GET /feature-flags/internal/test +- :warning: api path removed without deprecation + + +## GET /file-gateway/internal +- :warning: api path removed without deprecation + + +## POST /file-gateway/internal +- :warning: api path removed without deprecation + + +## GET /file-gateway/internal/file-systems +- :warning: api path removed without deprecation + + +## DELETE /file-systems +- endpoint added + + +## GET /file-systems +- endpoint added + + +## PATCH /file-systems +- endpoint added + + +## POST /file-systems +- endpoint added + + +## POST /files +- endpoint added + + +## DELETE /fleets +- endpoint added + + +## GET /fleets +- endpoint added + + +## PATCH /fleets +- endpoint added + + +## POST /fleets +- endpoint added + + +## GET /fleets/fleet-key +- endpoint added + + +## POST /fleets/fleet-key +- endpoint added + + +## GET /fleets/internal/members +- :warning: api path removed without deprecation + + +## PATCH /fleets/internal/reconnect +- :warning: api path removed without deprecation + + +## DELETE /fleets/members +- endpoint added + + +## GET /fleets/members +- endpoint added + + +## POST /fleets/members +- endpoint added + + +## GET /hardware +- endpoint added + + +## PATCH /hardware +- endpoint added + + +## GET /hardware/internal +- :warning: api path removed without deprecation + + +## PATCH /hardware/internal/control +- :warning: api path removed without deprecation + + +## GET /hardware/internal/scanners +- :warning: api path removed without deprecation + + +## PATCH /hardware/internal/scanners/control +- :warning: api path removed without deprecation + + +## DELETE /host-groups +- endpoint added + + +## GET /host-groups +- endpoint added + + +## PATCH /host-groups +- endpoint added + + +## POST /host-groups +- endpoint added + + +## DELETE /host-groups/hosts +- endpoint added + + +## GET /host-groups/hosts +- endpoint added + + +## POST /host-groups/hosts +- endpoint added + + +## GET /host-groups/internal +- :warning: api path removed without deprecation + + +## PATCH /host-groups/internal +- :warning: api path removed without deprecation + + +## POST /host-groups/internal +- :warning: api path removed without deprecation + + +## GET /host-groups/internal/connections +- :warning: api path removed without deprecation + + +## GET /host-groups/internal/objects +- :warning: api path removed without deprecation + + +## GET /host-groups/internal/performance +- :warning: api path removed without deprecation + + +## GET /host-groups/internal/performance/by-array +- :warning: api path removed without deprecation + + +## GET /host-groups/internal/protection-groups +- :warning: api path removed without deprecation + + +## GET /host-groups/internal/space +- :warning: api path removed without deprecation + + +## GET /host-groups/internal/{hgroupName}/connectable/hosts +- :warning: api path removed without deprecation + + +## GET /host-groups/internal/{hgroupName}/connectable/volumes +- :warning: api path removed without deprecation + + +## GET /host-groups/internal/{hgroupName}/connections +- :warning: api path removed without deprecation + + +## GET /host-groups/internal/{hgroupName}/unconnectable/hosts +- :warning: api path removed without deprecation + + +## GET /host-groups/performance +- endpoint added + + +## GET /host-groups/performance/by-array +- endpoint added + + +## DELETE /host-groups/protection-groups +- endpoint added + + +## GET /host-groups/protection-groups +- endpoint added + + +## POST /host-groups/protection-groups +- endpoint added + + +## GET /host-groups/qos +- endpoint added + + +## GET /host-groups/space +- endpoint added + + +## DELETE /host-groups/tags +- endpoint added + + +## GET /host-groups/tags +- endpoint added + + +## PUT /host-groups/tags/batch +- endpoint added + + +## DELETE /hosts +- endpoint added + + +## GET /hosts +- endpoint added + + +## PATCH /hosts +- endpoint added + + +## POST /hosts +- endpoint added + + +## DELETE /hosts/host-groups +- endpoint added + + +## GET /hosts/host-groups +- endpoint added + + +## POST /hosts/host-groups +- endpoint added + + +## GET /hosts/internal +- :warning: api path removed without deprecation + + +## POST /hosts/internal +- :warning: api path removed without deprecation + + +## GET /hosts/internal/initiators +- :warning: api path removed without deprecation + + +## GET /hosts/internal/performance +- :warning: api path removed without deprecation + + +## GET /hosts/internal/performance/balance +- :warning: api path removed without deprecation + + +## GET /hosts/internal/performance/by-array +- :warning: api path removed without deprecation + + +## GET /hosts/internal/port-connections +- :warning: api path removed without deprecation + + +## GET /hosts/internal/protection-groups +- :warning: api path removed without deprecation + + +## GET /hosts/internal/space +- :warning: api path removed without deprecation + + +## DELETE /hosts/internal/{host_name}/connections/volumes/{volume_name} +- :warning: api path removed without deprecation + + +## GET /hosts/internal/{name}/connectable/volumes +- :warning: api path removed without deprecation + + +## DELETE /hosts/internal/{name}/connections +- :warning: api path removed without deprecation + + +## POST /hosts/internal/{name}/connections +- :warning: api path removed without deprecation + + +## GET /hosts/internal/{name}/unconnectable/volumes +- :warning: api path removed without deprecation + + +## GET /hosts/performance +- endpoint added + + +## GET /hosts/performance/balance +- endpoint added + + +## GET /hosts/performance/by-array +- endpoint added + + +## DELETE /hosts/protection-groups +- endpoint added + + +## GET /hosts/protection-groups +- endpoint added + + +## POST /hosts/protection-groups +- endpoint added + + +## GET /hosts/qos +- endpoint added + + +## GET /hosts/space +- endpoint added + + +## DELETE /hosts/tags +- endpoint added + + +## GET /hosts/tags +- endpoint added + + +## PUT /hosts/tags/batch +- endpoint added + + +## POST /internal/authenticate/token +- :warning: api path removed without deprecation + + +## DELETE /internal/fusion/connections +- :warning: api path removed without deprecation + + +## GET /internal/fusion/connections +- :warning: api path removed without deprecation + + +## PATCH /internal/fusion/connections +- :warning: api path removed without deprecation + + +## POST /internal/fusion/connections +- :warning: api path removed without deprecation + + +## DELETE /kmip +- endpoint added + + +## GET /kmip +- endpoint added + + +## PATCH /kmip +- endpoint added + + +## POST /kmip +- endpoint added + + +## GET /kmip/test +- endpoint added + + +## GET /krypton/space/internal +- :warning: api path removed without deprecation + + +## DELETE /lifecycle-rules +- endpoint added + + +## GET /lifecycle-rules +- endpoint added + + +## PATCH /lifecycle-rules +- endpoint added + + +## POST /lifecycle-rules +- endpoint added + + +## GET /log-targets +- endpoint added + + +## DELETE /log-targets/file +- endpoint added + + +## GET /log-targets/file +- endpoint added + + +## PATCH /log-targets/file +- endpoint added + + +## POST /log-targets/file +- endpoint added + + +## DELETE /log-targets/syslog +- endpoint added + + +## GET /log-targets/syslog +- endpoint added + + +## PATCH /log-targets/syslog +- endpoint added + + +## POST /log-targets/syslog +- endpoint added + + +## GET /log-targets/syslog/settings +- endpoint added + + +## PATCH /log-targets/syslog/settings +- endpoint added + + +## GET /log-targets/syslog/test +- endpoint added + + +## POST /logbook/internal +- :warning: api path removed without deprecation + + +## POST /login +- endpoint added + + +## POST /logout +- endpoint added + + +## POST /logs/internal +- :warning: api path removed without deprecation + + +## DELETE /maintenance-windows +- endpoint added + + +## GET /maintenance-windows +- endpoint added + + +## POST /maintenance-windows +- endpoint added + + +## POST /mig/internal/ +- :warning: api path removed without deprecation + + +## DELETE /network-interfaces +- endpoint added + + +## GET /network-interfaces +- endpoint added + + +## PATCH /network-interfaces +- endpoint added + + +## POST /network-interfaces +- endpoint added + + +## GET /network-interfaces/internal +- :warning: api path removed without deprecation + + +## PATCH /network-interfaces/internal +- :warning: api path removed without deprecation + + +## POST /network-interfaces/internal +- :warning: api path removed without deprecation + + +## GET /network-interfaces/internal/port-mappings +- :warning: api path removed without deprecation + + +## GET /network-interfaces/neighbors +- endpoint added + + +## GET /network-interfaces/performance +- endpoint added + + +## GET /network-interfaces/port-details +- endpoint added + + +## DELETE /nursery/internal +- :warning: api path removed without deprecation + + +## GET /nursery/internal +- :warning: api path removed without deprecation + + +## POST /nursery/internal +- :warning: api path removed without deprecation + + +## POST /oauth2/1.0/token +- endpoint added + + +## DELETE /object-store-access-keys +- endpoint added + + +## GET /object-store-access-keys +- endpoint added + + +## PATCH /object-store-access-keys +- endpoint added + + +## POST /object-store-access-keys +- endpoint added + + +## DELETE /object-store-accounts +- endpoint added + + +## GET /object-store-accounts +- endpoint added + + +## POST /object-store-accounts +- endpoint added + + +## GET /object-store-accounts/space +- endpoint added + + +## DELETE /object-store-users +- endpoint added + + +## GET /object-store-users +- endpoint added + + +## POST /object-store-users +- endpoint added + + +## DELETE /object-store-users/policies/object-store-access +- endpoint added + + +## GET /object-store-users/policies/object-store-access +- endpoint added + + +## POST /object-store-users/policies/object-store-access +- endpoint added + + +## DELETE /object-store-virtual-hosts +- endpoint added + + +## GET /object-store-virtual-hosts +- endpoint added + + +## POST /object-store-virtual-hosts +- endpoint added + + +## GET /object/internal/count +- :warning: api path removed without deprecation + + +## DELETE /offloads +- endpoint added + + +## GET /offloads +- endpoint added + + +## PATCH /offloads +- endpoint added + + +## POST /offloads +- endpoint added + + +## POST /offloads/internal +- :warning: api path removed without deprecation + + +## POST /osl/internal/network/reconfigure +- :warning: api path removed without deprecation + + +## DELETE /performance-limit/internal +- :warning: api path removed without deprecation + + +## GET /performance-limit/internal +- :warning: api path removed without deprecation + + +## POST /performance-limit/internal +- :warning: api path removed without deprecation + + +## DELETE /pod-replica-links +- endpoint added + + +## GET /pod-replica-links +- endpoint added + + +## PATCH /pod-replica-links +- endpoint added + + +## POST /pod-replica-links +- endpoint added + + +## GET /pod-replica-links/lag +- endpoint added + + +## GET /pod-replica-links/mappings/policies +- endpoint added + + +## PATCH /pod-replica-links/mappings/policies +- endpoint added + + +## GET /pod-replica-links/performance/replication +- endpoint added + + +## GET /pod-replica-links/performance/replication/by-array +- endpoint added + + +## DELETE /pods +- endpoint added + + +## GET /pods +- endpoint added + + +## PATCH /pods +- endpoint added + + +## POST /pods +- endpoint added + + +## DELETE /pods/arrays +- endpoint added + + +## GET /pods/arrays +- endpoint added + + +## POST /pods/arrays +- endpoint added + + +## GET /pods/internal +- :warning: api path removed without deprecation + + +## DELETE /pods/internal/arrays +- :warning: api path removed without deprecation + + +## DELETE /pods/internal/members +- :warning: api path removed without deprecation + + +## GET /pods/internal/objects +- :warning: api path removed without deprecation + + +## GET /pods/internal/performance +- :warning: api path removed without deprecation + + +## PATCH /pods/internal/remotepromotionstate +- :warning: api path removed without deprecation + + +## POST /pods/internal/snapshots/{podName} +- :warning: api path removed without deprecation + + +## GET /pods/internal/space +- :warning: api path removed without deprecation + + +## DELETE /pods/members +- endpoint added + + +## GET /pods/members +- endpoint added + + +## POST /pods/members +- endpoint added + + +## GET /pods/performance +- endpoint added + + +## GET /pods/performance/by-array +- endpoint added + + +## GET /pods/performance/replication +- endpoint added + + +## GET /pods/performance/replication/by-array +- endpoint added + + +## GET /pods/space +- endpoint added + + +## DELETE /pods/tags +- endpoint added + + +## GET /pods/tags +- endpoint added + + +## PUT /pods/tags/batch +- endpoint added + + +## POST /pods/test +- endpoint added + + +## GET /policies +- endpoint added + + +## DELETE /policies/alert-watcher +- endpoint added + + +## GET /policies/alert-watcher +- endpoint added + + +## PATCH /policies/alert-watcher +- endpoint added + + +## POST /policies/alert-watcher +- endpoint added + + +## DELETE /policies/alert-watcher/members +- endpoint added + + +## GET /policies/alert-watcher/members +- endpoint added + + +## POST /policies/alert-watcher/members +- endpoint added + + +## DELETE /policies/alert-watcher/rules +- endpoint added + + +## GET /policies/alert-watcher/rules +- endpoint added + + +## PATCH /policies/alert-watcher/rules +- endpoint added + + +## POST /policies/alert-watcher/rules +- endpoint added + + +## GET /policies/alert-watcher/rules/test +- endpoint added + + +## DELETE /policies/audit-file +- endpoint added + + +## GET /policies/audit-file +- endpoint added + + +## PATCH /policies/audit-file +- endpoint added + + +## POST /policies/audit-file +- endpoint added + + +## DELETE /policies/audit-file/members +- endpoint added + + +## GET /policies/audit-file/members +- endpoint added + + +## POST /policies/audit-file/members +- endpoint added + + +## DELETE /policies/autodir +- endpoint added + + +## GET /policies/autodir +- endpoint added + + +## PATCH /policies/autodir +- endpoint added + + +## POST /policies/autodir +- endpoint added + + +## DELETE /policies/autodir/members +- endpoint added + + +## GET /policies/autodir/members +- endpoint added + + +## POST /policies/autodir/members +- endpoint added + + +## GET /policies/internal/network-access/interfaces +- :warning: api path removed without deprecation + + +## POST /policies/internal/nfs/client-rules/preview +- :warning: api path removed without deprecation + + +## DELETE /policies/management-access +- endpoint added + + +## GET /policies/management-access +- endpoint added + + +## PATCH /policies/management-access +- endpoint added + + +## POST /policies/management-access +- endpoint added + + +## DELETE /policies/management-access/members +- endpoint added + + +## GET /policies/management-access/members +- endpoint added + + +## POST /policies/management-access/members +- endpoint added + + +## GET /policies/members +- endpoint added + + +## DELETE /policies/network-access +- endpoint added + + +## GET /policies/network-access +- endpoint added + + +## PATCH /policies/network-access +- endpoint added + + +## POST /policies/network-access +- endpoint added + + +## GET /policies/network-access/members +- endpoint added + + +## DELETE /policies/network-access/rules +- endpoint added + + +## GET /policies/network-access/rules +- endpoint added + + +## PATCH /policies/network-access/rules +- endpoint added + + +## POST /policies/network-access/rules +- endpoint added + + +## DELETE /policies/nfs +- endpoint added + + +## GET /policies/nfs +- endpoint added + + +## PATCH /policies/nfs +- endpoint added + + +## POST /policies/nfs +- endpoint added + + +## DELETE /policies/nfs/client-rules +- endpoint added + + +## GET /policies/nfs/client-rules +- endpoint added + + +## PATCH /policies/nfs/client-rules +- endpoint added + + +## POST /policies/nfs/client-rules +- endpoint added + + +## DELETE /policies/nfs/members +- endpoint added + + +## GET /policies/nfs/members +- endpoint added + + +## POST /policies/nfs/members +- endpoint added + + +## GET /policies/object-store-access +- endpoint added + + +## DELETE /policies/object-store-access/members +- endpoint added + + +## GET /policies/object-store-access/members +- endpoint added + + +## POST /policies/object-store-access/members +- endpoint added + + +## GET /policies/object-store-access/rules +- endpoint added + + +## GET /policies/password +- endpoint added + + +## PATCH /policies/password +- endpoint added + + +## DELETE /policies/qos +- endpoint added + + +## GET /policies/qos +- endpoint added + + +## PATCH /policies/qos +- endpoint added + + +## POST /policies/qos +- endpoint added + + +## DELETE /policies/qos/members +- endpoint added + + +## GET /policies/qos/members +- endpoint added + + +## POST /policies/qos/members +- endpoint added + + +## DELETE /policies/quota +- endpoint added + + +## GET /policies/quota +- endpoint added + + +## PATCH /policies/quota +- endpoint added + + +## POST /policies/quota +- endpoint added + + +## DELETE /policies/quota/members +- endpoint added + + +## GET /policies/quota/members +- endpoint added + + +## POST /policies/quota/members +- endpoint added + + +## DELETE /policies/quota/rules +- endpoint added + + +## GET /policies/quota/rules +- endpoint added + + +## PATCH /policies/quota/rules +- endpoint added + + +## POST /policies/quota/rules +- endpoint added + + +## DELETE /policies/smb +- endpoint added + + +## GET /policies/smb +- endpoint added + + +## PATCH /policies/smb +- endpoint added + + +## POST /policies/smb +- endpoint added + + +## DELETE /policies/smb/client-rules +- endpoint added + + +## GET /policies/smb/client-rules +- endpoint added + + +## POST /policies/smb/client-rules +- endpoint added + + +## DELETE /policies/smb/members +- endpoint added + + +## GET /policies/smb/members +- endpoint added + + +## POST /policies/smb/members +- endpoint added + + +## DELETE /policies/snapshot +- endpoint added + + +## GET /policies/snapshot +- endpoint added + + +## PATCH /policies/snapshot +- endpoint added + + +## POST /policies/snapshot +- endpoint added + + +## DELETE /policies/snapshot/members +- endpoint added + + +## GET /policies/snapshot/members +- endpoint added + + +## POST /policies/snapshot/members +- endpoint added + + +## DELETE /policies/snapshot/rules +- endpoint added + + +## GET /policies/snapshot/rules +- endpoint added + + +## PATCH /policies/snapshot/rules +- endpoint added + + +## POST /policies/snapshot/rules +- endpoint added + + +## DELETE /policies/tls +- endpoint added + + +## GET /policies/tls +- endpoint added + + +## PATCH /policies/tls +- endpoint added + + +## POST /policies/tls +- endpoint added + + +## DELETE /policies/tls/members +- endpoint added + + +## GET /policies/tls/members +- endpoint added + + +## POST /policies/tls/members +- endpoint added + + +## DELETE /policies/user-group-quota +- endpoint added + + +## GET /policies/user-group-quota +- endpoint added + + +## PATCH /policies/user-group-quota +- endpoint added + + +## POST /policies/user-group-quota +- endpoint added + + +## DELETE /policies/user-group-quota/members +- endpoint added + + +## GET /policies/user-group-quota/members +- endpoint added + + +## POST /policies/user-group-quota/members +- endpoint added + + +## DELETE /policies/user-group-quota/rules +- endpoint added + + +## GET /policies/user-group-quota/rules +- endpoint added + + +## PATCH /policies/user-group-quota/rules +- endpoint added + + +## POST /policies/user-group-quota/rules +- endpoint added + + +## GET /ports +- endpoint added + + +## GET /ports/initiators +- endpoint added + + +## PATCH /ports/internal +- :warning: api path removed without deprecation + + +## GET /ports/internal/nvme-initiators +- :warning: api path removed without deprecation + + +## DELETE /presets/workload +- endpoint added + + +## GET /presets/workload +- endpoint added + + +## PATCH /presets/workload +- endpoint added + + +## POST /presets/workload +- endpoint added + + +## PUT /presets/workload +- endpoint added + + +## GET /presets/workload/internal/resource-naming/suggestions +- :warning: api path removed without deprecation + + +## POST /presets/workload/internal/validate +- :warning: api path removed without deprecation + + +## DELETE /protection-group-snapshots +- endpoint added + + +## GET /protection-group-snapshots +- endpoint added + + +## PATCH /protection-group-snapshots +- endpoint added + + +## POST /protection-group-snapshots +- endpoint added + + +## GET /protection-group-snapshots/internal +- :warning: api path removed without deprecation + + +## POST /protection-group-snapshots/internal +- :warning: api path removed without deprecation + + +## GET /protection-group-snapshots/internal/tags +- :warning: api path removed without deprecation + + +## GET /protection-group-snapshots/internal/transfer +- :warning: api path removed without deprecation + + +## POST /protection-group-snapshots/replica +- endpoint added + + +## DELETE /protection-group-snapshots/tags +- endpoint added + + +## GET /protection-group-snapshots/tags +- endpoint added + + +## PUT /protection-group-snapshots/tags/batch +- endpoint added + + +## POST /protection-group-snapshots/test +- endpoint added + + +## GET /protection-group-snapshots/transfer +- endpoint added + + +## DELETE /protection-groups +- endpoint added + + +## GET /protection-groups +- endpoint added + + +## PATCH /protection-groups +- endpoint added + + +## POST /protection-groups +- endpoint added + + +## DELETE /protection-groups/host-groups +- endpoint added + + +## GET /protection-groups/host-groups +- endpoint added + + +## POST /protection-groups/host-groups +- endpoint added + + +## DELETE /protection-groups/hosts +- endpoint added + + +## GET /protection-groups/hosts +- endpoint added + + +## POST /protection-groups/hosts +- endpoint added + + +## GET /protection-groups/internal +- :warning: api path removed without deprecation + + +## PATCH /protection-groups/internal +- :warning: api path removed without deprecation + + +## POST /protection-groups/internal +- :warning: api path removed without deprecation + + +## GET /protection-groups/internal/membership-eligible/host-groups +- :warning: api path removed without deprecation + + +## GET /protection-groups/internal/membership-eligible/hosts +- :warning: api path removed without deprecation + + +## GET /protection-groups/internal/membership-eligible/volumes +- :warning: api path removed without deprecation + + +## GET /protection-groups/internal/membership-ineligible/host-groups +- :warning: api path removed without deprecation + + +## GET /protection-groups/internal/membership-ineligible/hosts +- :warning: api path removed without deprecation + + +## GET /protection-groups/internal/membership-ineligible/volumes +- :warning: api path removed without deprecation + + +## GET /protection-groups/internal/tags +- :warning: api path removed without deprecation + + +## GET /protection-groups/performance/replication +- endpoint added + + +## GET /protection-groups/performance/replication/by-array +- endpoint added + + +## GET /protection-groups/space +- endpoint added + + +## DELETE /protection-groups/tags +- endpoint added + + +## GET /protection-groups/tags +- endpoint added + + +## PUT /protection-groups/tags/batch +- endpoint added + + +## DELETE /protection-groups/targets +- endpoint added + + +## GET /protection-groups/targets +- endpoint added + + +## PATCH /protection-groups/targets +- endpoint added + + +## POST /protection-groups/targets +- endpoint added + + +## DELETE /protection-groups/volumes +- endpoint added + + +## GET /protection-groups/volumes +- endpoint added + + +## POST /protection-groups/volumes +- endpoint added + + +## GET /quota-notifications/internal +- :warning: api path removed without deprecation + + +## DELETE /realm-connections +- endpoint added + + +## GET /realm-connections +- endpoint added + + +## PATCH /realm-connections +- endpoint added + + +## POST /realm-connections +- endpoint added + + +## DELETE /realm-connections/connection-keys +- endpoint added + + +## GET /realm-connections/connection-keys +- endpoint added + + +## POST /realm-connections/connection-keys +- endpoint added + + +## DELETE /realms +- endpoint added + + +## GET /realms +- endpoint added + + +## PATCH /realms +- endpoint added + + +## POST /realms +- endpoint added + + +## GET /realms/internal/performance +- :warning: api path removed without deprecation + + +## GET /realms/internal/space +- :warning: api path removed without deprecation + + +## DELETE /realms/members +- endpoint added + + +## GET /realms/members +- endpoint added + + +## POST /realms/members +- endpoint added + + +## GET /realms/performance +- endpoint added + + +## GET /realms/qos +- endpoint added + + +## GET /realms/space +- endpoint added + + +## DELETE /realms/tags +- endpoint added + + +## GET /realms/tags +- endpoint added + + +## PUT /realms/tags/batch +- endpoint added + + +## GET /remote-arrays +- endpoint added + + +## PATCH /remote-arrays +- endpoint added + + +## GET /remote-pods +- endpoint added + + +## GET /remote-pods/tags +- endpoint added + + +## DELETE /remote-protection-group-snapshots +- endpoint added + + +## GET /remote-protection-group-snapshots +- endpoint added + + +## PATCH /remote-protection-group-snapshots +- endpoint added + + +## POST /remote-protection-group-snapshots +- endpoint added + + +## GET /remote-protection-group-snapshots/internal +- :warning: api path removed without deprecation + + +## GET /remote-protection-group-snapshots/internal/transfer +- :warning: api path removed without deprecation + + +## POST /remote-protection-group-snapshots/test +- endpoint added + + +## GET /remote-protection-group-snapshots/transfer +- endpoint added + + +## DELETE /remote-protection-groups +- endpoint added + + +## GET /remote-protection-groups +- endpoint added + + +## PATCH /remote-protection-groups +- endpoint added + + +## GET /remote-protection-groups/internal +- :warning: api path removed without deprecation + + +## GET /remote-realms +- endpoint added + + +## GET /remote-realms/tags +- endpoint added + + +## DELETE /remote-volume-snapshots +- endpoint added + + +## GET /remote-volume-snapshots +- endpoint added + + +## PATCH /remote-volume-snapshots +- endpoint added + + +## POST /remote-volume-snapshots +- endpoint added + + +## GET /remote-volume-snapshots/internal +- :warning: api path removed without deprecation + + +## POST /remote-volume-snapshots/internal +- :warning: api path removed without deprecation + + +## DELETE /remote-volume-snapshots/internal/tags +- :warning: api path removed without deprecation + + +## GET /remote-volume-snapshots/internal/tags +- :warning: api path removed without deprecation + + +## POST /remote-volume-snapshots/internal/tags +- :warning: api path removed without deprecation + + +## GET /remote-volume-snapshots/internal/transfer +- :warning: api path removed without deprecation + + +## GET /remote-volume-snapshots/transfer +- endpoint added + + +## DELETE /resource-accesses +- endpoint added + + +## GET /resource-accesses +- endpoint added + + +## POST /resource-accesses/batch +- endpoint added + + +## GET /resource-accesses/status +- endpoint added + + +## DELETE /servers +- endpoint added + + +## GET /servers +- endpoint added + + +## PATCH /servers +- endpoint added + + +## POST /servers +- endpoint added + + +## DELETE /servers/policies/tls +- endpoint added + + +## GET /servers/policies/tls +- endpoint added + + +## POST /servers/policies/tls +- endpoint added + + +## GET /sessions +- endpoint added + + +## GET /smi-s +- endpoint added + + +## PATCH /smi-s +- endpoint added + + +## GET /smtp-servers +- endpoint added + + +## PATCH /smtp-servers +- endpoint added + + +## GET /snmp-agents +- endpoint added + + +## PATCH /snmp-agents +- endpoint added + + +## GET /snmp-agents/mib +- endpoint added + + +## DELETE /snmp-managers +- endpoint added + + +## GET /snmp-managers +- endpoint added + + +## PATCH /snmp-managers +- endpoint added + + +## POST /snmp-managers +- endpoint added + + +## GET /snmp-managers/test +- endpoint added + + +## DELETE /snmp/internal +- :warning: api path removed without deprecation + + +## GET /snmp/internal +- :warning: api path removed without deprecation + + +## PATCH /snmp/internal +- :warning: api path removed without deprecation + + +## POST /snmp/internal +- :warning: api path removed without deprecation + + +## DELETE /software +- endpoint added + + +## GET /software +- endpoint added + + +## POST /software +- endpoint added + + +## GET /software-bundle +- endpoint added + + +## POST /software-bundle +- endpoint added + + +## DELETE /software-bundle/internal +- :warning: api path removed without deprecation + + +## GET /software-bundle/internal +- :warning: api path removed without deprecation + + +## PATCH /software-bundle/internal +- :warning: api path removed without deprecation + + +## DELETE /software-check +- endpoint added + + +## GET /software-check +- endpoint added + + +## POST /software-check +- endpoint added + + +## GET /software-check/internal +- :warning: api path removed without deprecation + + +## PATCH /software-check/internal +- :warning: api path removed without deprecation + + +## GET /software-installation-steps +- endpoint added + + +## GET /software-installation-steps/internal +- :warning: api path removed without deprecation + + +## PATCH /software-installation-steps/internal +- :warning: api path removed without deprecation + + +## POST /software-installation-steps/internal +- :warning: api path removed without deprecation + + +## GET /software-installations +- endpoint added + + +## PATCH /software-installations +- endpoint added + + +## POST /software-installations +- endpoint added + + +## GET /software-installations/internal +- :warning: api path removed without deprecation + + +## PATCH /software-installations/internal +- :warning: api path removed without deprecation + + +## GET /software-patches +- endpoint added + + +## POST /software-patches +- endpoint added + + +## GET /software-patches/catalog +- endpoint added + + +## GET /software-patches/catalog/internal +- :warning: api path removed without deprecation + + +## GET /software-patches/internal +- :warning: api path removed without deprecation + + +## PATCH /software-patches/internal +- :warning: api path removed without deprecation + + +## POST /software-patches/internal +- :warning: api path removed without deprecation + + +## GET /software-versions +- endpoint added + + +## DELETE /software/apps/internal/available +- :warning: api path removed without deprecation + + +## POST /software/apps/internal/available +- :warning: api path removed without deprecation + + +## DELETE /software/internal +- :warning: api path removed without deprecation + + +## GET /software/internal +- :warning: api path removed without deprecation + + +## PATCH /software/internal +- :warning: api path removed without deprecation + + +## POST /software/internal +- :warning: api path removed without deprecation + + +## DELETE /sso/saml2/idps +- endpoint added + + +## GET /sso/saml2/idps +- endpoint added + + +## PATCH /sso/saml2/idps +- endpoint added + + +## POST /sso/saml2/idps +- endpoint added + + +## GET /sso/saml2/idps/internal/sp-info +- :warning: api path removed without deprecation + + +## GET /sso/saml2/idps/test +- endpoint added + + +## PATCH /sso/saml2/idps/test +- endpoint added + + +## GET /storage-classes/members +- endpoint added + + +## DELETE /subnets +- endpoint added + + +## GET /subnets +- endpoint added + + +## PATCH /subnets +- endpoint added + + +## POST /subnets +- endpoint added + + +## GET /subscription-assets +- endpoint added + + +## GET /subscriptions +- endpoint added + + +## GET /support +- endpoint added + + +## PATCH /support +- endpoint added + + +## GET /support-diagnostics/details +- endpoint added + + +## GET /support-diagnostics/settings +- endpoint added + + +## PATCH /support-diagnostics/settings +- endpoint added + + +## GET /support/internal +- :warning: api path removed without deprecation + + +## PATCH /support/internal +- :warning: api path removed without deprecation + + +## GET /support/remote-assist-sessions +- endpoint added + + +## PATCH /support/remote-assist-sessions +- endpoint added + + +## GET /support/remote-assist-sessions/settings +- endpoint added + + +## PATCH /support/remote-assist-sessions/settings +- endpoint added + + +## GET /support/system-manifest +- endpoint added + + +## GET /support/test +- endpoint added + + +## DELETE /syslog-servers +- endpoint added + + +## GET /syslog-servers +- endpoint added + + +## PATCH /syslog-servers +- endpoint added + + +## POST /syslog-servers +- endpoint added + + +## GET /syslog-servers/internal/settings +- :warning: api path removed without deprecation + + +## PATCH /syslog-servers/internal/settings +- :warning: api path removed without deprecation + + +## GET /syslog-servers/internal/test +- :warning: api path removed without deprecation + + +## GET /syslog-servers/settings +- endpoint added + + +## PATCH /syslog-servers/settings +- endpoint added + + +## GET /syslog-servers/test +- endpoint added + + +## DELETE /topology-groups +- endpoint added + + +## GET /topology-groups +- endpoint added + + +## PATCH /topology-groups +- endpoint added + + +## POST /topology-groups +- endpoint added + + +## GET /topology-groups/arrays +- endpoint added + + +## DELETE /topology-groups/members +- endpoint added + + +## GET /topology-groups/members +- endpoint added + + +## POST /topology-groups/members +- endpoint added + + +## DELETE /tunables/internal +- :warning: api path removed without deprecation + + +## GET /tunables/internal +- :warning: api path removed without deprecation + + +## POST /tunables/internal +- :warning: api path removed without deprecation + + +## DELETE /vchost-connections +- endpoint added + + +## GET /vchost-connections +- endpoint added + + +## POST /vchost-connections +- endpoint added + + +## DELETE /vchosts +- endpoint added + + +## GET /vchosts +- endpoint added + + +## PATCH /vchosts +- endpoint added + + +## POST /vchosts +- endpoint added + + +## DELETE /vchosts/certificates +- endpoint added + + +## GET /vchosts/certificates +- endpoint added + + +## PATCH /vchosts/certificates +- endpoint added + + +## POST /vchosts/certificates +- endpoint added + + +## DELETE /vchosts/endpoints +- endpoint added + + +## GET /vchosts/endpoints +- endpoint added + + +## PATCH /vchosts/endpoints +- endpoint added + + +## POST /vchosts/endpoints +- endpoint added + + +## GET /vcontainers/internal +- :warning: api path removed without deprecation + + +## PATCH /vcontainers/internal/get-with-create +- :warning: api path removed without deprecation + + +## POST /vcontainers/internal/test-only-update +- :warning: api path removed without deprecation + + +## GET /vcontainers/internal/vasa-host-connections +- :warning: api path removed without deprecation + + +## GET /virtual-machine-snapshots +- endpoint added + + +## GET /virtual-machine-volume-snapshots +- endpoint added + + +## GET /virtual-machines +- endpoint added + + +## PATCH /virtual-machines +- endpoint added + + +## POST /virtual-machines +- endpoint added + + +## DELETE /volume-groups +- endpoint added + + +## GET /volume-groups +- endpoint added + + +## PATCH /volume-groups +- endpoint added + + +## POST /volume-groups +- endpoint added + + +## GET /volume-groups/internal +- :warning: api path removed without deprecation + + +## GET /volume-groups/internal/performance +- :warning: api path removed without deprecation + + +## GET /volume-groups/internal/performance/by-array +- :warning: api path removed without deprecation + + +## GET /volume-groups/internal/space +- :warning: api path removed without deprecation + + +## GET /volume-groups/performance +- endpoint added + + +## GET /volume-groups/qos +- endpoint added + + +## GET /volume-groups/space +- endpoint added + + +## DELETE /volume-groups/tags +- endpoint added + + +## GET /volume-groups/tags +- endpoint added + + +## PUT /volume-groups/tags/batch +- endpoint added + + +## GET /volume-groups/volumes +- endpoint added + + +## DELETE /volume-snapshots +- endpoint added + + +## GET /volume-snapshots +- endpoint added + + +## PATCH /volume-snapshots +- endpoint added + + +## POST /volume-snapshots +- endpoint added + + +## POST /volume-snapshots/batch +- endpoint added + + +## GET /volume-snapshots/internal +- :warning: api path removed without deprecation + + +## GET /volume-snapshots/internal/failover-tags +- :warning: api path removed without deprecation + + +## GET /volume-snapshots/internal/pit-snapshots +- :warning: api path removed without deprecation + + +## GET /volume-snapshots/internal/snapshot-vvols +- :warning: api path removed without deprecation + + +## GET /volume-snapshots/internal/transfer +- :warning: api path removed without deprecation + + +## DELETE /volume-snapshots/tags +- endpoint added + + +## GET /volume-snapshots/tags +- endpoint added + + +## PUT /volume-snapshots/tags/batch +- endpoint added + + +## POST /volume-snapshots/test +- endpoint added + + +## GET /volume-snapshots/transfer +- endpoint added + + +## DELETE /volumes +- endpoint added + + +## GET /volumes +- endpoint added + + +## PATCH /volumes +- endpoint added + + +## POST /volumes +- endpoint added + + +## POST /volumes/batch +- endpoint added + + +## POST /volumes/batch/test +- endpoint added + + +## GET /volumes/diff +- endpoint added + + +## GET /volumes/internal +- :warning: api path removed without deprecation + + +## PATCH /volumes/internal +- :warning: api path removed without deprecation + + +## POST /volumes/internal +- :warning: api path removed without deprecation + + +## GET /volumes/internal/performance +- :warning: api path removed without deprecation + + +## GET /volumes/internal/performance/by-array +- :warning: api path removed without deprecation + + +## GET /volumes/internal/space +- :warning: api path removed without deprecation + + +## DELETE /volumes/internal/system +- :warning: api path removed without deprecation + + +## PATCH /volumes/internal/system +- :warning: api path removed without deprecation + + +## POST /volumes/internal/system +- :warning: api path removed without deprecation + + +## DELETE /volumes/internal/system/tags +- :warning: api path removed without deprecation + + +## GET /volumes/internal/system/tags +- :warning: api path removed without deprecation + + +## PUT /volumes/internal/system/tags/batch +- :warning: api path removed without deprecation + + +## GET /volumes/internal/vvol-tags +- :warning: api path removed without deprecation + + +## GET /volumes/internal/{volumeName}/connectable/host_groups +- :warning: api path removed without deprecation + + +## GET /volumes/internal/{volumeName}/connectable/hosts +- :warning: api path removed without deprecation + + +## GET /volumes/internal/{volumeName}/unconnectable/host_groups +- :warning: api path removed without deprecation + + +## GET /volumes/performance +- endpoint added + + +## GET /volumes/performance/by-array +- endpoint added + + +## DELETE /volumes/protection-groups +- endpoint added + + +## GET /volumes/protection-groups +- endpoint added + + +## POST /volumes/protection-groups +- endpoint added + + +## GET /volumes/qos +- endpoint added + + +## GET /volumes/space +- endpoint added + + +## DELETE /volumes/tags +- endpoint added + + +## GET /volumes/tags +- endpoint added + + +## PUT /volumes/tags/batch +- endpoint added + + +## POST /volumes/test +- endpoint added + + +## GET /volumes/volume-groups +- endpoint added + + +## GET /watch/internal +- :warning: api path removed without deprecation + + +## DELETE /workloads +- endpoint added + + +## GET /workloads +- endpoint added + + +## PATCH /workloads +- endpoint added + + +## POST /workloads +- endpoint added + + +## POST /workloads/compatibility/internal +- :warning: api path removed without deprecation + + +## POST /workloads/filter-placements/internal +- :warning: api path removed without deprecation + + +## GET /workloads/internal/configs +- :warning: api path removed without deprecation + + +## POST /workloads/internal/rebalance +- :warning: api path removed without deprecation + + +## GET /workloads/internal/rebalance-jobs +- :warning: api path removed without deprecation + + +## GET /workloads/placement-recommendations +- endpoint added + + +## POST /workloads/placement-recommendations +- endpoint added + + +## DELETE /workloads/tags +- endpoint added + + +## GET /workloads/tags +- endpoint added + + +## PUT /workloads/tags/batch +- endpoint added + + +## GET /xmlrpcrecorder/internal +- :warning: api path removed without deprecation + + diff --git a/pyproject.toml b/pyproject.toml index 1c151e849c..2805948e4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "py-pure-client" -version = "1.89.0" +version = "1.90.0" description = "Everpure Python clients for FlashArray, FlashBlade, and Pure1 APIs" authors = [ { name = "Everpure", email = "openconnect@everpuredata.com" } diff --git a/pypureclient/_version.py b/pypureclient/_version.py index 6da62f74b3..3deeba468c 100644 --- a/pypureclient/_version.py +++ b/pypureclient/_version.py @@ -1,3 +1,3 @@ __name__ = 'py-pure-client' -__version__ = '1.89.0' +__version__ = '1.90.0' __default_user_agent__ = 'pure/{}/{}'.format(__name__, __version__) \ No newline at end of file diff --git a/pypureclient/flasharray/FA_2_55/__init__.py b/pypureclient/flasharray/FA_2_55/__init__.py new file mode 100644 index 0000000000..0a11151db2 --- /dev/null +++ b/pypureclient/flasharray/FA_2_55/__init__.py @@ -0,0 +1,14 @@ +# coding: utf-8 +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from .client import Client \ No newline at end of file diff --git a/pypureclient/flasharray/FA_2_55/api/__init__.py b/pypureclient/flasharray/FA_2_55/api/__init__.py new file mode 100644 index 0000000000..981df21764 --- /dev/null +++ b/pypureclient/flasharray/FA_2_55/api/__init__.py @@ -0,0 +1,111 @@ +""" + FlashArray REST API +""" + +from functools import partial + +class __LazyApiLoader: + def __init__(self, modname, attr, version=None): + self._modname = modname + self._attr = attr + self._version = version + self._mod = None + + def load(self): + import importlib + if self._mod is None: + self._mod = importlib.import_module(self._modname, package=__package__) + cls = getattr(self._mod, self._attr) + if self._version: + return partial(cls, version=self._version) + return cls + +__class_apis_dict = { + 'APIClientsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.api_clients_api_v_2_36', 'APIClientsApi', '2.55'), + 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flasharray._common.apis.active_directory_api_v_2_55', 'ActiveDirectoryApi', '2.55'), + 'AdministratorsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.administrators_api_v_2_54', 'AdministratorsApi', '2.55'), + 'AlertWatchersApi': __LazyApiLoader('pypureclient.flasharray._common.apis.alert_watchers_api_v_2_49', 'AlertWatchersApi', '2.55'), + 'AlertsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.alerts_api_v_2_49', 'AlertsApi', '2.55'), + 'AppsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.apps_api_v_2_36', 'AppsApi', '2.55'), + 'ArrayConnectionsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.array_connections_api_v_2_55', 'ArrayConnectionsApi', '2.55'), + 'ArraysApi': __LazyApiLoader('pypureclient.flasharray._common.apis.arrays_api_v_2_51', 'ArraysApi', '2.55'), + 'AuditsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.audits_api_v_2_49', 'AuditsApi', '2.55'), + 'AuthorizationApi': __LazyApiLoader('pypureclient.flasharray._common.apis.authorization_api_v_2_47', 'AuthorizationApi', '2.55'), + 'BucketsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.buckets_api_v_2_52', 'BucketsApi', '2.55'), + 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.certificate_groups_api_v_2_41', 'CertificateGroupsApi', '2.55'), + 'CertificatesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.certificates_api_v_2_41', 'CertificatesApi', '2.55'), + 'ConnectionsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.connections_api_v_2_49', 'ConnectionsApi', '2.55'), + 'ContainerDefaultProtectionsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.container_default_protections_api_v_2_49', 'ContainerDefaultProtectionsApi', '2.55'), + 'ControllersApi': __LazyApiLoader('pypureclient.flasharray._common.apis.controllers_api_v_2_36', 'ControllersApi', '2.55'), + 'DNSApi': __LazyApiLoader('pypureclient.flasharray._common.apis.dns_api_v_2_49', 'DNSApi', '2.55'), + 'DataSealingKeysApi': __LazyApiLoader('pypureclient.flasharray._common.apis.data_sealing_keys_api_v_2_55', 'DataSealingKeysApi', '2.55'), + 'DirectoriesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.directories_api_v_2_55', 'DirectoriesApi', '2.55'), + 'DirectoryExportsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.directory_exports_api_v_2_51', 'DirectoryExportsApi', '2.55'), + 'DirectoryQuotasApi': __LazyApiLoader('pypureclient.flasharray._common.apis.directory_quotas_api_v_2_49', 'DirectoryQuotasApi', '2.55'), + 'DirectoryServicesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.directory_services_api_v_2_55', 'DirectoryServicesApi', '2.55'), + 'DirectorySnapshotsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.directory_snapshots_api_v_2_49', 'DirectorySnapshotsApi', '2.55'), + 'DrivesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.drives_api_v_2_36', 'DrivesApi', '2.55'), + 'FileSystemsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.file_systems_api_v_2_51', 'FileSystemsApi', '2.55'), + 'FilesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.files_api_v_2_36', 'FilesApi', '2.55'), + 'FleetsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.fleets_api_v_2_39', 'FleetsApi', '2.55'), + 'HardwareApi': __LazyApiLoader('pypureclient.flasharray._common.apis.hardware_api_v_2_36', 'HardwareApi', '2.55'), + 'HostGroupsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.host_groups_api_v_2_50', 'HostGroupsApi', '2.55'), + 'HostsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.hosts_api_v_2_50', 'HostsApi', '2.55'), + 'KMIPApi': __LazyApiLoader('pypureclient.flasharray._common.apis.kmip_api_v_2_36', 'KMIPApi', '2.55'), + 'LifecycleRulesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.lifecycle_rules_api_v_2_51', 'LifecycleRulesApi', '2.55'), + 'LogTargetsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.log_targets_api_v_2_49', 'LogTargetsApi', '2.55'), + 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.maintenance_windows_api_v_2_36', 'MaintenanceWindowsApi', '2.55'), + 'NetworkInterfacesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.network_interfaces_api_v_2_55', 'NetworkInterfacesApi', '2.55'), + 'ObjectStoreAccessKeysApi': __LazyApiLoader('pypureclient.flasharray._common.apis.object_store_access_keys_api_v_2_51', 'ObjectStoreAccessKeysApi', '2.55'), + 'ObjectStoreAccountsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.object_store_accounts_api_v_2_52', 'ObjectStoreAccountsApi', '2.55'), + 'ObjectStoreUsersApi': __LazyApiLoader('pypureclient.flasharray._common.apis.object_store_users_api_v_2_51', 'ObjectStoreUsersApi', '2.55'), + 'ObjectStoreVirtualHostsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.object_store_virtual_hosts_api_v_2_51', 'ObjectStoreVirtualHostsApi', '2.55'), + 'OffloadsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.offloads_api_v_2_50', 'OffloadsApi', '2.55'), + 'PodReplicaLinksApi': __LazyApiLoader('pypureclient.flasharray._common.apis.pod_replica_links_api_v_2_52', 'PodReplicaLinksApi', '2.55'), + 'PodsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.pods_api_v_2_55', 'PodsApi', '2.55'), + 'PoliciesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.policies_api_v_2_54', 'PoliciesApi', '2.55'), + 'PortsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.ports_api_v_2_49', 'PortsApi', '2.55'), + 'PresetsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.presets_api_v_2_51', 'PresetsApi', '2.55'), + 'ProtectionGroupSnapshotsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.protection_group_snapshots_api_v_2_49', 'ProtectionGroupSnapshotsApi', '2.55'), + 'ProtectionGroupsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.protection_groups_api_v_2_49', 'ProtectionGroupsApi', '2.55'), + 'RealmConnectionsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.realm_connections_api_v_2_55', 'RealmConnectionsApi', '2.55'), + 'RealmsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.realms_api_v_2_55', 'RealmsApi', '2.55'), + 'RemoteArraysApi': __LazyApiLoader('pypureclient.flasharray._common.apis.remote_arrays_api_v_2_54', 'RemoteArraysApi', '2.55'), + 'RemotePodsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.remote_pods_api_v_2_50', 'RemotePodsApi', '2.55'), + 'RemoteProtectionGroupSnapshotsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.remote_protection_group_snapshots_api_v_2_49', 'RemoteProtectionGroupSnapshotsApi', '2.55'), + 'RemoteProtectionGroupsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.remote_protection_groups_api_v_2_49', 'RemoteProtectionGroupsApi', '2.55'), + 'RemoteRealmsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.remote_realms_api_v_2_50', 'RemoteRealmsApi', '2.55'), + 'RemoteVolumeSnapshotsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.remote_volume_snapshots_api_v_2_49', 'RemoteVolumeSnapshotsApi', '2.55'), + 'ResourceAccessesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.resource_accesses_api_v_2_40', 'ResourceAccessesApi', '2.55'), + 'SAML2SSOApi': __LazyApiLoader('pypureclient.flasharray._common.apis.saml2_sso_api_v_2_38', 'SAML2SSOApi', '2.55'), + 'SMISApi': __LazyApiLoader('pypureclient.flasharray._common.apis.smis_api_v_2_36', 'SMISApi', '2.55'), + 'SMTPApi': __LazyApiLoader('pypureclient.flasharray._common.apis.smtp_api_v_2_36', 'SMTPApi', '2.55'), + 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.snmp_agents_api_v_2_36', 'SNMPAgentsApi', '2.55'), + 'SNMPManagersApi': __LazyApiLoader('pypureclient.flasharray._common.apis.snmp_managers_api_v_2_49', 'SNMPManagersApi', '2.55'), + 'ServersApi': __LazyApiLoader('pypureclient.flasharray._common.apis.servers_api_v_2_55', 'ServersApi', '2.55'), + 'SessionsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.sessions_api_v_2_36', 'SessionsApi', '2.55'), + 'SoftwareApi': __LazyApiLoader('pypureclient.flasharray._common.apis.software_api_v_2_36', 'SoftwareApi', '2.55'), + 'SubnetsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.subnets_api_v_2_55', 'SubnetsApi', '2.55'), + 'SubscriptionAssetsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.subscription_assets_api_v_2_36', 'SubscriptionAssetsApi', '2.55'), + 'SubscriptionsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.subscriptions_api_v_2_36', 'SubscriptionsApi', '2.55'), + 'SupportApi': __LazyApiLoader('pypureclient.flasharray._common.apis.support_api_v_2_51', 'SupportApi', '2.55'), + 'SyslogApi': __LazyApiLoader('pypureclient.flasharray._common.apis.syslog_api_v_2_49', 'SyslogApi', '2.55'), + 'TopologyGroupsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.topology_groups_api_v_2_54', 'TopologyGroupsApi', '2.55'), + 'UserGroupQuotasApi': __LazyApiLoader('pypureclient.flasharray._common.apis.user_group_quotas_api_v_2_49', 'UserGroupQuotasApi', '2.55'), + 'VchostConnectionsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.vchost_connections_api_v_2_36', 'VchostConnectionsApi', '2.55'), + 'VchostsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.vchosts_api_v_2_36', 'VchostsApi', '2.55'), + 'VirtualMachinesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.virtual_machines_api_v_2_36', 'VirtualMachinesApi', '2.55'), + 'VolumeGroupsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.volume_groups_api_v_2_49', 'VolumeGroupsApi', '2.55'), + 'VolumeSnapshotsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.volume_snapshots_api_v_2_50', 'VolumeSnapshotsApi', '2.55'), + 'VolumesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.volumes_api_v_2_49', 'VolumesApi', '2.55'), + 'WorkloadsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.workloads_api_v_2_55', 'WorkloadsApi', '2.55'), +} + +__all__ = list(__class_apis_dict.keys()) + +def __getattr__(name, default=None): + if '_apis_list' == name: + return __class_apis_dict.keys() + if name not in __class_apis_dict: + raise AttributeError(f'module {__name__} has no attribute {name}') + return __class_apis_dict[name].load() diff --git a/pypureclient/flasharray/FA_2_55/client.py b/pypureclient/flasharray/FA_2_55/client.py new file mode 100644 index 0000000000..e22e7ec7cf --- /dev/null +++ b/pypureclient/flasharray/FA_2_55/client.py @@ -0,0 +1,72761 @@ +import json +import time +import urllib3 +import uuid +import warnings + +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +try: + from pydantic.v1 import Field, StrictBool, StrictFloat, StrictInt, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, conint, conlist, constr, validator + + +from pypureclient.reference_type import ReferenceType +from pypureclient.api_token_manager import APITokenManager +from pypureclient.exceptions import PureError +from pypureclient.keywords import Headers, Responses, Parameters +from pypureclient.properties import Property, Filter +from pypureclient.responses import ValidResponse, ErrorResponse, ApiError, ItemIterator, ResponseHeaders +from pypureclient.token_manager import TokenManager + +from pypureclient._helpers import create_api_client + +from pypureclient._transport.api_client import ApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.rest import ApiException +from pypureclient._transport.configuration import Configuration + +from . import api +from . import models + + +class Client(object): + + __REST_API_VERSION = '2.55' + + def __init__(self, + configuration: Configuration, + id_token: str = None, + private_key_file: str = None, + private_key_password: str = None, + username: str = None, + client_id: str = None, + key_id: str = None, + issuer: str = None, + api_token: str = None, + retries: int = None, + timeout: Union[int, Tuple[float, float]] = None, + user_agent: str = None, + auto_pagination_limit: int = None): + """ + Initialize a FlashArray Client. id_token is generated based on app ID and private + key info. Either id_token or api_token could be used for authentication. Only one + authentication option is allowed. + + :param configuration: configuration object + :type configuration: Configuration + + :param id_token: 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. + :type id_token: str, optional + + :param private_key_file: The path of the private key to use. Defaults to None. + :type private_key_file: str, optional + + :param private_key_password: The password of the private key. Defaults to None. + :type private_key_password: str, optional + + :param username: Username of the user the token should be issued for. This must + be a valid user in the system. + :type username: str, optional + + :param client_id: ID of API client that issued the identity token. + :type client_id: str, optional + + :param key_id: Key ID of API client that issued the identity token. + :type key_id: str, optional + + :param issuer: API client's trusted identity issuer on the array. + :type issuer: str, optional + + :param api_token: API token for the user. + :type api_token: str, optional + + :param retries: The number of times to retry an API call if it fails for a + non-blocking reason + :type retries: int, optional + + :param timeout: The timeout duration in seconds, either in total time or + (connect and read) times. Defaults to None. + :type timeout: int or (float, float), optional + + :param user_agent: User-Agent request header to use. + :type user_agent: str, optional + + :param auto_pagination_limit: GET requests will be executed in N batches if not None. + Controls the maximum number of items returned per single batch request. + Ignored if None, or `limit` parameter is used. + :type auto_pagination_limit: int, optional + + :raises PureError: If it could not create an ID or access token + """ + + if id_token and api_token: + raise PureError("Only one authentication option is allowed. Please use either id_token or api_token and try again!") + elif private_key_file and private_key_password and username and \ + key_id and client_id and issuer and api_token: + raise PureError("id_token is generated based on app ID and private key info. Please use either id_token or api_token and try again!") + elif api_token: + self._token_man = APITokenManager( + api_token=api_token, + version=Client.__REST_API_VERSION, + user_agent=user_agent, + timeout=timeout, + configuration=configuration, + ) + else: + headers = { + 'kid': key_id + } + payload = { + 'iss': issuer, + 'aud': client_id, + 'sub': username, + } + self._token_man = TokenManager(configuration=configuration, + id_token=id_token, + private_key_file=private_key_file, + private_key_password=private_key_password, + payload=payload, + headers=headers, + timeout=timeout, + user_agent=user_agent) + + self._api_client = create_api_client(configuration=configuration, user_agent=user_agent, _models_package=models) + self._set_auth_header() + + # Read timeout and retries + self._retries = retries + self._timeout = timeout + + self.__auto_pagination_limit = auto_pagination_limit + + self.__apis_instances = {} + + def __del__(self): + # Cleanup this REST API client resources + _api_client_attr = getattr(self, '_api_client', None) # using getattr to avoid raising exception, if we failed too early + if _api_client_attr: + _api_client_attr.close() + + def get_rest_version(self): + """Get the REST API version being used by this client. + + Returns: + str + + """ + return Client.__REST_API_VERSION + + def get_access_token(self, refresh=False): + """ + Get the last used access token. + + Args: + refresh (bool, optional): + Whether to retrieve a new access token. Defaults to False. + + Returns: + str + + Raises: + PureError: If there was an error retrieving an access token. + """ + return self._token_man.get_access_token(refresh) + + def delete_api_clients( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete an API client + + Deletes an API client. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('APIClientsApi', 'api255_api_clients_delete_with_http_info', kwargs) + + def get_api_clients( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List API clients + + Displays a list of API clients. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('APIClientsApi', 'api255_api_clients_get_with_http_info', kwargs) + + def patch_api_clients( + self, + api_clients: 'models.ApiClientPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Manage an API client + + Enables or disables an API client. The `ids` or `names` parameter is required, but they cannot be set together. + + :param api_clients: (required) + :type api_clients: ApiClientPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + api_clients=api_clients, + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('APIClientsApi', 'api255_api_clients_patch_with_http_info', kwargs) + + def post_api_clients( + self, + api_clients: 'models.ApiClientPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an API client + + Creates an API client. Newly created API clients are disabled by default. Enable an API client through the `PATCH` method. The `names`, `issuer`, and `public_key` parameters are required. The `access_policies` or `max_role` parameter is required, but they cannot be set together. + + :param api_clients: (required) + :type api_clients: ApiClientPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + api_clients=api_clients, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('APIClientsApi', 'api255_api_clients_post_with_http_info', kwargs) + + def delete_active_directory( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_only: Annotated[Optional[StrictBool], Field(description="If specified as `true`, only delete the Active Directory configuration on the local array, without deleting the computer account created in the Active Directory domain. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete Active Directory account + + Deletes one or more specified Active Directory accounts. + + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_only: If specified as `true`, only delete the Active Directory configuration on the + local array, without deleting the computer account created in the Active + Directory domain. If not specified, defaults to `false`. + :type local_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_only=local_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ActiveDirectoryApi', 'api255_active_directory_delete_with_http_info', kwargs) + + def get_active_directory( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List Active Directory accounts + + Displays configured Active Directory accounts. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('ActiveDirectoryApi', 'api255_active_directory_get_with_http_info', kwargs) + + def patch_active_directory( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")], + active_directory: 'models.ActiveDirectoryPatch', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify Active Directory account + + Modifies specified Active Directory account. + + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. (required) + :type names: List[str] + :param active_directory: (required) + :type active_directory: ActiveDirectoryPatch + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + active_directory=active_directory, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ActiveDirectoryApi', 'api255_active_directory_patch_with_http_info', kwargs) + + def post_active_directory( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")], + active_directory: 'models.ActiveDirectoryPost', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + join_existing_account: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the domain is searched for a pre-existing computer account to join to, and no new account will be created within the domain. The `user` specified when joining a pre-existing account must have permissions to 'read all properties from' and 'reset the password of' the pre-existing account. `join_ou` will be read from the pre-existing account and cannot be specified when joining to an existing account. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create Active Directory account + + Creates one or more Active Directory accounts. The `user` and `password` provided are used to join the array to the specified `domain`. + + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. (required) + :type names: List[str] + :param active_directory: (required) + :type active_directory: ActiveDirectoryPost + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param join_existing_account: If specified as `true`, the domain is searched for a pre-existing computer + account to join to, and no new account will be created within the domain. + The `user` specified when joining a pre-existing account must have + permissions to 'read all properties from' and 'reset the password of' the + pre-existing account. `join_ou` will be read from the pre-existing + account and cannot be specified when joining to an existing account. If + not specified, defaults to `false`. + :type join_existing_account: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + active_directory=active_directory, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + join_existing_account=join_existing_account, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ActiveDirectoryApi', 'api255_active_directory_post_with_http_info', kwargs) + + def get_active_directory_test( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET active-directory/test + + The diagnostic process that executes a series of validation tests on one or more `Active Directory` `accounts`. Each individual test verifies a specific aspect of the `configuration`, such as connectivity, authentication permissions, and service principal integrity, to ensure the environment is functioning properly. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names and ids keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names', 'ids'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'ids', 'sort'], kwargs) + return self._call_api('ActiveDirectoryApi', 'api255_active_directory_test_get_with_http_info', kwargs) + + def delete_admins_api_tokens( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete API tokens + + The operation that deletes the `API tokens` of the specified `administrators`. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('AdministratorsApi', 'api255_admins_api_tokens_delete_with_http_info', kwargs) + + def get_admins_api_tokens( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + expose_api_token: Annotated[Optional[StrictBool], Field(description="If `true`, exposes the API token of the current user.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List API tokens + + Displays API tokens for the specified administrators. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param expose_api_token: If `true`, exposes the API token of the current user. + :type expose_api_token: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + expose_api_token=expose_api_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('AdministratorsApi', 'api255_admins_api_tokens_get_with_http_info', kwargs) + + def post_admins_api_tokens( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + timeout: Annotated[Optional[StrictInt], Field(description="The duration of API token validity, in milliseconds.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create API tokens + + The operation that creates `API tokens` for the specified `administrators`. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param timeout: The duration of API token validity, in milliseconds. + :type timeout: int + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + timeout=timeout, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('AdministratorsApi', 'api255_admins_api_tokens_post_with_http_info', kwargs) + + def delete_admins_cache( + self, + remove_all_entries: Annotated[StrictBool, Field(..., description="If set to `true`, removes all entries from the administrator cache.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete cache entries + + The operation that deletes all `entries` from the `administrator cache`. + + :param remove_all_entries: If set to `true`, removes all entries from the administrator cache. (required) + :type remove_all_entries: bool + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + remove_all_entries=remove_all_entries, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('AdministratorsApi', 'api255_admins_cache_delete_with_http_info', kwargs) + + def get_admins_cache( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List administrator cache entries + + Displays entries in the administrator cache. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('AdministratorsApi', 'api255_admins_cache_get_with_http_info', kwargs) + + def put_admins_cache( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update or refresh entries in the administrator cache + + The operation that updates entries in the `cache` for `administrators` who currently do not have a `cache entry`; otherwise, it refreshes the existing entry. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('AdministratorsApi', 'api255_admins_cache_put_with_http_info', kwargs) + + def delete_admins( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete an administrator + + The operation that deletes the specified `administrator`. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('AdministratorsApi', 'api255_admins_delete_with_http_info', kwargs) + + def get_admins( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + expose_api_token: Annotated[Optional[StrictBool], Field(description="If `true`, exposes the API token of the current user.")] = None, + expose_public_key: Annotated[Optional[StrictBool], Field(description="If `true`, exposes the public key of the current user.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List administrators + + Displays a list of administrators. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param expose_api_token: If `true`, exposes the API token of the current user. + :type expose_api_token: bool + :param expose_public_key: If `true`, exposes the public key of the current user. + :type expose_public_key: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + expose_api_token=expose_api_token, + expose_public_key=expose_public_key, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('AdministratorsApi', 'api255_admins_get_with_http_info', kwargs) + + def patch_admins( + self, + admin: 'models.AdminPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify an administrator + + The operation that modifies `properties` for the specified `administrator`. + + :param admin: (required) + :type admin: AdminPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + admin=admin, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('AdministratorsApi', 'api255_admins_patch_with_http_info', kwargs) + + def delete_admins_policies_management_access( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between an administrator and one or more management access policies + + Deletes a membership between an administrator with one or more management access policies. One of `policy_ids` or `policy_names` is required, and one of `member_ids` or `member_names` is required. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('AdministratorsApi', 'api255_admins_policies_management_access_delete_with_http_info', kwargs) + + def get_admins_policies_management_access( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List management access policies attached to administrators + + Displays a list of management access policies that are attached to administrators. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('AdministratorsApi', 'api255_admins_policies_management_access_get_with_http_info', kwargs) + + def post_admins_policies_management_access( + self, + policies: 'models.PolicyAssignmentPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between an administrator with one or more management access policies. + + Creates a membership between an administrator with one or more management access policies. One of `member_ids` or `member_names` parameter is required. + + :param policies: (required) + :type policies: PolicyAssignmentPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('AdministratorsApi', 'api255_admins_policies_management_access_post_with_http_info', kwargs) + + def post_admins( + self, + admin: 'models.AdminPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an administrator + + The operation that creates an `administrator`. + + :param admin: (required) + :type admin: AdminPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + admin=admin, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('AdministratorsApi', 'api255_admins_post_with_http_info', kwargs) + + def get_admins_settings( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List administrator settings + + Displays the global administrator settings for the array. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('AdministratorsApi', 'api255_admins_settings_get_with_http_info', kwargs) + + def patch_admins_settings( + self, + admin_settings: 'models.AdminSettings', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify administrator settings + + Modifies the global administrator settings for the array. + + :param admin_settings: (required) + :type admin_settings: AdminSettings + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + admin_settings=admin_settings, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('AdministratorsApi', 'api255_admins_settings_patch_with_http_info', kwargs) + + def delete_alert_watchers( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete alert watcher + + Delete alert watcher email address from the list of alert watchers. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('AlertWatchersApi', 'api255_alert_watchers_delete_with_http_info', kwargs) + + def get_alert_watchers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List alert watchers + + Displays alert watcher email addressess and indicates whether they are `enabled`. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('AlertWatchersApi', 'api255_alert_watchers_get_with_http_info', kwargs) + + def patch_alert_watchers( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + alert_watcher: 'models.AlertWatcherPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify alert watcher + + Modify alert watcher email address by enabling or disabling it. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param alert_watcher: (required) + :type alert_watcher: AlertWatcherPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + alert_watcher=alert_watcher, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('AlertWatchersApi', 'api255_alert_watchers_patch_with_http_info', kwargs) + + def post_alert_watchers( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + alert_watcher: Optional['models.AlertWatcherPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create alert watcher + + Creates one or more alert watcher email addresses, adding them to the list of alert watchers. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param alert_watcher: + :type alert_watcher: AlertWatcherPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + alert_watcher=alert_watcher, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('AlertWatchersApi', 'api255_alert_watchers_post_with_http_info', kwargs) + + def get_alert_watchers_test( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List alert watcher test + + Displays alert watcher email test results. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('AlertWatchersApi', 'api255_alert_watchers_test_get_with_http_info', kwargs) + + def get_alerts_events( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + flagged: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only flagged messages. If set to `false`, lists only unflagged messages. if not specified, lists all messages.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format. The `ids` or `names` parameter is required, but they cannot be set together.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format. The `ids` or `names` parameter is required, but they cannot be set together.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List alert events + + Displays a list of alert events. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param flagged: If set to `true`, lists only flagged messages. If set to `false`, lists only + unflagged messages. if not specified, lists all messages. + :type flagged: bool + :param ids: Performs the operation on the unique resource IDs specified. Enter multiple + resource IDs in comma-separated format. The `ids` or `names` parameter is + required, but they cannot be set together. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. The `ids` or `names` + parameter is required, but they cannot be set together. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + flagged=flagged, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('AlertsApi', 'api255_alerts_events_get_with_http_info', kwargs) + + def get_alerts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + flagged: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only flagged messages. If set to `false`, lists only unflagged messages. if not specified, lists all messages.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List alerts + + Displays a list of alerts. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param flagged: If set to `true`, lists only flagged messages. If set to `false`, lists only + unflagged messages. if not specified, lists all messages. + :type flagged: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + flagged=flagged, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('AlertsApi', 'api255_alerts_get_with_http_info', kwargs) + + def patch_alerts( + self, + alert: 'models.Alert', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify flagged state + + Modifies one or more alerts and display updated information about these alerts. + + :param alert: (required) + :type alert: Alert + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + alert=alert, + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('AlertsApi', 'api255_alerts_patch_with_http_info', kwargs) + + def get_alerts_rules_catalog( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + code: Annotated[Optional[StrictInt], Field(description="The alert code to display.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List available customizable alert codes + + Displays a list of available customizable alert codes. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param code: The alert code to display. + :type code: int + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + code=code, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('AlertsApi', 'api255_alerts_rules_catalog_get_with_http_info', kwargs) + + def delete_alerts_rules( + self, + code: Annotated[StrictInt, Field(..., description="The alert code that the rule applies to. Available alert codes for customization can be found in the alert rules catalog.")], + parameter: Annotated[StrictStr, Field(..., description="The parameter of the custom alert rule to modify. Values include `info` and `warning`. Available parameter values can be found in the alert rules catalog.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a custom alert rule + + Deletes a custom alert rule. + + :param code: The alert code that the rule applies to. Available alert codes for customization + can be found in the alert rules catalog. (required) + :type code: int + :param parameter: The parameter of the custom alert rule to modify. Values include `info` and + `warning`. Available parameter values can be found in the alert rules + catalog. (required) + :type parameter: str + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + code=code, + parameter=parameter, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('AlertsApi', 'api255_alerts_rules_delete_with_http_info', kwargs) + + def get_alerts_rules( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + code: Annotated[Optional[StrictInt], Field(description="The alert code to display.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List custom alert rules + + Displays a list of custom alert rules. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param code: The alert code to display. + :type code: int + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + code=code, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('AlertsApi', 'api255_alerts_rules_get_with_http_info', kwargs) + + def patch_alerts_rules( + self, + code: Annotated[StrictInt, Field(..., description="The alert code that the rule applies to. Available alert codes for customization can be found in the alert rules catalog.")], + parameter: Annotated[StrictStr, Field(..., description="The parameter of the custom alert rule to modify. Values include `info` and `warning`. Available parameter values can be found in the alert rules catalog.")], + alert_rule: 'models.AlertRules', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a custom alert rule + + Modifies a custom alert rule to a new value. + + :param code: The alert code that the rule applies to. Available alert codes for customization + can be found in the alert rules catalog. (required) + :type code: int + :param parameter: The parameter of the custom alert rule to modify. Values include `info` and + `warning`. Available parameter values can be found in the alert rules + catalog. (required) + :type parameter: str + :param alert_rule: (required) + :type alert_rule: AlertRules + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + code=code, + parameter=parameter, + alert_rule=alert_rule, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('AlertsApi', 'api255_alerts_rules_patch_with_http_info', kwargs) + + def post_alerts_rules( + self, + code: Annotated[StrictInt, Field(..., description="The alert code that the rule applies to. Available alert codes for customization can be found in the alert rules catalog.")], + parameter: Annotated[StrictStr, Field(..., description="The parameter of the custom alert rule to modify. Values include `info` and `warning`. Available parameter values can be found in the alert rules catalog.")], + alert_rule: 'models.AlertRules', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a custom alert rule + + Creates an alert rule with a custom value. + + :param code: The alert code that the rule applies to. Available alert codes for customization + can be found in the alert rules catalog. (required) + :type code: int + :param parameter: The parameter of the custom alert rule to modify. Values include `info` and + `warning`. Available parameter values can be found in the alert rules + catalog. (required) + :type parameter: str + :param alert_rule: (required) + :type alert_rule: AlertRules + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + code=code, + parameter=parameter, + alert_rule=alert_rule, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('AlertsApi', 'api255_alerts_rules_post_with_http_info', kwargs) + + def get_apps( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List apps + + Displays a list of installed apps. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('AppsApi', 'api255_apps_get_with_http_info', kwargs) + + def get_apps_nodes( + self, + apps: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + app_names: Annotated[Optional[conlist(StrictStr)], Field(description="The name of the installed app. Enter multiple names in comma-separated format.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List app nodes + + Displays a list of installed apps and their nodes. + + :param apps: A list of apps to query for. Overrides app_names keyword argument. + :type apps: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param app_names: The name of the installed app. Enter multiple names in comma-separated format. + :type app_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + app_names=app_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(apps, ['app_names'], kwargs) + _fixup_list_type_params(['app_names', 'sort'], kwargs) + return self._call_api('AppsApi', 'api255_apps_nodes_get_with_http_info', kwargs) + + def patch_apps( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + app: 'models.App', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify app + + Modifies an installed app or modifies Virtual Network Computing (VNC) access for apps that are being patched. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param app: (required) + :type app: App + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + app=app, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('AppsApi', 'api255_apps_patch_with_http_info', kwargs) + + def get_array_connections_connection_key( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + encrypted: Annotated[Optional[StrictBool], Field(description="If `true`, the returned array connection key will encode an encryption key used to establish trust and secure replication traffic. If `false`, the returned array connection key will not encode an encryption key. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List connection key + + Displays the connection key for the array. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param encrypted: If `true`, the returned array connection key will encode an encryption key used + to establish trust and secure replication traffic. If `false`, the returned + array connection key will not encode an encryption key. If not specified, + defaults to `false`. + :type encrypted: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + encrypted=encrypted, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('ArrayConnectionsApi', 'api255_array_connections_connection_key_get_with_http_info', kwargs) + + def delete_array_connections( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete an array connection + + Deletes the connection between this array and the specified array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ArrayConnectionsApi', 'api255_array_connections_delete_with_http_info', kwargs) + + def get_array_connections( + self, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote array IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote array names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_ids` query parameter.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List the connected arrays + + Displays a list of connected arrays. + + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param remote_ids: A comma-separated list of remote array IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_names` query + parameter. + :type remote_ids: List[str] + :param remote_names: A comma-separated list of remote array names. If, after filtering, there is not + at least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_ids` query + parameter. + :type remote_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'remote_ids', 'remote_names', 'sort'], kwargs) + return self._call_api('ArrayConnectionsApi', 'api255_array_connections_get_with_http_info', kwargs) + + def patch_array_connections( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + refresh: Annotated[Optional[StrictBool], Field(description="If set to `true`, the array will attempt to communicate with the connection peer in order to update the connection attributes on both arrays with any changes that have occurred. If set to `true`, other array connection attributes may not be modified in requests. Default value is `false`.")] = None, + renew_encryption_key: Annotated[Optional[StrictBool], Field(description="If set to `true`, update array connection with a new encryption key. If set to `true`, other array connection attributes may not be modified in requests. Defaults to `false`.")] = None, + array_connection: Optional['models.ArrayConnectionPatch'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify an array connection + + Modifies attributes for an array connection. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param refresh: If set to `true`, the array will attempt to communicate with the connection peer + in order to update the connection attributes on both arrays with any changes + that have occurred. If set to `true`, other array connection attributes may + not be modified in requests. Default value is `false`. + :type refresh: bool + :param renew_encryption_key: If set to `true`, update array connection with a new encryption key. If set to + `true`, other array connection attributes may not be modified in + requests. Defaults to `false`. + :type renew_encryption_key: bool + :param array_connection: + :type array_connection: ArrayConnectionPatch + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + refresh=refresh, + renew_encryption_key=renew_encryption_key, + array_connection=array_connection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ArrayConnectionsApi', 'api255_array_connections_patch_with_http_info', kwargs) + + def get_array_connections_path( + self, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote array IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote array names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_ids` query parameter.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List connection path + + Displays the connection path from the array to which the connection was made. + + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param remote_ids: A comma-separated list of remote array IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_names` query + parameter. + :type remote_ids: List[str] + :param remote_names: A comma-separated list of remote array names. If, after filtering, there is not + at least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_ids` query + parameter. + :type remote_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'remote_ids', 'remote_names', 'sort'], kwargs) + return self._call_api('ArrayConnectionsApi', 'api255_array_connections_path_get_with_http_info', kwargs) + + def post_array_connections( + self, + array_connection: 'models.ArrayConnectionPost', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an array connection + + Creates a connection between this array and the specified array. + + :param array_connection: (required) + :type array_connection: ArrayConnectionPost + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + array_connection=array_connection, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('ArrayConnectionsApi', 'api255_array_connections_post_with_http_info', kwargs) + + def get_arrays_cache( + self, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DIMM Cache status + + The status of the DIMM cache. + + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + end_time=end_time, + resolution=resolution, + start_time=start_time, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_cache_get_with_http_info', kwargs) + + def get_arrays_cloud_capacity( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List CBS array capacity status + + Displays the capacity status of the CBS array including the progress of the capacity update. Requests for non-CBS arrays will receive an error response. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_cloud_capacity_get_with_http_info', kwargs) + + def patch_arrays_cloud_capacity( + self, + capacity: Annotated['models.CloudCapacityStatus', Field(..., description="The requested capacity of the CBS array.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify CBS array capacity + + Modifies the raw capacity of the CBS array. This should trigger a backend process that will update the CBS array capacity. The array capacity can be updated only to values defined by the capacity steps endpoint. When an existing capacity update request is in progress, any new request to update of the capacity will receive an error response. For non-CBS arrays, this feature is not supported and requests will receive an error response. + + :param capacity: The requested capacity of the CBS array. (required) + :type capacity: CloudCapacityStatus + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + capacity=capacity, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_cloud_capacity_patch_with_http_info', kwargs) + + def get_arrays_cloud_capacity_supported_steps( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List CBS array capacity steps + + Displays the list of supported raw capacity sizes in bytes the CBS array can be upgraded to. Requests for non-CBS arrays will receive an error response. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_cloud_capacity_supported_steps_get_with_http_info', kwargs) + + def get_arrays_cloud_config( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List CBS array configuration status + + Displays the configuration status of the CBS array, including the progress of the configuration upgrade. Requests for non-CBS arrays will receive an error response. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_cloud_config_get_with_http_info', kwargs) + + def patch_arrays_cloud_config( + self, + config: Annotated['models.CloudConfigPatch', Field(..., description="The requested configuration of the CBS array hardware.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify CBS array configuration + + Modifies the configuration of the CBS array. This should trigger a backend process that will upgrade the CBS array configuration. The array can be upgraded only to models defined by the supported configurations endpoint. When an existing array upgrade request is in progress, any new request to upgrade the array will receive an error response. For non-CBS arrays, this feature is not supported and requests will receive an error response. + + :param config: The requested configuration of the CBS array hardware. (required) + :type config: CloudConfigPatch + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + config=config, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_cloud_config_patch_with_http_info', kwargs) + + def get_arrays_cloud_config_supported_configs( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List CBS array supported upgrade target configs + + Displays the list of supported configurations to which the CBS array can be upgraded. Requests for non-CBS arrays will receive an error response. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_cloud_config_supported_configs_get_with_http_info', kwargs) + + def put_arrays_cloud_provider_tags_batch( + self, + tag: Annotated[conlist('models.CloudProviderTag', max_items=50, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if already existing, updated.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update user tags on the cloud. + + Updates users tags to deployed cloud resources of a CBS array. + + :param tag: A list of tags to be created or, if already existing, updated. (required) + :type tag: List[CloudProviderTag] + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['tag'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_cloud_provider_tags_batch_put_with_http_info', kwargs) + + def delete_arrays_cloud_provider_tags( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete user tags from the cloud. + + Deletes user tags from deployed cloud resources of a CBS array. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + keys=keys, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['keys'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_cloud_provider_tags_delete_with_http_info', kwargs) + + def get_arrays_cloud_provider_tags( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List user tags on the cloud. + + Displays the list of user tags on deployed cloud resources of a CBS array. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_cloud_provider_tags_get_with_http_info', kwargs) + + def delete_arrays( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + eradicate_all_data: Annotated[Optional[StrictBool], Field(description="Set to `true` to perform a factory reset.")] = None, + factory_reset_token: Annotated[Optional[StrictInt], Field(description="A token required to perform a factory reset.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete an array + + Deletes an array. For physical appliances, deleting an array restores the hardware to factory settings. This entails deleting all data, metadata, configuration, and logs. The array returns to the state it was in prior to any configuration changes being made. If the hardware is reused, it must be as a different array with a new ID. For virtual appliances, deleting an array puts it into an unusable state. Virtual resources (e.g., virtual machines) can later be freed, which deletes any remaining data, metadata, configuration, and logs. Prior to factory reset, an array must be manually prepared (e.g., all volumes and snapshots must be eradicated) and a factory reset token must be created. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param eradicate_all_data: Set to `true` to perform a factory reset. + :type eradicate_all_data: bool + :param factory_reset_token: A token required to perform a factory reset. + :type factory_reset_token: int + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + eradicate_all_data=eradicate_all_data, + factory_reset_token=factory_reset_token, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_delete_with_http_info', kwargs) + + def delete_arrays_erasures( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete factory reset + + Deletes the factory reset process when it is `failed`. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_erasures_delete_with_http_info', kwargs) + + def get_arrays_erasures( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List factory reset details + + Displays a list of factory reset processes. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_erasures_get_with_http_info', kwargs) + + def patch_arrays_erasures( + self, + delete_sanitization_certificate: Annotated[StrictBool, Field(..., description="Set to `true` to finalize factory reset and acknowledge the deletion of sanitization certificate.")], + eradicate_all_data: Annotated[StrictBool, Field(..., description="Set to `true` to perform a factory reset.")], + finalize: Annotated[StrictBool, Field(..., description="Must be `true` to finalize factory reset.")], + reinstall_image: Annotated[StrictBool, Field(..., description="Set to `true` to reinstall image, or `false` to skip reinstalling image.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + erasure_patch: Optional['models.ArrayErasurePatch'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update factory reset + + Modifies the factory reset process to finalize. + + :param delete_sanitization_certificate: Set to `true` to finalize factory reset and acknowledge the deletion of + sanitization certificate. (required) + :type delete_sanitization_certificate: bool + :param eradicate_all_data: Set to `true` to perform a factory reset. (required) + :type eradicate_all_data: bool + :param finalize: Must be `true` to finalize factory reset. (required) + :type finalize: bool + :param reinstall_image: Set to `true` to reinstall image, or `false` to skip reinstalling image. + (required) + :type reinstall_image: bool + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param erasure_patch: + :type erasure_patch: ArrayErasurePatch + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + delete_sanitization_certificate=delete_sanitization_certificate, + eradicate_all_data=eradicate_all_data, + finalize=finalize, + reinstall_image=reinstall_image, + authorization=authorization, + x_request_id=x_request_id, + erasure_patch=erasure_patch, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_erasures_patch_with_http_info', kwargs) + + def post_arrays_erasures( + self, + eradicate_all_data: Annotated[StrictBool, Field(..., description="Set to `true` to perform a factory reset.")], + preserve_configuration_data: Annotated[conlist(StrictStr), Field(..., description="A comma-separated list of configuration data types to preserve. A value of `all` will preserve all configuration data types. Valid values include `all`.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + skip_phonehome_check: Annotated[Optional[StrictBool], Field(description="A flag to skip phonehome connectivity check. If `skip_phonehome_check` is not set, the factory reset will fail if phonehome connectivity check fails. Arrays that intentionally disable phonehome or do not permit connectivity to Pure Storage's cloud servers must set this flag to `true` in order to start factory reset.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a process for factory reset + + Creates the initiation of the factory reset process + + :param eradicate_all_data: Set to `true` to perform a factory reset. (required) + :type eradicate_all_data: bool + :param preserve_configuration_data: A comma-separated list of configuration data types to preserve. A value of `all` + will preserve all configuration data types. Valid values include `all`. + (required) + :type preserve_configuration_data: List[str] + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param skip_phonehome_check: A flag to skip phonehome connectivity check. If `skip_phonehome_check` is not + set, the factory reset will fail if phonehome connectivity check fails. + Arrays that intentionally disable phonehome or do not permit connectivity + to Pure Storage's cloud servers must set this flag to `true` in order to + start factory reset. + :type skip_phonehome_check: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + eradicate_all_data=eradicate_all_data, + preserve_configuration_data=preserve_configuration_data, + authorization=authorization, + x_request_id=x_request_id, + skip_phonehome_check=skip_phonehome_check, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['preserve_configuration_data'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_erasures_post_with_http_info', kwargs) + + def get_arrays_eula( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List End User Agreement and signature + + Displays the End User Agreement and signature. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_eula_get_with_http_info', kwargs) + + def patch_arrays_eula( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + eula: Optional['models.Eula'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify signature on the End User Agreement + + Modifies the signature on the End User Agreement. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param eula: + :type eula: Eula + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + eula=eula, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_eula_patch_with_http_info', kwargs) + + def delete_arrays_factory_reset_token( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a factory reset token + + Deletes an existing token that could be used to perform a factory reset on the array. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_factory_reset_token_delete_with_http_info', kwargs) + + def get_arrays_factory_reset_token( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List factory reset tokens + + Displays a list of tokens used to perform a factory reset on the array. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_factory_reset_token_get_with_http_info', kwargs) + + def post_arrays_factory_reset_token( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a factory reset token + + Creates a token that can be used to perform a factory reset on the array. Factory reset tokens can only be created after the array has been prepared for reset (e.g., all volumes and snapshots must first be eradicated). After a token has been created, operations that would take the array out of the prepared state are disabled (e.g., creating volumes) until all tokens have been deleted. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_factory_reset_token_post_with_http_info', kwargs) + + def get_arrays( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List arrays + + Displays general array properties including the array name, login banner, idle timeout for management sessions, and NTP servers. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_get_with_http_info', kwargs) + + def get_arrays_ntp_test( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List NTP test results + + Displays test results for configured NTP servers. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_ntp_test_get_with_http_info', kwargs) + + def patch_arrays( + self, + array: 'models.Arrays', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify an array + + Modifies general array properties such as the array name, login banner, idle timeout for management sessions, and NTP servers. + + :param array: (required) + :type array: Arrays + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + array=array, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_patch_with_http_info', kwargs) + + def get_arrays_performance_by_link( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List array front-end IO performance data by link + + Displays real-time and historical front-end performance data at the array level including latency, bandwidth, IOPS, average I/O size, and queue depth. Group output is shown by link. A link represents a set of arrays that an I/O operation depends on. For local-only I/Os, this is a local array. For mirrored I/Os, this is a set of synchronous replication peer arrays. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_performance_by_link_get_with_http_info', kwargs) + + def get_arrays_performance( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`.")] = None, + protocol_group: Annotated[Optional[StrictStr], Field(description="Protocol group type. Valid values are `block`, `file`, `object-store`, and `all`.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List array front-end performance data + + Displays real-time and historical front-end performance data at the array level including latency, bandwidth, IOPS, average I/O size, and queue depth. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`. + :type protocol: str + :param protocol_group: Protocol group type. Valid values are `block`, `file`, `object-store`, and + `all`. + :type protocol_group: str + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + protocol=protocol, + protocol_group=protocol_group, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_performance_get_with_http_info', kwargs) + + def get_arrays_space( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List array space information + + Displays real-time and historical array space information including unique volume and snapshot space, shared space, data reduction, provisioned capacity, usable capacity, and parity. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_space_get_with_http_info', kwargs) + + def put_arrays_tags( + self, + tag: Annotated[conlist('models.NonCopyableTag', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if they already exist, updated.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags. + + :param tag: A list of tags to be created or, if they already exist, updated. (required) + :type tag: List[NonCopyableTag] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_tags_batch_put_with_http_info', kwargs) + + def delete_arrays_tags( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags on array objects. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_tags_delete_with_http_info', kwargs) + + def get_arrays_tags( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags on array objects. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'sort'], kwargs) + return self._call_api('ArraysApi', 'api255_arrays_tags_get_with_http_info', kwargs) + + def get_audits( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List audits + + Displays a list of audits. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('AuditsApi', 'api255_audits_get_with_http_info', kwargs) + + def delete_buckets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE buckets + + Delete object store buckets. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('BucketsApi', 'api255_buckets_delete_with_http_info', kwargs) + + def get_buckets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET buckets + + List object store bucket attributes such as creation time and space usage. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('BucketsApi', 'api255_buckets_get_with_http_info', kwargs) + + def patch_buckets( + self, + bucket: 'models.BucketPatchBase', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """PATCH buckets + + Modify object store bucket attributes such as destroyed and versioning. + + :param bucket: (required) + :type bucket: BucketPatchBase + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + bucket=bucket, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('BucketsApi', 'api255_buckets_patch_with_http_info', kwargs) + + def get_buckets_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List bucket performance data + + The monitoring interface that provides real-time and historical performance data, including `latency` and average `I/O` sizes. These metrics are available for each individual `bucket` and as an aggregate total for all buckets across the entire `array`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('BucketsApi', 'api255_buckets_performance_get_with_http_info', kwargs) + + def post_buckets( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + bucket: 'models.BucketPostBase', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST buckets + + Create a new object store bucket. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param bucket: (required) + :type bucket: BucketPostBase + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + bucket=bucket, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('BucketsApi', 'api255_buckets_post_with_http_info', kwargs) + + def get_buckets_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List bucket space information + + The monitoring interface or dataset that provides `physical storage` `consumption` data for each individual `bucket`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('BucketsApi', 'api255_buckets_space_get_with_http_info', kwargs) + + def delete_certificate_groups_certificates( + self, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificate_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If no resource matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete certificate-groups or certificates + + Deletes one or more certificate groups. + + :param certificates: A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + :type certificates: ReferenceType or List[ReferenceType], optional + :param certificate_groups: A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + :type certificate_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one + resource that matches each of the elements of `certificate_group_ids`, + then an error is returned. This cannot be provided in conjunction with + the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If no resource matches each + of the elements of `certificate_group_names`, then an error is returned. + This cannot be provided in conjunction with the `certificate_group_ids` + parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource + that matches each of the elements of `certificate_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_ids=certificate_ids, + certificate_names=certificate_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _fixup_list_type_params(['certificate_group_ids', 'certificate_group_names', 'certificate_ids', 'certificate_names'], kwargs) + return self._call_api('CertificateGroupsApi', 'api255_certificate_groups_certificates_delete_with_http_info', kwargs) + + def get_certificate_groups_certificates( + self, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificate_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If no resource matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List certificate-groups and certificates + + Lists membership associations between groups and certificates on the array. + + :param certificates: A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + :type certificates: ReferenceType or List[ReferenceType], optional + :param certificate_groups: A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + :type certificate_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one + resource that matches each of the elements of `certificate_group_ids`, + then an error is returned. This cannot be provided in conjunction with + the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If no resource matches each + of the elements of `certificate_group_names`, then an error is returned. + This cannot be provided in conjunction with the `certificate_group_ids` + parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource + that matches each of the elements of `certificate_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_ids=certificate_ids, + certificate_names=certificate_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _fixup_list_type_params(['certificate_group_ids', 'certificate_group_names', 'certificate_ids', 'certificate_names', 'sort'], kwargs) + return self._call_api('CertificateGroupsApi', 'api255_certificate_groups_certificates_get_with_http_info', kwargs) + + def post_certificate_groups_certificates( + self, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificate_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If no resource matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create certificate-groups/certificates + + Creates one or more certificates to one or more certificate groups on the array. + + :param certificates: A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + :type certificates: ReferenceType or List[ReferenceType], optional + :param certificate_groups: A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + :type certificate_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one + resource that matches each of the elements of `certificate_group_ids`, + then an error is returned. This cannot be provided in conjunction with + the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If no resource matches each + of the elements of `certificate_group_names`, then an error is returned. + This cannot be provided in conjunction with the `certificate_group_ids` + parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource + that matches each of the elements of `certificate_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_ids=certificate_ids, + certificate_names=certificate_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _fixup_list_type_params(['certificate_group_ids', 'certificate_group_names', 'certificate_ids', 'certificate_names'], kwargs) + return self._call_api('CertificateGroupsApi', 'api255_certificate_groups_certificates_post_with_http_info', kwargs) + + def delete_certificate_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete certificate-groups + + Deletes one or more certificate groups from the array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('CertificateGroupsApi', 'api255_certificate_groups_delete_with_http_info', kwargs) + + def get_certificate_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List certificate-groups + + Display all array certificate groups. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('CertificateGroupsApi', 'api255_certificate_groups_get_with_http_info', kwargs) + + def post_certificate_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create certificate-groups + + Creates one or more certificate groups on the array. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('CertificateGroupsApi', 'api255_certificate_groups_post_with_http_info', kwargs) + + def get_certificate_groups_uses( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List certificate-groups/uses + + Lists how certificate groups are being used and by what. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('CertificateGroupsApi', 'api255_certificate_groups_uses_get_with_http_info', kwargs) + + def delete_certificates_certificate_groups( + self, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificate_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If no resource matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Deletes certificates/certificate-groups + + Deletes one or more certificates from one or more certificate groups. + + :param certificates: A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + :type certificates: ReferenceType or List[ReferenceType], optional + :param certificate_groups: A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + :type certificate_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one + resource that matches each of the elements of `certificate_group_ids`, + then an error is returned. This cannot be provided in conjunction with + the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If no resource matches each + of the elements of `certificate_group_names`, then an error is returned. + This cannot be provided in conjunction with the `certificate_group_ids` + parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource + that matches each of the elements of `certificate_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_ids=certificate_ids, + certificate_names=certificate_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _fixup_list_type_params(['certificate_group_ids', 'certificate_group_names', 'certificate_ids', 'certificate_names'], kwargs) + return self._call_api('CertificatesApi', 'api255_certificates_certificate_groups_delete_with_http_info', kwargs) + + def get_certificates_certificate_groups( + self, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificate_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If no resource matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List certificates and certificate-groups + + Lists membership associations between groups and certificates. + + :param certificates: A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + :type certificates: ReferenceType or List[ReferenceType], optional + :param certificate_groups: A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + :type certificate_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one + resource that matches each of the elements of `certificate_group_ids`, + then an error is returned. This cannot be provided in conjunction with + the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If no resource matches each + of the elements of `certificate_group_names`, then an error is returned. + This cannot be provided in conjunction with the `certificate_group_ids` + parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource + that matches each of the elements of `certificate_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_ids=certificate_ids, + certificate_names=certificate_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _fixup_list_type_params(['certificate_group_ids', 'certificate_group_names', 'certificate_ids', 'certificate_names', 'sort'], kwargs) + return self._call_api('CertificatesApi', 'api255_certificates_certificate_groups_get_with_http_info', kwargs) + + def post_certificates_certificate_groups( + self, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificate_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If no resource matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create certificates orcertificate-groups + + Creates one or more certificates to one or more certificate groups. + + :param certificates: A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + :type certificates: ReferenceType or List[ReferenceType], optional + :param certificate_groups: A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + :type certificate_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one + resource that matches each of the elements of `certificate_group_ids`, + then an error is returned. This cannot be provided in conjunction with + the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If no resource matches each + of the elements of `certificate_group_names`, then an error is returned. + This cannot be provided in conjunction with the `certificate_group_ids` + parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource + that matches each of the elements of `certificate_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_ids=certificate_ids, + certificate_names=certificate_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _fixup_list_type_params(['certificate_group_ids', 'certificate_group_names', 'certificate_ids', 'certificate_names'], kwargs) + return self._call_api('CertificatesApi', 'api255_certificates_certificate_groups_post_with_http_info', kwargs) + + def post_certificates_certificate_signing_requests( + self, + certificate: 'models.CertificateSigningRequestPost', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create certificate-signing-requests + + Creates a certificate signing request using a specified certificate and parameters. + + :param certificate: (required) + :type certificate: CertificateSigningRequestPost + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + certificate=certificate, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('CertificatesApi', 'api255_certificates_certificate_signing_requests_post_with_http_info', kwargs) + + def delete_certificates( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete certificate + + Deletes a specific certificate object. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('CertificatesApi', 'api255_certificates_delete_with_http_info', kwargs) + + def get_certificates( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List certificate attributes + + Displays certificate attributes. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('CertificatesApi', 'api255_certificates_get_with_http_info', kwargs) + + def patch_certificates( + self, + certificate: 'models.CertificatePost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + generate_new_key: Annotated[Optional[StrictBool], Field(description="If set to `true`, a new private key is generated when generating a new certificate with the specified attributes. This may not be set to `true` when importing a certificate and private key, and may not be set to `false` when generating a new self-signed certificate to replace a certificate that was imported. Default setting is `false`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify certificates + + Modifies certificate attributes. Modifying self-signed certificate attributes replaces the existing certificate with a new one, generated by Purity//FA, using the specified attributes. + + :param certificate: (required) + :type certificate: CertificatePost + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param generate_new_key: If set to `true`, a new private key is generated when generating a new + certificate with the specified attributes. This may not be set to `true` + when importing a certificate and private key, and may not be set to + `false` when generating a new self-signed certificate to replace a + certificate that was imported. Default setting is `false`. + :type generate_new_key: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + certificate=certificate, + authorization=authorization, + x_request_id=x_request_id, + generate_new_key=generate_new_key, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('CertificatesApi', 'api255_certificates_patch_with_http_info', kwargs) + + def post_certificates( + self, + certificate: 'models.CertificatePost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create certificate + + Creates a certificate object and specifies the valid time period and organization details of the certificate. A certificate can be imported or manually configured. + + :param certificate: (required) + :type certificate: CertificatePost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + certificate=certificate, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('CertificatesApi', 'api255_certificates_post_with_http_info', kwargs) + + def get_certificates_uses( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List certificates uses + + Displays the usage and associations of certificates. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('CertificatesApi', 'api255_certificates_uses_get_with_http_info', kwargs) + + def delete_connections( + self, + volumes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + hosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + host_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + host_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the host group specified. Enter multiple names in comma-separated format. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple host group names and volume names; instead, at least one of the objects (e.g., `host_group_names`) must be set to only one name (e.g., `hgroup01`).")] = None, + host_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the hosts specified. Enter multiple names in comma-separated format. For example, `host01,host02`. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple host names and volume names; instead, at least one of the objects (e.g., `host_names`) must be set to only one name (e.g., `host01`).")] = None, + volume_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified volume. Enter multiple ids in comma-separated format. For example, `vol01id,vol02id`. A request cannot include a mix of multiple objects with multiple IDs. For example, a request cannot include a mix of multiple volume IDs and host names; instead, at least one of the objects (e.g., `volume_ids`) must be set to only one name (e.g., `vol01id`). Only one of the two between `volume_names` and `volume_ids` may be used at a time.")] = None, + volume_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the volume specified. Enter multiple names in comma-separated format. For example, `vol01,vol02`. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple volume names and host names; instead, at least one of the objects (e.g., `volume_names`) must be set to only one name (e.g., `vol01`).")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a connection between a volume and its host or host group + + Deletes the connection between a volume and its associated host or host group. One of `volume_names` or `volume_ids` and one of `host_names` or `host_group_names` query parameters are required. + + :param volumes: A list of volumes to query for. Overrides volume_ids and volume_names keyword arguments. + :type volumes: ReferenceType or List[ReferenceType], optional + :param hosts: A list of hosts to query for. Overrides host_names keyword argument. + :type hosts: ReferenceType or List[ReferenceType], optional + :param host_groups: A list of host_groups to query for. Overrides host_group_names keyword argument. + :type host_groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param host_group_names: Performs the operation on the host group specified. Enter multiple names in + comma-separated format. A request cannot include a mix of multiple objects + with multiple names. For example, a request cannot include a mix of + multiple host group names and volume names; instead, at least one of the + objects (e.g., `host_group_names`) must be set to only one name (e.g., + `hgroup01`). + :type host_group_names: List[str] + :param host_names: Performs the operation on the hosts specified. Enter multiple names in comma- + separated format. For example, `host01,host02`. A request cannot include a + mix of multiple objects with multiple names. For example, a request cannot + include a mix of multiple host names and volume names; instead, at least one + of the objects (e.g., `host_names`) must be set to only one name (e.g., + `host01`). + :type host_names: List[str] + :param volume_ids: Performs the operation on the specified volume. Enter multiple ids in comma- + separated format. For example, `vol01id,vol02id`. A request cannot include a + mix of multiple objects with multiple IDs. For example, a request cannot + include a mix of multiple volume IDs and host names; instead, at least one + of the objects (e.g., `volume_ids`) must be set to only one name (e.g., + `vol01id`). Only one of the two between `volume_names` and `volume_ids` may + be used at a time. + :type volume_ids: List[str] + :param volume_names: Performs the operation on the volume specified. Enter multiple names in comma- + separated format. For example, `vol01,vol02`. A request cannot include a + mix of multiple objects with multiple names. For example, a request cannot + include a mix of multiple volume names and host names; instead, at least + one of the objects (e.g., `volume_names`) must be set to only one name + (e.g., `vol01`). + :type volume_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + host_group_names=host_group_names, + host_names=host_names, + volume_ids=volume_ids, + volume_names=volume_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(host_groups, ['host_group_names'], kwargs) + _process_references(hosts, ['host_names'], kwargs) + _process_references(volumes, ['volume_ids', 'volume_names'], kwargs) + _fixup_list_type_params(['context_names', 'host_group_names', 'host_names', 'volume_ids', 'volume_names'], kwargs) + return self._call_api('ConnectionsApi', 'api255_connections_delete_with_http_info', kwargs) + + def get_connections( + self, + volumes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + protocol_endpoints: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + hosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + host_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + host_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the host group specified. Enter multiple names in comma-separated format. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple host group names and volume names; instead, at least one of the objects (e.g., `host_group_names`) must be set to only one name (e.g., `hgroup01`).")] = None, + host_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the hosts specified. Enter multiple names in comma-separated format. For example, `host01,host02`. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple host names and volume names; instead, at least one of the objects (e.g., `host_names`) must be set to only one name (e.g., `host01`).")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol_endpoint_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the protocol endpoints specified. Enter multiple IDs in comma-separated format. For example, `peid01,peid02`. A request cannot include a mix of multiple objects with multiple IDs. For example, a request cannot include a mix of multiple protocol endpoint IDs and host names. Instead, at least one of the objects (e.g., `protocol_endpoint_ids`) must be set to one ID (e.g., `peid01`).")] = None, + protocol_endpoint_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the protocol endpoints specified. Enter multiple names in comma-separated format. For example, `pe01,pe02`. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple protocol endpoint names and host names; instead, at least one of the objects (e.g., `protocol_endpoint_names`) must be set to one name (e.g., `pe01`).")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + volume_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified volume. Enter multiple ids in comma-separated format. For example, `vol01id,vol02id`. A request cannot include a mix of multiple objects with multiple IDs. For example, a request cannot include a mix of multiple volume IDs and host names; instead, at least one of the objects (e.g., `volume_ids`) must be set to only one name (e.g., `vol01id`). Only one of the two between `volume_names` and `volume_ids` may be used at a time.")] = None, + volume_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the volume specified. Enter multiple names in comma-separated format. For example, `vol01,vol02`. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple volume names and host names; instead, at least one of the objects (e.g., `volume_names`) must be set to only one name (e.g., `vol01`).")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume connections + + Displays a list of connections between a volume and its hosts and host groups, as well as the logical unit numbers (LUNs) or NVMe Namespace IDs (NSIDs) used by the associated hosts to address these volumes. + + :param volumes: A list of volumes to query for. Overrides volume_ids and volume_names keyword arguments. + :type volumes: ReferenceType or List[ReferenceType], optional + :param protocol_endpoints: A list of protocol_endpoints to query for. Overrides protocol_endpoint_ids and protocol_endpoint_names keyword arguments. + :type protocol_endpoints: ReferenceType or List[ReferenceType], optional + :param hosts: A list of hosts to query for. Overrides host_names keyword argument. + :type hosts: ReferenceType or List[ReferenceType], optional + :param host_groups: A list of host_groups to query for. Overrides host_group_names keyword argument. + :type host_groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param host_group_names: Performs the operation on the host group specified. Enter multiple names in + comma-separated format. A request cannot include a mix of multiple objects + with multiple names. For example, a request cannot include a mix of + multiple host group names and volume names; instead, at least one of the + objects (e.g., `host_group_names`) must be set to only one name (e.g., + `hgroup01`). + :type host_group_names: List[str] + :param host_names: Performs the operation on the hosts specified. Enter multiple names in comma- + separated format. For example, `host01,host02`. A request cannot include a + mix of multiple objects with multiple names. For example, a request cannot + include a mix of multiple host names and volume names; instead, at least one + of the objects (e.g., `host_names`) must be set to only one name (e.g., + `host01`). + :type host_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol_endpoint_ids: Performs the operation on the protocol endpoints specified. Enter multiple IDs + in comma-separated format. For example, `peid01,peid02`. A request cannot + include a mix of multiple objects with multiple IDs. For example, a + request cannot include a mix of multiple protocol endpoint IDs and host + names. Instead, at least one of the objects (e.g., + `protocol_endpoint_ids`) must be set to one ID (e.g., `peid01`). + :type protocol_endpoint_ids: List[str] + :param protocol_endpoint_names: Performs the operation on the protocol endpoints specified. Enter multiple names + in comma-separated format. For example, `pe01,pe02`. A request cannot + include a mix of multiple objects with multiple names. For example, a + request cannot include a mix of multiple protocol endpoint names and + host names; instead, at least one of the objects (e.g., + `protocol_endpoint_names`) must be set to one name (e.g., `pe01`). + :type protocol_endpoint_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param volume_ids: Performs the operation on the specified volume. Enter multiple ids in comma- + separated format. For example, `vol01id,vol02id`. A request cannot include a + mix of multiple objects with multiple IDs. For example, a request cannot + include a mix of multiple volume IDs and host names; instead, at least one + of the objects (e.g., `volume_ids`) must be set to only one name (e.g., + `vol01id`). Only one of the two between `volume_names` and `volume_ids` may + be used at a time. + :type volume_ids: List[str] + :param volume_names: Performs the operation on the volume specified. Enter multiple names in comma- + separated format. For example, `vol01,vol02`. A request cannot include a + mix of multiple objects with multiple names. For example, a request cannot + include a mix of multiple volume names and host names; instead, at least + one of the objects (e.g., `volume_names`) must be set to only one name + (e.g., `vol01`). + :type volume_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + host_group_names=host_group_names, + host_names=host_names, + limit=limit, + offset=offset, + protocol_endpoint_ids=protocol_endpoint_ids, + protocol_endpoint_names=protocol_endpoint_names, + sort=sort, + total_item_count=total_item_count, + volume_ids=volume_ids, + volume_names=volume_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(host_groups, ['host_group_names'], kwargs) + _process_references(hosts, ['host_names'], kwargs) + _process_references(protocol_endpoints, ['protocol_endpoint_ids', 'protocol_endpoint_names'], kwargs) + _process_references(volumes, ['volume_ids', 'volume_names'], kwargs) + _fixup_list_type_params(['context_names', 'host_group_names', 'host_names', 'protocol_endpoint_ids', 'protocol_endpoint_names', 'sort', 'volume_ids', 'volume_names'], kwargs) + return self._call_api('ConnectionsApi', 'api255_connections_get_with_http_info', kwargs) + + def post_connections( + self, + volumes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + hosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + host_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + host_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the host group specified. Enter multiple names in comma-separated format. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple host group names and volume names; instead, at least one of the objects (e.g., `host_group_names`) must be set to only one name (e.g., `hgroup01`).")] = None, + host_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the hosts specified. Enter multiple names in comma-separated format. For example, `host01,host02`. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple host names and volume names; instead, at least one of the objects (e.g., `host_names`) must be set to only one name (e.g., `host01`).")] = None, + volume_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified volume. Enter multiple ids in comma-separated format. For example, `vol01id,vol02id`. A request cannot include a mix of multiple objects with multiple IDs. For example, a request cannot include a mix of multiple volume IDs and host names; instead, at least one of the objects (e.g., `volume_ids`) must be set to only one name (e.g., `vol01id`). Only one of the two between `volume_names` and `volume_ids` may be used at a time.")] = None, + volume_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the volume specified. Enter multiple names in comma-separated format. For example, `vol01,vol02`. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple volume names and host names; instead, at least one of the objects (e.g., `volume_names`) must be set to only one name (e.g., `vol01`).")] = None, + connection: Optional['models.ConnectionPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a connection between a volume and host or host group + + Creates a connection between a volume and a host or host group. One of `volume_names` or `volume_ids` and one of `host_names` or `host_group_names` query parameters are required. + + :param volumes: A list of volumes to query for. Overrides volume_ids and volume_names keyword arguments. + :type volumes: ReferenceType or List[ReferenceType], optional + :param hosts: A list of hosts to query for. Overrides host_names keyword argument. + :type hosts: ReferenceType or List[ReferenceType], optional + :param host_groups: A list of host_groups to query for. Overrides host_group_names keyword argument. + :type host_groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param host_group_names: Performs the operation on the host group specified. Enter multiple names in + comma-separated format. A request cannot include a mix of multiple objects + with multiple names. For example, a request cannot include a mix of + multiple host group names and volume names; instead, at least one of the + objects (e.g., `host_group_names`) must be set to only one name (e.g., + `hgroup01`). + :type host_group_names: List[str] + :param host_names: Performs the operation on the hosts specified. Enter multiple names in comma- + separated format. For example, `host01,host02`. A request cannot include a + mix of multiple objects with multiple names. For example, a request cannot + include a mix of multiple host names and volume names; instead, at least one + of the objects (e.g., `host_names`) must be set to only one name (e.g., + `host01`). + :type host_names: List[str] + :param volume_ids: Performs the operation on the specified volume. Enter multiple ids in comma- + separated format. For example, `vol01id,vol02id`. A request cannot include a + mix of multiple objects with multiple IDs. For example, a request cannot + include a mix of multiple volume IDs and host names; instead, at least one + of the objects (e.g., `volume_ids`) must be set to only one name (e.g., + `vol01id`). Only one of the two between `volume_names` and `volume_ids` may + be used at a time. + :type volume_ids: List[str] + :param volume_names: Performs the operation on the volume specified. Enter multiple names in comma- + separated format. For example, `vol01,vol02`. A request cannot include a + mix of multiple objects with multiple names. For example, a request cannot + include a mix of multiple volume names and host names; instead, at least + one of the objects (e.g., `volume_names`) must be set to only one name + (e.g., `vol01`). + :type volume_names: List[str] + :param connection: + :type connection: ConnectionPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + host_group_names=host_group_names, + host_names=host_names, + volume_ids=volume_ids, + volume_names=volume_names, + connection=connection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(host_groups, ['host_group_names'], kwargs) + _process_references(hosts, ['host_names'], kwargs) + _process_references(volumes, ['volume_ids', 'volume_names'], kwargs) + _fixup_list_type_params(['context_names', 'host_group_names', 'host_names', 'volume_ids', 'volume_names'], kwargs) + return self._call_api('ConnectionsApi', 'api255_connections_post_with_http_info', kwargs) + + def get_container_default_protections( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the container ID specified. Enter multiple source IDs in comma-separated format. The `ids` or `names` parameter is required, but they cannot be set together. Specifying `ids` or `names` with no value will perform the operation on local array.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique container name specified. Enter multiple names in comma-separated format. The `ids` or `names` parameter is required, but they cannot be set together. Specifying `ids` or `names` with no value will perform the operation on local array.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List container default protections + + Displays a list of containers with its default protections. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: Performs the operation on the container ID specified. Enter multiple source IDs + in comma-separated format. The `ids` or `names` parameter is required, but + they cannot be set together. Specifying `ids` or `names` with no value will + perform the operation on local array. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique container name specified. Enter multiple + names in comma-separated format. The `ids` or `names` parameter is required, + but they cannot be set together. Specifying `ids` or `names` with no value + will perform the operation on local array. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ContainerDefaultProtectionsApi', 'api255_container_default_protections_get_with_http_info', kwargs) + + def patch_container_default_protections( + self, + container_default_protection: 'models.ContainerDefaultProtection', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the container ID specified. Enter multiple source IDs in comma-separated format. The `ids` or `names` parameter is required, but they cannot be set together. Specifying `ids` or `names` with no value will perform the operation on local array.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique container name specified. Enter multiple names in comma-separated format. The `ids` or `names` parameter is required, but they cannot be set together. Specifying `ids` or `names` with no value will perform the operation on local array.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a container's default protections + + Modifies a container's default protections. To modify, set `default_protections` to the new list. + + :param container_default_protection: (required) + :type container_default_protection: ContainerDefaultProtection + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the container ID specified. Enter multiple source IDs + in comma-separated format. The `ids` or `names` parameter is required, but + they cannot be set together. Specifying `ids` or `names` with no value will + perform the operation on local array. + :type ids: List[str] + :param names: Performs the operation on the unique container name specified. Enter multiple + names in comma-separated format. The `ids` or `names` parameter is required, + but they cannot be set together. Specifying `ids` or `names` with no value + will perform the operation on local array. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + container_default_protection=container_default_protection, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ContainerDefaultProtectionsApi', 'api255_container_default_protections_patch_with_http_info', kwargs) + + def get_controllers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List controller information and status + + Displays the name, mode, FlashArray model, Purity//FA software version, and status of each controller in the array. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('ControllersApi', 'api255_controllers_get_with_http_info', kwargs) + + def delete_dns( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete DNS configuration + + Deletes DNS configuration identified by configuration name. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('DNSApi', 'api255_dns_delete_with_http_info', kwargs) + + def get_dns( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List DNS parameters + + Displays the current DNS configurations and their parameters including domain suffix, the list of DNS name server IP addresses, and the list of services that DNS parameters apply to. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('DNSApi', 'api255_dns_get_with_http_info', kwargs) + + def patch_dns( + self, + dns: 'models.DnsPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify DNS parameters + + Modifies the DNS parameters of an array, including the domain suffix, the list of DNS name server IP addresses, and the list of services that DNS parameters apply to. If there is no DNS configuration beforehand new DNS configuration with 'default' name is created. If more than one DNS configuration exists, `name` has to be specified to identify the DNS configuration to be modified. + + :param dns: (required) + :type dns: DnsPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + dns=dns, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('DNSApi', 'api255_dns_patch_with_http_info', kwargs) + + def post_dns( + self, + dns: 'models.DnsPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create DNS configuration + + Creates new DNS configuration with parameters including the domain suffix, the list of DNS name server IP addresses, and the list of services that DNS parameters apply to. + + :param dns: (required) + :type dns: DnsPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + dns=dns, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('DNSApi', 'api255_dns_post_with_http_info', kwargs) + + def get_data_sealing_keys( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List data sealing keys + + The list of `data sealing keys` configured for the `realm`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DataSealingKeysApi', 'api255_data_sealing_keys_get_with_http_info', kwargs) + + def patch_data_sealing_keys( + self, + data_sealing_key_patch: 'models.DataSealingKeyPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify data sealing keys + + The modification of `data sealing keys`. `Keys` can be `enabled` or `disabled` to unseal or seal the matching `data-isolated realms`. The `key material` can also be rotated. + + :param data_sealing_key_patch: (required) + :type data_sealing_key_patch: DataSealingKeyPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + data_sealing_key_patch=data_sealing_key_patch, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DataSealingKeysApi', 'api255_data_sealing_keys_patch_with_http_info', kwargs) + + def post_data_sealing_keys( + self, + data_sealing_key: 'models.DataSealingKeyPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create data sealing keys + + The creation of `data sealing keys` for `data-isolated realms`. The `key` can be stored on an external `key management server` (e.g., `KMIP`), or provided as `keying material`. The `names` parameter is required and must specify the fully qualified name in the format `realm_name::data_sealing_key`. + + :param data_sealing_key: (required) + :type data_sealing_key: DataSealingKeyPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + data_sealing_key=data_sealing_key, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('DataSealingKeysApi', 'api255_data_sealing_keys_post_with_http_info', kwargs) + + def post_data_sealing_keys_rotate( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + data_sealing_key: Optional['models.DataSealingKeyRotate'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Rotate data sealing keys + + The rotation of the keying material for `data sealing keys`. For `remote keys`, the `key` is automatically rotated on the external `key management server` and no `request body` is required. For `local-in-memory keys`, both the `new keying material` and the `old keying material` must be provided in the `request body`. The `names` parameter is required and must specify the fully qualified name in the format `realm_name::data_sealing_key`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param data_sealing_key: + :type data_sealing_key: DataSealingKeyRotate + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + data_sealing_key=data_sealing_key, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DataSealingKeysApi', 'api255_data_sealing_keys_rotate_post_with_http_info', kwargs) + + def get_data_sealing_keys_test( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Test data sealing key remote connectivity + + The connectivity test between the `FlashArray` and the external `key management server` associated with the specified `data sealing key`. This process verifies that the `server` is reachable and that the `data sealing key` can be accessed. The `names` parameter is required and must specify the fully qualified name in the format `realm-name::data-sealing-key`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DataSealingKeysApi', 'api255_data_sealing_keys_test_get_with_http_info', kwargs) + + def delete_directories( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete managed directories + + Deletes one or more managed directories. To be deleted, a managed directory must be empty and not attached to any enabled export policies. Deleted managed directories cannot be recovered. The `ids` or `names` parameter is required, but cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_delete_with_http_info', kwargs) + + def get_directories( + self, + workloads: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + file_systems: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + file_system_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together.")] = None, + file_system_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + workload_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter.")] = None, + workload_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directories + + Displays a list of directories, including those pending eradication. + + :param workloads: A list of workloads to query for. Overrides workload_ids and workload_names keyword arguments. + :type workloads: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param file_systems: A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + :type file_systems: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param file_system_ids: Performs the operation on the file system ID specified. Enter multiple file + system IDs in comma-separated format. The `file_system_ids` or + `file_system_names` parameter is required, but they cannot be set + together. + :type file_system_ids: List[str] + :param file_system_names: Performs the operation on the file system name specified. Enter multiple file + system names in comma-separated format. For example, + `filesystem01,filesystem02`. + :type file_system_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :param workload_ids: A comma-separated list of workload IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_names` query + parameter. + :type workload_ids: List[str] + :param workload_names: A comma-separated list of workload names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_ids` query + parameter. + :type workload_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + workload_ids=workload_ids, + workload_names=workload_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(workloads, ['workload_ids', 'workload_names'], kwargs) + _fixup_list_type_params(['context_names', 'file_system_ids', 'file_system_names', 'ids', 'names', 'sort', 'workload_ids', 'workload_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_get_with_http_info', kwargs) + + def get_directories_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + file_systems: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + file_system_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together.")] = None, + file_system_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the groups that match the given list of gids. Enter names in a comma-separated format, e.g., `2001,2002`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List group with content in directories + + Displays a list of groups, that have content in specific directories. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param file_systems: A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + :type file_systems: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param file_system_ids: Performs the operation on the file system ID specified. Enter multiple file + system IDs in comma-separated format. The `file_system_ids` or + `file_system_names` parameter is required, but they cannot be set + together. + :type file_system_ids: List[str] + :param file_system_names: Performs the operation on the file system name specified. Enter multiple file + system names in comma-separated format. For example, + `filesystem01,filesystem02`. + :type file_system_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: Performs the operation on the groups that match the given list of gids. Enter + names in a comma-separated format, e.g., `2001,2002`. + :type group_ids: List[int] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + group_sids=group_sids, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'file_system_ids', 'file_system_names', 'group_ids', 'group_names', 'group_sids', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_groups_get_with_http_info', kwargs) + + def post_directories_locks_nlm_reclamations( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create NLM reclamation + + Creates an NLM reclamation, which is a system-wide operation that affects all clients, so only one may be in progress at a time. Attempting to initiate reclamation while one is in progress will result in an error. When NLM reclamation is initiated, all NLM locks are deleted and client applications are notified that they can reacquire their locks within a grace period. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_locks_nlm_reclamations_post_with_http_info', kwargs) + + def patch_directories( + self, + directory: 'models.DirectoryPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a managed directory + + Modifies a managed directory. To rename a managed directory, set `name` to the new name. The `ids` or `names` parameter is required, but cannot be set together. The `name` or `directory_name` parameter is required. + + :param directory: (required) + :type directory: DirectoryPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + directory=directory, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_patch_with_http_info', kwargs) + + def get_directories_performance_by_array( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directories performance data by array + + The real-time and historical `performance data`, real-time `latency data`, and average `I/O size data`. The `data` is displayed as a total across all `directories` on the `local array` and by individual `directory`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`. + :type protocol: str + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + protocol=protocol, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_performance_by_array_get_with_http_info', kwargs) + + def get_directories_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`.")] = None, + protocol_group: Annotated[Optional[StrictStr], Field(description="Protocol group type. Valid values are `block`, `file`, `object-store`, and `all`.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directory performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes for each directory and as a total of all directories across the entire array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`. + :type protocol: str + :param protocol_group: Protocol group type. Valid values are `block`, `file`, `object-store`, and + `all`. + :type protocol_group: str + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + protocol=protocol, + protocol_group=protocol_group, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_performance_get_with_http_info', kwargs) + + def delete_directories_policies_audit_file( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more audit policies + + Deletes a membership between a directory and one or more audit policies. Either the `policy_ids` or `policy_names` parameter is required, but they cannot be set together. Either the `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_audit_file_delete_with_http_info', kwargs) + + def get_directories_policies_audit_file( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List audit policies attached to a directory + + Displays a list of audit policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_audit_file_get_with_http_info', kwargs) + + def post_directories_policies_audit_file( + self, + policies: 'models.DirectoryPolicyPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory and one or more audit policies + + Creates a membership between a directory and one or more audit policies. Either the `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_audit_file_post_with_http_info', kwargs) + + def delete_directories_policies_autodir( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more auto managed directory policies + + Deletes a membership between a directory with one or more auto managed directory policies. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_autodir_delete_with_http_info', kwargs) + + def get_directories_policies_autodir( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List auto managed directory policies attached to a directory + + Displays a list of auto managed directory policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_autodir_get_with_http_info', kwargs) + + def post_directories_policies_autodir( + self, + policies: 'models.DirectoryPolicyPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory with one or more auto managed directory policies + + Creates a membership between a directory with one or more auto managed directory policies. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_autodir_post_with_http_info', kwargs) + + def get_directories_policies( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List policies + + Displays a list of policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_get_with_http_info', kwargs) + + def delete_directories_policies_nfs( + self, + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + server_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of server IDs.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more NFS policies + + Deletes a membership between a directory and one or more NFS policies. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param servers: A list of servers to query for. Overrides server_ids and server_names keyword arguments. + :type servers: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param server_ids: A comma-separated list of server IDs. + :type server_ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + server_ids=server_ids, + server_names=server_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(servers, ['server_ids', 'server_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'server_ids', 'server_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_nfs_delete_with_http_info', kwargs) + + def get_directories_policies_nfs( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List NFS policies attached to a directory + + Displays a list of NFS policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_nfs_get_with_http_info', kwargs) + + def post_directories_policies_nfs( + self, + policies: 'models.DirectoryPolicyExportPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory and one or more NFS policies + + Creates a membership between a directory and one or more NFS policies. The `member_ids` or `member_names` parameter is required but cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyExportPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_nfs_post_with_http_info', kwargs) + + def delete_directories_policies_qos( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more QoS policies + + The operation that deletes a `membership` between a `directory` and one or more `QoS policies` by detaching them. For this request, either `policy_ids` or `policy_names` must be provided, and either `member_ids` or `member_names` must be provided; however, the ID and name parameters for each respective category cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_qos_delete_with_http_info', kwargs) + + def get_directories_policies_qos( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List QoS policies attached to a directory + + The operation that displays a list of `QoS policies` that are attached to `directories`. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_qos_get_with_http_info', kwargs) + + def post_directories_policies_qos( + self, + policies: 'models.DirectoryPolicyPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory and one or more QoS policies + + The operation that creates a `membership` between a `directory` and one or more `QoS policies` by attaching them. Either the `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_qos_post_with_http_info', kwargs) + + def delete_directories_policies_quota( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more quota policies + + Deletes a membership between a directory and one or more quota policies. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_quota_delete_with_http_info', kwargs) + + def get_directories_policies_quota( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List quota policies attached to a directory + + Displays a list of quota policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_quota_get_with_http_info', kwargs) + + def post_directories_policies_quota( + self, + policies: 'models.DirectoryPolicyPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory and one or more quota policies + + Creates a membership between a directory and one or more quota policies. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for quota management operations. If set to `true`, + directory usage is not checked against the `quota_limits` that are set. If + set to `false`, the actual logical bytes in use are prevented from + exceeding the limits set on the directory. Client operations might be + impacted. If the limit exceeds the quota, the client operation is not + allowed. If not specified, defaults to `false`. + :type ignore_usage: bool + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_quota_post_with_http_info', kwargs) + + def delete_directories_policies_smb( + self, + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + server_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of server IDs.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more SMB policies + + Deletes a membership between a directory and one or more SMB policies. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param servers: A list of servers to query for. Overrides server_ids and server_names keyword arguments. + :type servers: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param server_ids: A comma-separated list of server IDs. + :type server_ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + server_ids=server_ids, + server_names=server_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(servers, ['server_ids', 'server_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'server_ids', 'server_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_smb_delete_with_http_info', kwargs) + + def get_directories_policies_smb( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SMB policies attached to a directory + + Displays a list of SMB policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_smb_get_with_http_info', kwargs) + + def post_directories_policies_smb( + self, + policies: 'models.DirectoryPolicyExportPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory and one or more SMB policies + + Creates a membership between a directory and one or more SMB policies. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyExportPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_smb_post_with_http_info', kwargs) + + def delete_directories_policies_snapshot( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more snapshot policies + + Deletes a membership between a directory and one or more snapshot policies. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_snapshot_delete_with_http_info', kwargs) + + def get_directories_policies_snapshot( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List snapshot policies attached to a directory + + Displays a list of snapshot policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_snapshot_get_with_http_info', kwargs) + + def post_directories_policies_snapshot( + self, + policies: 'models.DirectoryPolicyPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory with one or more snapshot policies + + Creates a membership between a directory with one or more snapshot policies. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_snapshot_post_with_http_info', kwargs) + + def delete_directories_policies_user_group_quota( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more user-group-quota policies + + Deletes a membership between a directory and one or more user-group-quota policies. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_user_group_quota_delete_with_http_info', kwargs) + + def get_directories_policies_user_group_quota( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List user-group-quota policies attached to a directory + + Displays a list of user-group-quota policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_user_group_quota_get_with_http_info', kwargs) + + def post_directories_policies_user_group_quota( + self, + policies: 'models.DirectoryPolicyPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory and one or more user-group-quota policies + + Creates a membership between a directory and one or more user-group-quota policies. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_policies_user_group_quota_post_with_http_info', kwargs) + + def post_directories( + self, + directory: 'models.DirectoryPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + file_systems: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + add_to_policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + add_to_policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The managed directories will become members of the specified policies along with creation. Enter multiple ids in comma-separated format.")] = None, + add_to_policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="The managed directories will become members of the specified policies along with creation. Enter multiple names in a comma-separated format.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + file_system_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together.")] = None, + file_system_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the initial protection of the newly created managed directories will be the union of the container default protection policies thatare not already applied to any of their ancestors, and either `add_to_policy_names` or `add_to_policy_ids`. If specified as `false`, the default protection of the container will not be applied automatically. The initial protection of the newly created managed directories will be configured by either `add_to_policy_names` or `add_to_policy_ids`. If not specified, defaults to `true`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create or copy directory + + The operation that creates a `managed directory` at the specified path. The `managed directory` name must consist of a `file system` name prefix and a `managed directory` name suffix, separated by a colon (:). The suffix must be between 1 and 63 characters (alphanumeric and '-') in length and must begin and end with a letter or number. Additionally, the suffix must include at least one letter or '-'. Users must either set `names` to create a `managed directory` with a specified full name, or set `file_system_names` or `file_system_ids` in the query parameters along with `suffix` in the body parameters; these two options are mutually exclusive. The `add_to_policy_names` and `add_to_policy_ids` query parameters specify a list of policy names or IDs to apply to the new `managed directory` and are mutually exclusive. The `with_default_protection` parameter specifies whether to use the container default protection. Note that `add_to_policy_names` and `with_default_protection` cannot be provided when `overwrite` is `true`. + + :param directory: (required) + :type directory: DirectoryPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param file_systems: A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + :type file_systems: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param add_to_policies: A list of add_to_policies to query for. Overrides add_to_policy_ids and add_to_policy_names keyword arguments. + :type add_to_policies: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param add_to_policy_ids: The managed directories will become members of the specified policies along with + creation. Enter multiple ids in comma-separated format. + :type add_to_policy_ids: List[str] + :param add_to_policy_names: The managed directories will become members of the specified policies along with + creation. Enter multiple names in a comma-separated format. + :type add_to_policy_names: List[str] + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param file_system_ids: Performs the operation on the file system ID specified. Enter multiple file + system IDs in comma-separated format. The `file_system_ids` or + `file_system_names` parameter is required, but they cannot be set + together. + :type file_system_ids: List[str] + :param file_system_names: Performs the operation on the file system name specified. Enter multiple file + system names in comma-separated format. For example, + `filesystem01,filesystem02`. + :type file_system_names: List[str] + :param ignore_usage: Flag used to override checks for quota management operations. If set to `true`, + directory usage is not checked against the `quota_limits` that are set. If + set to `false`, the actual logical bytes in use are prevented from + exceeding the limits set on the directory. Client operations might be + impacted. If the limit exceeds the quota, the client operation is not + allowed. If not specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :param with_default_protection: If specified as `true`, the initial protection of the newly created managed + directories will be the union of the container default protection + policies thatare not already applied to any of their ancestors, and + either `add_to_policy_names` or `add_to_policy_ids`. If specified as + `false`, the default protection of the container will not be applied + automatically. The initial protection of the newly created managed + directories will be configured by either `add_to_policy_names` or + `add_to_policy_ids`. If not specified, defaults to `true`. + :type with_default_protection: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + directory=directory, + authorization=authorization, + x_request_id=x_request_id, + add_to_policy_ids=add_to_policy_ids, + add_to_policy_names=add_to_policy_names, + context_names=context_names, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + ignore_usage=ignore_usage, + names=names, + overwrite=overwrite, + with_default_protection=with_default_protection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(add_to_policies, ['add_to_policy_ids', 'add_to_policy_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['add_to_policy_ids', 'add_to_policy_names', 'context_names', 'file_system_ids', 'file_system_names', 'names'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_post_with_http_info', kwargs) + + def get_directories_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directory QoS policy configurations + + The operation that displays real-time and historical `QoS policy configurations` for each `directory`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_qos_get_with_http_info', kwargs) + + def get_directories_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directory space information + + Displays physical storage consumption data for each directory. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_space_get_with_http_info', kwargs) + + def get_directories_users( + self, + users: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + file_systems: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + file_system_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together.")] = None, + file_system_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + user_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the users that match the given list of uids. Enter names in a comma-separated format, for example, `1001,1002`.")] = None, + user_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the users that match the given list of user names. Enter names in a comma-separated format, for example, `u1,u2`.")] = None, + user_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the users that match the given list of user SIDs. Enter SIDs in a comma-separated format, for example, `S-1-1-20-1000,S-1-1-20-2002`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List users with content in directories + + Displays a list of users that have content in specific directories. + + :param users: A list of users to query for. Overrides user_ids and user_names keyword arguments. + :type users: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param file_systems: A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + :type file_systems: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param file_system_ids: Performs the operation on the file system ID specified. Enter multiple file + system IDs in comma-separated format. The `file_system_ids` or + `file_system_names` parameter is required, but they cannot be set + together. + :type file_system_ids: List[str] + :param file_system_names: Performs the operation on the file system name specified. Enter multiple file + system names in comma-separated format. For example, + `filesystem01,filesystem02`. + :type file_system_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param user_ids: Performs the operation on the users that match the given list of uids. Enter + names in a comma-separated format, for example, `1001,1002`. + :type user_ids: List[int] + :param user_names: Performs the operation on the users that match the given list of user names. + Enter names in a comma-separated format, for example, `u1,u2`. + :type user_names: List[str] + :param user_sids: Performs the operation on the users that match the given list of user SIDs. + Enter SIDs in a comma-separated format, for example, + `S-1-1-20-1000,S-1-1-20-2002`. + :type user_sids: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + user_ids=user_ids, + user_names=user_names, + user_sids=user_sids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(users, ['user_ids', 'user_names'], kwargs) + _fixup_list_type_params(['context_names', 'file_system_ids', 'file_system_names', 'ids', 'names', 'sort', 'user_ids', 'user_names', 'user_sids'], kwargs) + return self._call_api('DirectoriesApi', 'api255_directories_users_get_with_http_info', kwargs) + + def delete_directory_exports( + self, + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + exports: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`.")] = None, + export_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the export names specified. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. Combines the export containment hierarchy (server), the protocol (smb or nfs) and the export_name. For example, `server01::smb::export01,server01::nfs::export01`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + server_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of server IDs.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete directory exports + + Deletes one or more directory exports. If any of the `export_names` is not unique across the system, `policy_ids` or `policy_names` must be specified to determine the exports. When server reference is not provided, the `_array_server` is set as effective default. The API provides two options for identifying an export object. One option is to reference it by its fully qualified export name, or alternatively, by a combination of parameters-specifically, the `server_names` (or `server_ids`) and `export_names`. All identifying parameters must always be provided, either explicitly or as part of the fully qualified name. + + :param servers: A list of servers to query for. Overrides server_ids and server_names keyword arguments. + :type servers: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param exports: A list of exports to query for. Overrides export_names keyword argument. + :type exports: ReferenceType or List[ReferenceType], optional + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. The name is + expected to be fully qualified, meaning if the object is contained in some + context, the corresponding name would provide complete information about + the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`. + :type directory_names: List[str] + :param export_names: Performs the operation on the export names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. + :type export_names: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. Combines the export containment hierarchy (server), + the protocol (smb or nfs) and the export_name. For example, + `server01::smb::export01,server01::nfs::export01`. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param server_ids: A comma-separated list of server IDs. + :type server_ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + directory_ids=directory_ids, + directory_names=directory_names, + export_names=export_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + server_ids=server_ids, + server_names=server_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _process_references(exports, ['export_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(servers, ['server_ids', 'server_names'], kwargs) + _fixup_list_type_params(['context_names', 'directory_ids', 'directory_names', 'export_names', 'names', 'policy_ids', 'policy_names', 'server_ids', 'server_names'], kwargs) + return self._call_api('DirectoryExportsApi', 'api255_directory_exports_delete_with_http_info', kwargs) + + def get_directory_exports( + self, + workloads: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + exports: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`.")] = None, + export_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the export names specified. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. Combines the export containment hierarchy (server), the protocol (smb or nfs) and the export_name. For example, `server01::smb::export01,server01::nfs::export01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + workload_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter.")] = None, + workload_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directory exports + + Displays a list of directory exports. + + :param workloads: A list of workloads to query for. Overrides workload_ids and workload_names keyword arguments. + :type workloads: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param exports: A list of exports to query for. Overrides export_names keyword argument. + :type exports: ReferenceType or List[ReferenceType], optional + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. The name is + expected to be fully qualified, meaning if the object is contained in some + context, the corresponding name would provide complete information about + the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`. + :type directory_names: List[str] + :param export_names: Performs the operation on the export names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. + :type export_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. Combines the export containment hierarchy (server), + the protocol (smb or nfs) and the export_name. For example, + `server01::smb::export01,server01::nfs::export01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param workload_ids: A comma-separated list of workload IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_names` query + parameter. + :type workload_ids: List[str] + :param workload_names: A comma-separated list of workload names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_ids` query + parameter. + :type workload_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + directory_ids=directory_ids, + directory_names=directory_names, + export_names=export_names, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + workload_ids=workload_ids, + workload_names=workload_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _process_references(exports, ['export_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(workloads, ['workload_ids', 'workload_names'], kwargs) + _fixup_list_type_params(['context_names', 'directory_ids', 'directory_names', 'export_names', 'names', 'policy_ids', 'policy_names', 'sort', 'workload_ids', 'workload_names'], kwargs) + return self._call_api('DirectoryExportsApi', 'api255_directory_exports_get_with_http_info', kwargs) + + def patch_directory_exports( + self, + export: 'models.DirectoryExportPatch', + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + exports: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`.")] = None, + export_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the export names specified. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. Combines the export containment hierarchy (server), the protocol (smb or nfs) and the export_name. For example, `server01::smb::export01,server01::nfs::export01`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + server_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of server IDs.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify directory exports + + Modifies a directory export. Used for manually renaming, enabling, and disabling directory exports. To rename a directory export, set 'export_name' to the new name. When server reference is not provided, the `_array_server` is set as effective default. The API provides two options for identifying an export object. One option is to reference it by its fully qualified export name, or alternatively, by a combination of parameters—specifically, the `server` and `export_name`. All identifying parameters must always be provided, either explicitly or as part of the fully qualified name. + + :param export: (required) + :type export: DirectoryExportPatch + :param servers: A list of servers to query for. Overrides server_ids and server_names keyword arguments. + :type servers: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param exports: A list of exports to query for. Overrides export_names keyword argument. + :type exports: ReferenceType or List[ReferenceType], optional + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. The name is + expected to be fully qualified, meaning if the object is contained in some + context, the corresponding name would provide complete information about + the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`. + :type directory_names: List[str] + :param export_names: Performs the operation on the export names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. + :type export_names: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. Combines the export containment hierarchy (server), + the protocol (smb or nfs) and the export_name. For example, + `server01::smb::export01,server01::nfs::export01`. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param server_ids: A comma-separated list of server IDs. + :type server_ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + export=export, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + directory_ids=directory_ids, + directory_names=directory_names, + export_names=export_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + server_ids=server_ids, + server_names=server_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _process_references(exports, ['export_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(servers, ['server_ids', 'server_names'], kwargs) + _fixup_list_type_params(['context_names', 'directory_ids', 'directory_names', 'export_names', 'names', 'policy_ids', 'policy_names', 'server_ids', 'server_names'], kwargs) + return self._call_api('DirectoryExportsApi', 'api255_directory_exports_patch_with_http_info', kwargs) + + def post_directory_exports( + self, + exports: 'models.DirectoryExportPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. Combines the export containment hierarchy (server), the protocol (smb or nfs) and the export_name. For example, `server01::smb::export01,server01::nfs::export01`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create directory exports + + Creates an export of a managed directory. The `directory_ids` or `directory_names` parameter is required, but cannot be set together. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. When server reference is not provided, the `_array_server` is set as effective default. The API provides two options for identifying an export object. One option is to reference it by its fully qualified export name, or alternatively, by a combination of parameters—specifically, the `server` and `export_name`. All identifying parameters must always be provided, either explicitly or as part of the fully qualified name. + + :param exports: (required) + :type exports: DirectoryExportPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. The name is + expected to be fully qualified, meaning if the object is contained in some + context, the corresponding name would provide complete information about + the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`. + :type directory_names: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. Combines the export containment hierarchy (server), + the protocol (smb or nfs) and the export_name. For example, + `server01::smb::export01,server01::nfs::export01`. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + exports=exports, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + directory_ids=directory_ids, + directory_names=directory_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'directory_ids', 'directory_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoryExportsApi', 'api255_directory_exports_post_with_http_info', kwargs) + + def get_directory_quotas( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. For example, `fs:dir01,fs:dir02`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directories with attached quota policies + + Displays a list of directories and the quota policies attached to them. Directories with multiple policies are listed repeatedly (once per policy). The directories without a policy attached are not listed. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. For example, + `fs:dir01,fs:dir02`. + :type directory_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + directory_ids=directory_ids, + directory_names=directory_names, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'directory_ids', 'directory_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoryQuotasApi', 'api255_directory_quotas_get_with_http_info', kwargs) + + def delete_directory_services( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete directory services configuration + + Deletes directory services configuration. Directory service configuration must not be referenced by any server nor enabled to be deleted. The built-in "management" directory service cannot be deleted. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_delete_with_http_info', kwargs) + + def get_directory_services( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directory services configuration + + Displays the directory services configuration settings for manageability. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_get_with_http_info', kwargs) + + def delete_directory_services_local_directory_services( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete local directory services + + Deletes local directory services. Local directory service can't be deleted when referenced by any server. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_directory_services_delete_with_http_info', kwargs) + + def get_directory_services_local_directory_services( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List local directory services + + Displays a list of local directory services. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_directory_services_get_with_http_info', kwargs) + + def patch_directory_services_local_directory_services( + self, + local_directory: 'models.LocalDirectoryService', + to_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + to_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format.")] = None, + to_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify local directory service + + Modifies local directory services. + + :param local_directory: (required) + :type local_directory: LocalDirectoryService + :param to_members: A list of to_members to query for. Overrides to_member_ids and to_member_names keyword arguments. + :type to_members: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param to_member_ids: The resource will be moved to the specified local member realm or array. Enter + multiple IDs in a comma-separated format. + :type to_member_ids: List[str] + :param to_member_names: The resource will be moved to the specified local member realm or array. Enter + multiple names in a comma-separated format. + :type to_member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + local_directory=local_directory, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + to_member_ids=to_member_ids, + to_member_names=to_member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(to_members, ['to_member_ids', 'to_member_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'to_member_ids', 'to_member_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_directory_services_patch_with_http_info', kwargs) + + def post_directory_services_local_directory_services( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_directory: Optional['models.LocalDirectoryServicePost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create local directory service + + Creates a local directory service. + + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_directory: + :type local_directory: LocalDirectoryServicePost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_directory=local_directory, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_directory_services_post_with_http_info', kwargs) + + def delete_directory_services_local_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete local groups + + Deletes one or more local groups. The `gids`, `names`, or `sids` parameter is required, but cannot be set together. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type gids: List[int] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + gids=gids, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + names=names, + sids=sids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'gids', 'local_directory_service_ids', 'local_directory_service_names', 'names', 'sids'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_groups_delete_with_http_info', kwargs) + + def get_directory_services_local_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List local groups + + Displays a list of local groups. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type gids: List[int] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + gids=gids, + ids=ids, + limit=limit, + names=names, + offset=offset, + sids=sids, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'gids', 'ids', 'names', 'sids', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_groups_get_with_http_info', kwargs) + + def delete_directory_services_local_groups_members( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + member_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete local group membership + + Deletes one or more local group memberships. The `group_names`, `group_sids`, or `group_gids` parameter is required, but cannot be set together. The `member_names`, `member_sids`, or `member_gids` parameter is required, but cannot be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type group_gids: List[int] + :param group_names: Performs the operation on the group names specified. Enter multiple group names + in comma-separated format. For example, `group1,group2`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param member_ids: Performs the operation on the unique local member IDs specified. Enter multiple + member IDs in comma-separated format. For local group IDs refer to group IDs + (GID). For local user IDs refer to user IDs (UID). The `member_ids` and + `member_names` parameters cannot be provided together. + :type member_ids: List[int] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_sids: Performs the operation on the specified member SID. Enter multiple member SIDs + in comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type member_sids: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_gids=group_gids, + group_names=group_names, + group_sids=group_sids, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + member_ids=member_ids, + member_names=member_names, + member_sids=member_sids, + member_types=member_types, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_gids', 'group_names', 'group_sids', 'local_directory_service_ids', 'local_directory_service_names', 'member_ids', 'member_names', 'member_sids', 'member_types'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_groups_members_delete_with_http_info', kwargs) + + def get_directory_services_local_groups_members( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List local group memberships + + Displays a list of local group memberships. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type group_gids: List[int] + :param group_names: Performs the operation on the group names specified. Enter multiple group names + in comma-separated format. For example, `group1,group2`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique local member IDs specified. Enter multiple + member IDs in comma-separated format. For local group IDs refer to group IDs + (GID). For local user IDs refer to user IDs (UID). The `member_ids` and + `member_names` parameters cannot be provided together. + :type member_ids: List[int] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_sids: Performs the operation on the specified member SID. Enter multiple member SIDs + in comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type member_sids: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_gids=group_gids, + group_names=group_names, + group_sids=group_sids, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_sids=member_sids, + member_types=member_types, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_gids', 'group_names', 'group_sids', 'member_ids', 'member_names', 'member_sids', 'member_types', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_groups_members_get_with_http_info', kwargs) + + def post_directory_services_local_groups_members( + self, + local_membership: Annotated['models.LocalGroupMembershipPost', Field(..., description="The `member_names`, `member_sids`, or `member_gids` parameter is required, but cannot be set together.")], + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create local group membership + + Creates a local group membership with a group. The `group_names`, `group_sids`, or `group_gids` parameter is required, but cannot be set together. + + :param local_membership: The `member_names`, `member_sids`, or `member_gids` parameter is required, but + cannot be set together. (required) + :type local_membership: LocalGroupMembershipPost + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type group_gids: List[int] + :param group_names: Performs the operation on the group names specified. Enter multiple group names + in comma-separated format. For example, `group1,group2`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + local_membership=local_membership, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_gids=group_gids, + group_names=group_names, + group_sids=group_sids, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_gids', 'group_names', 'group_sids', 'local_directory_service_ids', 'local_directory_service_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_groups_members_post_with_http_info', kwargs) + + def patch_directory_services_local_groups( + self, + local_group: 'models.LocalGroupPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify local groups + + Modifies local groups. The `gids`, `names`, or `sids` parameter is required, but cannot be set together. + + :param local_group: (required) + :type local_group: LocalGroupPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type gids: List[int] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + local_group=local_group, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + gids=gids, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + names=names, + sids=sids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'gids', 'local_directory_service_ids', 'local_directory_service_names', 'names', 'sids'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_groups_patch_with_http_info', kwargs) + + def post_directory_services_local_groups( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + local_group: Optional['models.LocalGroupPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create local group + + Creates a local group. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param local_group: + :type local_group: LocalGroupPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + local_group=local_group, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'local_directory_service_ids', 'local_directory_service_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_groups_post_with_http_info', kwargs) + + def delete_directory_services_local_users( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + uids: Annotated[Optional[conlist(StrictInt)], Field(description="A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs in comma-separated format. For example, `423,51234`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete local users + + Deletes one or more local users. The `uids`, `names`, or `sids` parameter is required, but cannot be set together. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :param uids: A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs + in comma-separated format. For example, `423,51234`. + :type uids: List[int] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + names=names, + sids=sids, + uids=uids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'local_directory_service_ids', 'local_directory_service_names', 'names', 'sids', 'uids'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_users_delete_with_http_info', kwargs) + + def get_directory_services_local_users( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + uids: Annotated[Optional[conlist(StrictInt)], Field(description="A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs in comma-separated format. For example, `423,51234`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List local users + + Displays a list of local users. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param uids: A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs + in comma-separated format. For example, `423,51234`. + :type uids: List[int] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sids=sids, + sort=sort, + total_item_count=total_item_count, + uids=uids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sids', 'sort', 'uids'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_users_get_with_http_info', kwargs) + + def delete_directory_services_local_users_members( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + member_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete local user membership + + Deletes one or more local user memberships. The `member_names`, `member_sids`, or `member_ids` parameter is required, but cannot be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type group_gids: List[int] + :param group_names: Performs the operation on the group names specified. Enter multiple group names + in comma-separated format. For example, `group1,group2`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param member_ids: Performs the operation on the unique local member IDs specified. Enter multiple + member IDs in comma-separated format. For local group IDs refer to group IDs + (GID). For local user IDs refer to user IDs (UID). The `member_ids` and + `member_names` parameters cannot be provided together. + :type member_ids: List[int] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_sids: Performs the operation on the specified member SID. Enter multiple member SIDs + in comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type member_sids: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_gids=group_gids, + group_names=group_names, + group_sids=group_sids, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + member_ids=member_ids, + member_names=member_names, + member_sids=member_sids, + member_types=member_types, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_gids', 'group_names', 'group_sids', 'local_directory_service_ids', 'local_directory_service_names', 'member_ids', 'member_names', 'member_sids', 'member_types'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_users_members_delete_with_http_info', kwargs) + + def get_directory_services_local_users_members( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List local user memberships + + Displays a list of local user memberships. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type group_gids: List[int] + :param group_names: Performs the operation on the group names specified. Enter multiple group names + in comma-separated format. For example, `group1,group2`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique local member IDs specified. Enter multiple + member IDs in comma-separated format. For local group IDs refer to group IDs + (GID). For local user IDs refer to user IDs (UID). The `member_ids` and + `member_names` parameters cannot be provided together. + :type member_ids: List[int] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_sids: Performs the operation on the specified member SID. Enter multiple member SIDs + in comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type member_sids: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_gids=group_gids, + group_names=group_names, + group_sids=group_sids, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_sids=member_sids, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_gids', 'group_names', 'group_sids', 'member_ids', 'member_names', 'member_sids', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_users_members_get_with_http_info', kwargs) + + def post_directory_services_local_users_members( + self, + local_membership: Annotated['models.LocalUserMembershipPost', Field(..., description="The `group_names`, `group_sids`, or `group_gids` parameter is required, but cannot be set together.")], + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + member_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create local user membership + + Creates a local user membership with a group. The `member_names` or `member_sids` or `member_ids` parameter is required, but cannot be set together. + + :param local_membership: The `group_names`, `group_sids`, or `group_gids` parameter is required, but + cannot be set together. (required) + :type local_membership: LocalUserMembershipPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param member_ids: Performs the operation on the unique local member IDs specified. Enter multiple + member IDs in comma-separated format. For local group IDs refer to group IDs + (GID). For local user IDs refer to user IDs (UID). The `member_ids` and + `member_names` parameters cannot be provided together. + :type member_ids: List[int] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_sids: Performs the operation on the specified member SID. Enter multiple member SIDs + in comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type member_sids: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + local_membership=local_membership, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + member_ids=member_ids, + member_names=member_names, + member_sids=member_sids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'local_directory_service_ids', 'local_directory_service_names', 'member_ids', 'member_names', 'member_sids'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_users_members_post_with_http_info', kwargs) + + def patch_directory_services_local_users( + self, + local_user: 'models.LocalUserPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keep_open_sessions: Annotated[Optional[StrictBool], Field(description="If set to `true`, the session does not expire. If set to `false`, when the user is disabled or password is changed, the session expires. If not specified, defaults to `false`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + uids: Annotated[Optional[conlist(StrictInt)], Field(description="A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs in comma-separated format. For example, `423,51234`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify local user + + Modifies a local user. + + :param local_user: (required) + :type local_user: LocalUserPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keep_open_sessions: If set to `true`, the session does not expire. If set to `false`, when the user + is disabled or password is changed, the session expires. If not specified, + defaults to `false`. + :type keep_open_sessions: bool + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :param uids: A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs + in comma-separated format. For example, `423,51234`. + :type uids: List[int] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + local_user=local_user, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keep_open_sessions=keep_open_sessions, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + names=names, + sids=sids, + uids=uids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'local_directory_service_ids', 'local_directory_service_names', 'names', 'sids', 'uids'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_users_patch_with_http_info', kwargs) + + def post_directory_services_local_users( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + local_user: Optional['models.LocalUserPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create local user + + Creates a local user. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param local_user: + :type local_user: LocalUserPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + local_user=local_user, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'local_directory_service_ids', 'local_directory_service_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_local_users_post_with_http_info', kwargs) + + def patch_directory_services( + self, + directory_service: 'models.DirectoryServicePatch', + to_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + to_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format.")] = None, + to_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify directory services configuration + + Modifies the directory service configuration. + + :param directory_service: (required) + :type directory_service: DirectoryServicePatch + :param to_members: A list of to_members to query for. Overrides to_member_ids and to_member_names keyword arguments. + :type to_members: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param to_member_ids: The resource will be moved to the specified local member realm or array. Enter + multiple IDs in a comma-separated format. + :type to_member_ids: List[str] + :param to_member_names: The resource will be moved to the specified local member realm or array. Enter + multiple names in a comma-separated format. + :type to_member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + directory_service=directory_service, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + to_member_ids=to_member_ids, + to_member_names=to_member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(to_members, ['to_member_ids', 'to_member_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'to_member_ids', 'to_member_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_patch_with_http_info', kwargs) + + def post_directory_services( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")], + directory_service: 'models.DirectoryServicePost', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create directory services configuration + + Creates directory services configuration. All directory services configuration created using this resource will have `services` set to `data`. + + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. (required) + :type names: List[str] + :param directory_service: (required) + :type directory_service: DirectoryServicePost + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + directory_service=directory_service, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_post_with_http_info', kwargs) + + def delete_directory_services_roles( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete group to management access policy mappings + + Deletes one or more group to management access policy mappings. + + :param names: Performs the operation on the unique names specified. For example, + `GroupRoleMappingName`. Enter multiple names in comma-separated format. + (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_roles_delete_with_http_info', kwargs) + + def get_directory_services_roles( + self, + roles: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + role_names: Annotated[Optional[conlist(StrictStr)], Field(description="This field has been deprecated.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List group to management access policy mappings + + Displays access control settings for remote groups. + + :param roles: A list of roles to query for. Overrides role_names keyword argument. + :type roles: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. For example, + `GroupRoleMappingName`. Enter multiple names in comma-separated format. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param role_names: This field has been deprecated. + :type role_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + role_names=role_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(roles, ['role_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'role_names', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_roles_get_with_http_info', kwargs) + + def patch_directory_services_roles( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format.")], + directory_service_roles: 'models.DirectoryServiceRole', + roles: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + role_names: Annotated[Optional[conlist(StrictStr)], Field(description="This field has been deprecated.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify group to management access policy mappings + + Modifies properties of one or more group to management access policy mappings. Modifying management access policies is done at `/directory-services/roles/policies/management-access` instead. + + :param names: Performs the operation on the unique names specified. For example, + `GroupRoleMappingName`. Enter multiple names in comma-separated format. + (required) + :type names: List[str] + :param directory_service_roles: (required) + :type directory_service_roles: DirectoryServiceRole + :param roles: A list of roles to query for. Overrides role_names keyword argument. + :type roles: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param role_names: This field has been deprecated. + :type role_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + directory_service_roles=directory_service_roles, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + role_names=role_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(roles, ['role_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'role_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_roles_patch_with_http_info', kwargs) + + def delete_directory_services_roles_policies_management_access( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a group to management access policy mapping and one or more management access policies + + Deletes a membership between a group to management access policy mapping with one or more management access policies. One of `policy_ids` or `policy_names` is required, and one of `member_ids` or `member_names` is required. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_roles_policies_management_access_delete_with_http_info', kwargs) + + def get_directory_services_roles_policies_management_access( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List management access policies attached to a group to management access policy mapping + + Displays a list of management access policies that are attached to a group to management access policy mappings. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_roles_policies_management_access_get_with_http_info', kwargs) + + def post_directory_services_roles_policies_management_access( + self, + policies: 'models.PolicyAssignmentPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a group to management access policy mapping with one or more management access policies + + Creates a membership between a group to management access policy mapping with one or more management access policies. One of `member_ids` or `member_names` parameter is required. + + :param policies: (required) + :type policies: PolicyAssignmentPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_roles_policies_management_access_post_with_http_info', kwargs) + + def post_directory_services_roles( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format.")], + directory_service_roles: 'models.DirectoryServiceRolePost', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a group in management access policy mappings + + Creates one or more groups in management access policy mappings. + + :param names: Performs the operation on the unique names specified. For example, + `GroupRoleMappingName`. Enter multiple names in comma-separated format. + (required) + :type names: List[str] + :param directory_service_roles: (required) + :type directory_service_roles: DirectoryServiceRolePost + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + directory_service_roles=directory_service_roles, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_roles_post_with_http_info', kwargs) + + def get_directory_services_test( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET directory-service/test + + The diagnostic utility that verifies the status and configuration of the `directory services` on the `array`. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param servers: A list of servers to query for. Overrides server_names keyword argument. + :type servers: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names and ids keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + offset=offset, + server_names=server_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names', 'ids'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(servers, ['server_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'ids', 'server_names', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_test_get_with_http_info', kwargs) + + def patch_directory_services_test( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + directory_service: Annotated[Optional['models.DirectoryServicePatch'], Field(description="The optional `directory service` `configuration` used to temporarily overwrite specific attributes of existing `objects` during diagnostic testing. These modifications are applied only within the scope of the test and do not persist or alter the current active system settings.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """PATCH directory-service/test + + The diagnostic utility that verifies the status of the configured `directory services` on the `array`. This process supports the optional provision of `configuration` modifications, allowing for validation of proposed changes in a test environment without affecting the current active settings. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param servers: A list of servers to query for. Overrides server_names keyword argument. + :type servers: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names and ids keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :param directory_service: The optional `directory service` `configuration` used to temporarily overwrite + specific attributes of existing `objects` during diagnostic testing. These + modifications are applied only within the scope of the test and do not + persist or alter the current active system settings. + :type directory_service: DirectoryServicePatch + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + server_names=server_names, + directory_service=directory_service, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names', 'ids'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(servers, ['server_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'ids', 'server_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api255_directory_services_test_patch_with_http_info', kwargs) + + def delete_directory_snapshots( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete directory snapshot + + Deletes a directory snapshot that has been destroyed and is pending eradication. Eradicated directory snapshots cannot be recovered. Directory snapshots are destroyed by using the PATCH method. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DirectorySnapshotsApi', 'api255_directory_snapshots_delete_with_http_info', kwargs) + + def get_directory_snapshots( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directory snapshots + + Displays a list of directory snapshots, including those pending eradication. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('DirectorySnapshotsApi', 'api255_directory_snapshots_get_with_http_info', kwargs) + + def patch_directory_snapshots( + self, + directory_snapshot: 'models.DirectorySnapshotPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify directory snapshot + + Modifies a directory snapshot. You can destroy, recover, or update the policy or time remaining of a directory snapshot. To destroy a directory snapshot, set `destroyed=true`. To recover a directory snapshot that has been destroyed and is pending eradication, set `destroyed=false`. To rename a directory snapshot, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param directory_snapshot: (required) + :type directory_snapshot: DirectorySnapshotPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + directory_snapshot=directory_snapshot, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DirectorySnapshotsApi', 'api255_directory_snapshots_patch_with_http_info', kwargs) + + def post_directory_snapshots( + self, + directory_snapshot: 'models.DirectorySnapshotPost', + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create directory snapshot + + Creates a snapshot of the contents of a directory. The `source_ids` or `source_names` parameter is required, but they cannot be set together. + + :param directory_snapshot: (required) + :type directory_snapshot: DirectorySnapshotPost + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + directory_snapshot=directory_snapshot, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + source_ids=source_ids, + source_names=source_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('DirectorySnapshotsApi', 'api255_directory_snapshots_post_with_http_info', kwargs) + + def get_drives( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List flash, NVRAM, and cache modules + + Displays a list of flash, NVRAM, and cache modules that are installed in the array along with their attributes and status. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('DrivesApi', 'api255_drives_get_with_http_info', kwargs) + + def patch_drives( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + admit: Annotated[Optional[StrictBool], Field(description="If `true`, admits any `unadmitted` drives into the system.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify flash and NVRAM modules + + Modifies flash and NVRAM modules that have been added or connected but not yet admitted to the array. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param admit: If `true`, admits any `unadmitted` drives into the system. + :type admit: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + admit=admit, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('DrivesApi', 'api255_drives_patch_with_http_info', kwargs) + + def delete_file_systems( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete file system + + Deletes a file system that has been destroyed and is pending eradication. Eradicated file systems cannot be recovered. File systems are destroyed using the PATCH method. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('FileSystemsApi', 'api255_file_systems_delete_with_http_info', kwargs) + + def get_file_systems( + self, + workloads: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + workload_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter.")] = None, + workload_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List file systems + + Displays a list of file systems, including those pending eradication. + + :param workloads: A list of workloads to query for. Overrides workload_ids and workload_names keyword arguments. + :type workloads: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param workload_ids: A comma-separated list of workload IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_names` query + parameter. + :type workload_ids: List[str] + :param workload_names: A comma-separated list of workload names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_ids` query + parameter. + :type workload_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + workload_ids=workload_ids, + workload_names=workload_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(workloads, ['workload_ids', 'workload_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'workload_ids', 'workload_names'], kwargs) + return self._call_api('FileSystemsApi', 'api255_file_systems_get_with_http_info', kwargs) + + def patch_file_systems( + self, + file_system: 'models.FileSystemPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a file system + + Modifies a file system. You can rename, destroy, move, or recover a file system. To rename a file system, set `name` to the new name. To destroy a file system, set `destroyed=true`. To move a file system, set 'pod' to the destination pod reference. To recover a file system that has been destroyed and is pending eradication, set `destroyed=false`. + + :param file_system: (required) + :type file_system: FileSystemPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + file_system=file_system, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('FileSystemsApi', 'api255_file_systems_patch_with_http_info', kwargs) + + def post_file_systems( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + add_to_policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + add_to_policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The root directories of the file systems will become members of the specified policies along with creation. Enter multiple ids in comma-separated format.")] = None, + add_to_policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="The root directories of the file systems will become members of the specified policies along with creation. Enter multiple names in a comma-separated format.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the initial protection of the root directories of the newly created file systems will be the union of the container default protection configuration and either `add_to_policy_names` or `add_to_policy_ids`. If specified as `false`, the default protection of the container will not be applied automatically. The initial protection of the root directories of the newly created file systems will be configured by either `add_to_policy_names` or `add_to_policy_ids`. If not specified, defaults to `true`.")] = None, + file_system: Optional['models.FileSystemPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create file system + + Creates one or more file systems. The `add_to_policy_names` and `add_to_policy_ids` query parameters specify a list of policy names or ids, respectively, that will be applied to the root directory of the newly created file system. These parameters are mutually exclusive. The `with_default_protection` query parameter specifies whether to use the container default protection configuration for the root directory of the file system. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param add_to_policies: A list of add_to_policies to query for. Overrides add_to_policy_ids and add_to_policy_names keyword arguments. + :type add_to_policies: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param add_to_policy_ids: The root directories of the file systems will become members of the specified + policies along with creation. Enter multiple ids in comma-separated + format. + :type add_to_policy_ids: List[str] + :param add_to_policy_names: The root directories of the file systems will become members of the specified + policies along with creation. Enter multiple names in a comma-separated + format. + :type add_to_policy_names: List[str] + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param with_default_protection: If specified as `true`, the initial protection of the root directories of the + newly created file systems will be the union of the container default + protection configuration and either `add_to_policy_names` or + `add_to_policy_ids`. If specified as `false`, the default protection of + the container will not be applied automatically. The initial protection + of the root directories of the newly created file systems will be + configured by either `add_to_policy_names` or `add_to_policy_ids`. If + not specified, defaults to `true`. + :type with_default_protection: bool + :param file_system: + :type file_system: FileSystemPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + add_to_policy_ids=add_to_policy_ids, + add_to_policy_names=add_to_policy_names, + context_names=context_names, + names=names, + with_default_protection=with_default_protection, + file_system=file_system, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(add_to_policies, ['add_to_policy_ids', 'add_to_policy_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['add_to_policy_ids', 'add_to_policy_names', 'context_names', 'names'], kwargs) + return self._call_api('FileSystemsApi', 'api255_file_systems_post_with_http_info', kwargs) + + def post_files( + self, + source_file: 'models.FilePost', + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. For example, `fs:dir01,fs:dir02`.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + paths: Annotated[Optional[conlist(StrictStr)], Field(description="Target file path relative to the target directory. Enter multiple target file path in a comma-separated format. For example, `/dir1/dir2/file1,/dir3/dir4/file2`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a file copy + + Creates a file copy from one path to another path. The `directory_ids`, `directory_names` or `paths` value must be specified. If the `directory_ids` or `directory_names` value is not specified, the file is copied to the source directory specified in the body params. The `paths` value refers to the path of the target file relative to the target directory. If `paths` value is not specified, the file will be copied to the relative path specified in `source_path` under the target directory. The `source_path` value refers to the path of the source file relative to the source directory. To overwrite an existing file, set the `overwrite` flag to `true`. + + :param source_file: (required) + :type source_file: FilePost + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. For example, + `fs:dir01,fs:dir02`. + :type directory_names: List[str] + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :param paths: Target file path relative to the target directory. Enter multiple target file + path in a comma-separated format. For example, + `/dir1/dir2/file1,/dir3/dir4/file2`. + :type paths: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + source_file=source_file, + authorization=authorization, + x_request_id=x_request_id, + directory_ids=directory_ids, + directory_names=directory_names, + overwrite=overwrite, + paths=paths, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _fixup_list_type_params(['directory_ids', 'directory_names', 'paths'], kwargs) + return self._call_api('FilesApi', 'api255_files_post_with_http_info', kwargs) + + def delete_fleets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a fleet + + Deletes a fleet, permanently. A fleet can only be deleted if the current array is the only array in the fleet. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: Performs the operation on the unique resource IDs specified. Only one value is + supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('FleetsApi', 'api255_fleets_delete_with_http_info', kwargs) + + def get_fleets_fleet_key( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Get fleet key information + + Displays the time remaining on the fleet key. Note, fleet key itself is not displayed, since that is only available at time of fleet key creation. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('FleetsApi', 'api255_fleets_fleet_key_get_with_http_info', kwargs) + + def post_fleets_fleet_key( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a fleet key + + Creates a fleet key allowing an array to be added to a fleet. This is the only time the fleet key is displayed, it cannot be retrieved subsequently. Note, creation of a subsequent key invalidates all keys created earlier. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('FleetsApi', 'api255_fleets_fleet_key_post_with_http_info', kwargs) + + def get_fleets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List fleets + + Displays information about the fleets known to the array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('FleetsApi', 'api255_fleets_get_with_http_info', kwargs) + + def delete_fleets_members( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + unreachable: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows a one-sided disconnect when the connection status is `connecting` instead of `connected` or `partially connected`. If set to `false`, it works just like normal coordinated disconnect. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete fleet members + + Deletes the specified array(s) from the fleet. Note that this will only succeed if the array(s) to be removed are not making use of any fleet resources. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param unreachable: If set to `true`, allows a one-sided disconnect when the connection status is + `connecting` instead of `connected` or `partially connected`. If set to + `false`, it works just like normal coordinated disconnect. If not + specified, defaults to `false`. + :type unreachable: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + unreachable=unreachable, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['member_ids', 'member_names'], kwargs) + return self._call_api('FleetsApi', 'api255_fleets_members_delete_with_http_info', kwargs) + + def get_fleets_members( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + fleets: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + fleet_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique Fleet IDs specified. This query currently accepts only 1 ID.")] = None, + fleet_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique Fleet names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. This query currently accepts only 1 name.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List fleet members + + Displays the members in the current fleet. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param fleets: A list of fleets to query for. Overrides fleet_ids and fleet_names keyword arguments. + :type fleets: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param fleet_ids: Performs the operation on the unique Fleet IDs specified. This query currently + accepts only 1 ID. + :type fleet_ids: List[str] + :param fleet_names: Performs the operation on the unique Fleet names specified. Enter multiple names + in comma-separated format. For example, `name01,name02`. This query + currently accepts only 1 name. + :type fleet_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + fleet_ids=fleet_ids, + fleet_names=fleet_names, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(fleets, ['fleet_ids', 'fleet_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['fleet_ids', 'fleet_names', 'member_ids', 'member_names', 'sort'], kwargs) + return self._call_api('FleetsApi', 'api255_fleets_members_get_with_http_info', kwargs) + + def post_fleets_members( + self, + fleets: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + fleet_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique Fleet IDs specified. This query currently accepts only 1 ID.")] = None, + fleet_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique Fleet names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. This query currently accepts only 1 name.")] = None, + members: Annotated[Optional['models.FleetMemberPost'], Field(description="Info about the members being added to fleet.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Add members to a fleet + + Adds arrays to an existing fleet. This API needs to be run from the array that's joining the fleet. To add the current array to the fleet, specify its own array `id` or `name`, as well as the `fleet key` generated on any array already in the fleet. `resource_type` is `remote-arrays`. The array's `ID` and `name` can be retrieved with a call to `GET /arrays` on the array. + + :param fleets: A list of fleets to query for. Overrides fleet_ids and fleet_names keyword arguments. + :type fleets: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param fleet_ids: Performs the operation on the unique Fleet IDs specified. This query currently + accepts only 1 ID. + :type fleet_ids: List[str] + :param fleet_names: Performs the operation on the unique Fleet names specified. Enter multiple names + in comma-separated format. For example, `name01,name02`. This query + currently accepts only 1 name. + :type fleet_names: List[str] + :param members: Info about the members being added to fleet. + :type members: FleetMemberPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + fleet_ids=fleet_ids, + fleet_names=fleet_names, + members=members, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(fleets, ['fleet_ids', 'fleet_names'], kwargs) + _fixup_list_type_params(['fleet_ids', 'fleet_names'], kwargs) + return self._call_api('FleetsApi', 'api255_fleets_members_post_with_http_info', kwargs) + + def patch_fleets( + self, + fleet: 'models.FleetPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a fleet + + Modifies a fleet, changing its name by passing the old name in `name` query parameter, and the new name in the `name` parameter in the request body. + + :param fleet: (required) + :type fleet: FleetPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: Performs the operation on the unique resource IDs specified. Only one value is + supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + fleet=fleet, + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('FleetsApi', 'api255_fleets_patch_with_http_info', kwargs) + + def post_fleets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a fleet + + Creates a fleet and adds the current array as its first member. Additional arrays can be added to the fleet with `POST /fleets/members`. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('FleetsApi', 'api255_fleets_post_with_http_info', kwargs) + + def get_hardware( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List hardware component information + + Displays a list of hardware slots and bays and status of installed components. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('HardwareApi', 'api255_hardware_get_with_http_info', kwargs) + + def patch_hardware( + self, + hardware: 'models.HardwarePatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify visual identification + + Modifies the visual identification of a specified hardware component, and causing the ID LED to turn on or off. + + :param hardware: (required) + :type hardware: HardwarePatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + hardware=hardware, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('HardwareApi', 'api255_hardware_patch_with_http_info', kwargs) + + def delete_host_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a host group + + Deletes a host group in which the `names` query parameter is required. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_delete_with_http_info', kwargs) + + def get_host_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host groups + + Displays a list of host groups. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_get_with_http_info', kwargs) + + def delete_host_groups_hosts( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership from a host group + + Deletes a membership from a host group. Removing a membership from a host group automatically disconnects the host from all volumes associated with the group. Hosts can be removed from host groups at any time. The `group_names` and `member_names` parameters are required and must be set together, and only one host group can be specified at a time. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_names', 'member_names'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_hosts_delete_with_http_info', kwargs) + + def get_host_groups_hosts( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host groups that are associated with hosts + + Displays a list of host groups that are associated with hosts. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_names=group_names, + limit=limit, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_names', 'member_names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_hosts_get_with_http_info', kwargs) + + def post_host_groups_hosts( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership to a host group + + Create a membership between a host and a host group. Adding a membership to a host group automatically connects the host to all volumes associated with the group. Multiple hosts can be belong to a host group, but a host can only belong to one host group. Hosts can be added to host groups at any time. The `group_names` and `member_names` parameters are required and must be set together, and only one host group can be specified at a time. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_names', 'member_names'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_hosts_post_with_http_info', kwargs) + + def patch_host_groups( + self, + host_group: 'models.HostGroupPatch', + to_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + from_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + from_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays from which the resource should be removed. Enter multiple IDs in a comma-separated format.")] = None, + from_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays to be removed from the specified resource. Enter multiple names in a comma-separated format.")] = None, + modify_resource_access: Annotated[Optional[StrictStr], Field(description="Describes how to modify a resource accesses of a resource when that resource is moved. Possible values are: `none`, `create`, and `delete`. The `none` value indicates that no resource access should be modified. The `create` value is used when a resource is moving out of a realm into the array and it needs to create a resource access of the moved resource to the realm from which it is moving. The `delete` value is used when a resource that is moving from an array into a realm already has a resource access into that realm. This is a required parameter when a resource is being moved to another member.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + to_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format.")] = None, + to_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a host group + + Modifies a host group in which the `names` query parameter is required. + + :param host_group: (required) + :type host_group: HostGroupPatch + :param to_members: A list of to_members to query for. Overrides to_member_ids and to_member_names keyword arguments. + :type to_members: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param from_members: A list of from_members to query for. Overrides from_member_ids and from_member_names keyword arguments. + :type from_members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param from_member_ids: Move the resource from the specified local member realm or array. This should be + a union of all local realms and arrays from which the resource should be + removed. Enter multiple IDs in a comma-separated format. + :type from_member_ids: List[str] + :param from_member_names: Move the resource from the specified local member realm or array. This should be + a union of all local realms and arrays to be removed from the specified + resource. Enter multiple names in a comma-separated format. + :type from_member_names: List[str] + :param modify_resource_access: Describes how to modify a resource accesses of a resource when that resource is moved. Possible values are: `none`, `create`, and `delete`. The `none` value indicates that no resource + access should be modified. The `create` value + is used when a resource is moving out of a + realm into the array and it needs to create a + resource access of the moved resource to the + realm from which it is moving. The `delete` + value is used when a resource that is moving + from an array into a realm already has a + resource access into that realm. This is a + required parameter when a resource is being + moved to another member. + :type modify_resource_access: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param to_member_ids: The resource will be moved to the specified local member realm or array. Enter + multiple IDs in a comma-separated format. + :type to_member_ids: List[str] + :param to_member_names: The resource will be moved to the specified local member realm or array. Enter + multiple names in a comma-separated format. + :type to_member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + host_group=host_group, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + from_member_ids=from_member_ids, + from_member_names=from_member_names, + modify_resource_access=modify_resource_access, + names=names, + to_member_ids=to_member_ids, + to_member_names=to_member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(from_members, ['from_member_ids', 'from_member_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(to_members, ['to_member_ids', 'to_member_names'], kwargs) + _fixup_list_type_params(['context_names', 'from_member_ids', 'from_member_names', 'names', 'to_member_ids', 'to_member_names'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_patch_with_http_info', kwargs) + + def get_host_groups_performance_by_array( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host group performance data by array + + Displays real-time and historical performance data, real-time latency data, and average I/O size data. The data is displayed by total size across all host groups on each array and by individual host group on each array. The displayed data represents the volumes that are connected to a host group on the current array and the volumes that are connected to a host group on any remote arrays that are visible to the current array. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_performance_by_array_get_with_http_info', kwargs) + + def get_host_groups_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host group performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes of all host groups, displayed both by host group and by total size across all host groups. This data represents volumes that are connected to the host groups on the local array and stretched volumes connected to the host groups on arrays that are connected by synchronous replication. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_performance_get_with_http_info', kwargs) + + def post_host_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + host_group: Optional['models.HostGroupPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a host group and upsert tags + + Creates a host group in which the `names` query parameter is required. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param host_group: + :type host_group: HostGroupPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + host_group=host_group, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_post_with_http_info', kwargs) + + def delete_host_groups_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a host group from a protection group + + Deletes a host group member from a protection group. After the member has been removed, it is no longer protected by the group. Any protection group snapshots that were taken before the member was removed are not affected. Removing a member from a protection group does not delete the member from the array or realm, and the member can be added back to the protection group at any time. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host group. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_protection_groups_delete_with_http_info', kwargs) + + def get_host_groups_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host groups that are members of protection groups + + Displays a list of host group members that belong to one or more protection groups. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_protection_groups_get_with_http_info', kwargs) + + def post_host_groups_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a host group + + Creates a host group member and assigns to a protection group. Members that are already in the protection group are not affected. For asynchronous replication, only members of the same type can belong to a protection group. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host group. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_protection_groups_post_with_http_info', kwargs) + + def get_host_groups_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host group QoS config + + Displays real-time and historical QoS config data for each host group. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_qos_get_with_http_info', kwargs) + + def get_host_groups_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host group space information + + Displays provisioned size and physical storage consumption data for each host group. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_space_get_with_http_info', kwargs) + + def put_host_groups_tags_batch( + self, + tag: Annotated[conlist('models.NonCopyableTagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if one already exists, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags. + + :param tag: A list of tags to be created or, if one already exists, updated. (required) + :type tag: List[NonCopyableTagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_tags_batch_put_with_http_info', kwargs) + + def delete_host_groups_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags on host group objects. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_tags_delete_with_http_info', kwargs) + + def get_host_groups_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags on host group objects. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api255_host_groups_tags_get_with_http_info', kwargs) + + def delete_hosts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a host + + Deletes an existing host. All volumes that are connected to the host, either through private or shared connections, must be disconnected from the host before the host can be deleted. The `names` query parameter is required. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_delete_with_http_info', kwargs) + + def get_hosts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List hosts + + Displays a list of hosts. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_get_with_http_info', kwargs) + + def delete_hosts_host_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership from a host group + + Deletes a membership from a host group. Deleting a membership from a host group automatically disconnects the host from all volumes associated with the group. Hosts can be deleted from host groups at any time. The `group_names` and `member_names` parameters are required and must be set together, and only one host group can be specified at a time. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_names', 'member_names'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_host_groups_delete_with_http_info', kwargs) + + def get_hosts_host_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List hosts that are associated with host groups + + Displays a list of hosts that are associated with host groups. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_names=group_names, + limit=limit, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_names', 'member_names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_host_groups_get_with_http_info', kwargs) + + def post_hosts_host_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership to a host group + + Creates a membership to a host group. Creating a membership to a host group automatically connects the host to all volumes associated with the group. Multiple hosts can be belong to a host group, but a host can only belong to one host group. Hosts can be added to host groups at any time. The `group_names` and `member_names` parameters are required and must be set together, and only one host group can be specified at a time. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_names', 'member_names'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_host_groups_post_with_http_info', kwargs) + + def patch_hosts( + self, + host: 'models.HostPatch', + to_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + from_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + from_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays from which the resource should be removed. Enter multiple IDs in a comma-separated format.")] = None, + from_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays to be removed from the specified resource. Enter multiple names in a comma-separated format.")] = None, + modify_resource_access: Annotated[Optional[StrictStr], Field(description="Describes how to modify a resource accesses of a resource when that resource is moved. Possible values are: `none`, `create`, and `delete`. The `none` value indicates that no resource access should be modified. The `create` value is used when a resource is moving out of a realm into the array and it needs to create a resource access of the moved resource to the realm from which it is moving. The `delete` value is used when a resource that is moving from an array into a realm already has a resource access into that realm. This is a required parameter when a resource is being moved to another member.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + to_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format.")] = None, + to_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a host + + Modifies an existing host, including its storage network addresses, CHAP, host personality, and preferred arrays, or associate a host to a host group. The `names` query parameter is required. + + :param host: (required) + :type host: HostPatch + :param to_members: A list of to_members to query for. Overrides to_member_ids and to_member_names keyword arguments. + :type to_members: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param from_members: A list of from_members to query for. Overrides from_member_ids and from_member_names keyword arguments. + :type from_members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param from_member_ids: Move the resource from the specified local member realm or array. This should be + a union of all local realms and arrays from which the resource should be + removed. Enter multiple IDs in a comma-separated format. + :type from_member_ids: List[str] + :param from_member_names: Move the resource from the specified local member realm or array. This should be + a union of all local realms and arrays to be removed from the specified + resource. Enter multiple names in a comma-separated format. + :type from_member_names: List[str] + :param modify_resource_access: Describes how to modify a resource accesses of a resource when that resource is moved. Possible values are: `none`, `create`, and `delete`. The `none` value indicates that no resource + access should be modified. The `create` value + is used when a resource is moving out of a + realm into the array and it needs to create a + resource access of the moved resource to the + realm from which it is moving. The `delete` + value is used when a resource that is moving + from an array into a realm already has a + resource access into that realm. This is a + required parameter when a resource is being + moved to another member. + :type modify_resource_access: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param to_member_ids: The resource will be moved to the specified local member realm or array. Enter + multiple IDs in a comma-separated format. + :type to_member_ids: List[str] + :param to_member_names: The resource will be moved to the specified local member realm or array. Enter + multiple names in a comma-separated format. + :type to_member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + host=host, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + from_member_ids=from_member_ids, + from_member_names=from_member_names, + modify_resource_access=modify_resource_access, + names=names, + to_member_ids=to_member_ids, + to_member_names=to_member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(from_members, ['from_member_ids', 'from_member_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(to_members, ['to_member_ids', 'to_member_names'], kwargs) + _fixup_list_type_params(['context_names', 'from_member_ids', 'from_member_names', 'names', 'to_member_ids', 'to_member_names'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_patch_with_http_info', kwargs) + + def get_hosts_performance_balance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host performance balance + + Displays the I/O balance statistics for host paths. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_performance_balance_get_with_http_info', kwargs) + + def get_hosts_performance_by_array( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host performance data by array + + Displays real-time and historical performance data, real-time latency data, and average I/O size data. The data is displayed by total size across all hosts on each array and by individual host on each array. The displayed data represents the volumes that are connected to a host on the current array and the volumes that are connected to a host on any remote arrays that are visible to the current array. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_performance_by_array_get_with_http_info', kwargs) + + def get_hosts_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes across all hosts, displayed by host and by total size across all hosts. This data represents volumes that are connected to the hosts on the local array and stretched volumes connected to the hosts on any arrays that are connected by synchronous replication. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_performance_get_with_http_info', kwargs) + + def post_hosts( + self, + host: 'models.HostPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a host and upsert tags + + Creates a host for which the `names` query parameter is required. + + :param host: (required) + :type host: HostPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + host=host, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_post_with_http_info', kwargs) + + def delete_hosts_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a host from a protection group + + Deletes a host member from a protection group. After the member has been removed, it is no longer protected by the group. Any protection group snapshots that were taken before the member was removed are not affected. Removing a member from a protection group does not delete the member from the array or realm, and the member can be added back to the protection group at any time. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_protection_groups_delete_with_http_info', kwargs) + + def get_hosts_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List hosts that are members of protection groups + + Displays a list of host members that belong to one or more protection groups. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_protection_groups_get_with_http_info', kwargs) + + def post_hosts_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a host + + Creates a host member and adds it to a protection group. Members that are already in the protection group are not affected. For asynchronous replication, only members of the same type can belong to a protection group. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_protection_groups_post_with_http_info', kwargs) + + def get_hosts_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host QoS config + + Displays real-time and historical QoS config data for each host. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_qos_get_with_http_info', kwargs) + + def get_hosts_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host space information + + Displays provisioned size and physical storage consumption data for each host. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_space_get_with_http_info', kwargs) + + def put_hosts_tags_batch( + self, + tag: Annotated[conlist('models.NonCopyableTagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if one already exists, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags. + + :param tag: A list of tags to be created or, if one already exists, updated. (required) + :type tag: List[NonCopyableTagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_tags_batch_put_with_http_info', kwargs) + + def delete_hosts_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags on host objects. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_tags_delete_with_http_info', kwargs) + + def get_hosts_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags on host objects. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api255_hosts_tags_get_with_http_info', kwargs) + + def delete_kmip( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete KMIP server object + + Deletes KMIP server objects. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('KMIPApi', 'api255_kmip_delete_with_http_info', kwargs) + + def get_kmip( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List KMIP server objects + + Displays the list of KMIP server objects. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('KMIPApi', 'api255_kmip_get_with_http_info', kwargs) + + def patch_kmip( + self, + kmip: 'models.KmipPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify KMIP attributes + + Modifies one or more attributes of KMIP server objects. + + :param kmip: (required) + :type kmip: KmipPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + kmip=kmip, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('KMIPApi', 'api255_kmip_patch_with_http_info', kwargs) + + def post_kmip( + self, + kmip: 'models.KmipPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create KMIP server object + + Creates KMIP server objects. + + :param kmip: (required) + :type kmip: KmipPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + kmip=kmip, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('KMIPApi', 'api255_kmip_post_with_http_info', kwargs) + + def get_kmip_test( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Lists KMIP connection tests + + Displays communication data between a FlashArray and KMIP server. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('KMIPApi', 'api255_kmip_test_get_with_http_info', kwargs) + + def delete_lifecycle_rules( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + buckets: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + bucket_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`.")] = None, + bucket_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE lifecycle-rules + + Deletes individual lifecycle rules by name or id, or deletes all rules for a bucket. If `ids` is specified, `bucket_names` or `bucket_ids` is also required. If `bucket_names` or `bucket_ids` are specified without `ids`, delete all the rules for the bucket. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param buckets: A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + :type buckets: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least + one resource that matches each of the elements of `bucket_ids`, then an + error is returned. This cannot be provided together with the `bucket_names` + query parameter. This can be provided with the `ids` query parameter but not + with `names`. + :type bucket_ids: List[str] + :param bucket_names: A comma-separated list of bucket names. If there is not at least one resource + that matches each of the elements of `bucket_names`, then an error is + returned. This cannot be provided together with the `bucket_ids` query + parameter. This can be provided with the `ids` query parameter but not with + `names`. + :type bucket_names: List[str] + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['bucket_ids', 'bucket_names', 'context_names', 'ids', 'names'], kwargs) + return self._call_api('LifecycleRulesApi', 'api255_lifecycle_rules_delete_with_http_info', kwargs) + + def get_lifecycle_rules( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + buckets: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + bucket_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`.")] = None, + bucket_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET lifecycle-rules + + Returns a list of lifecycle rules. When `names` is specified, list the individual rules. When `ids` is specified, `bucket_names` or `bucket_ids` is also required. When `bucket_names` or `bucket_ids` are specified without `ids`, if there are at most 10 buckets with lifecycle rules in the system, list all the rules for the bucket, else it returns an error. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param buckets: A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + :type buckets: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least + one resource that matches each of the elements of `bucket_ids`, then an + error is returned. This cannot be provided together with the `bucket_names` + query parameter. This can be provided with the `ids` query parameter but not + with `names`. + :type bucket_ids: List[str] + :param bucket_names: A comma-separated list of bucket names. If there is not at least one resource + that matches each of the elements of `bucket_names`, then an error is + returned. This cannot be provided together with the `bucket_ids` query + parameter. This can be provided with the `ids` query parameter but not with + `names`. + :type bucket_names: List[str] + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['bucket_ids', 'bucket_names', 'context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('LifecycleRulesApi', 'api255_lifecycle_rules_get_with_http_info', kwargs) + + def patch_lifecycle_rules( + self, + lifecycle: 'models.LifecycleRulePatchBase', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + buckets: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + bucket_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`.")] = None, + bucket_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`.")] = None, + confirm_date: Annotated[Optional[StrictBool], Field(description="If set to `true`, then confirm the date of `keep_current_version_until` is correct.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """PATCH lifecycle-rules + + Modify an existing lifecycle rule by name or id. If `ids` is specified, `bucket_names` or `bucket_ids` is also required. + + :param lifecycle: (required) + :type lifecycle: LifecycleRulePatchBase + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param buckets: A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + :type buckets: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least + one resource that matches each of the elements of `bucket_ids`, then an + error is returned. This cannot be provided together with the `bucket_names` + query parameter. This can be provided with the `ids` query parameter but not + with `names`. + :type bucket_ids: List[str] + :param bucket_names: A comma-separated list of bucket names. If there is not at least one resource + that matches each of the elements of `bucket_names`, then an error is + returned. This cannot be provided together with the `bucket_ids` query + parameter. This can be provided with the `ids` query parameter but not with + `names`. + :type bucket_names: List[str] + :param confirm_date: If set to `true`, then confirm the date of `keep_current_version_until` is + correct. + :type confirm_date: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + lifecycle=lifecycle, + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + confirm_date=confirm_date, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['bucket_ids', 'bucket_names', 'context_names', 'ids', 'names'], kwargs) + return self._call_api('LifecycleRulesApi', 'api255_lifecycle_rules_patch_with_http_info', kwargs) + + def post_lifecycle_rules( + self, + rule: 'models.LifecycleRulePostBase', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + confirm_date: Annotated[Optional[StrictBool], Field(description="If set to `true`, then confirm the date of `keep_current_version_until` is correct.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST lifecycle-rules + + Creates a lifecycle rule. `bucket` and `keep_previous_version_for` are required. If `rule_id` is not specified, it will be automatically generated in the format "faRuleIdX". + + :param rule: (required) + :type rule: LifecycleRulePostBase + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param confirm_date: If set to `true`, then confirm the date of `keep_current_version_until` is + correct. + :type confirm_date: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rule=rule, + x_request_id=x_request_id, + confirm_date=confirm_date, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('LifecycleRulesApi', 'api255_lifecycle_rules_post_with_http_info', kwargs) + + def delete_log_targets_file( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete file log target + + Deletes a configured file log target. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('LogTargetsApi', 'api255_log_targets_file_delete_with_http_info', kwargs) + + def get_log_targets_file( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List file log targets + + Displays a list of configured file log targets. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('LogTargetsApi', 'api255_log_targets_file_get_with_http_info', kwargs) + + def patch_log_targets_file( + self, + log_target_file: 'models.LogTargetFile', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify file log target + + Modifies the URI of a configured file log target. + + :param log_target_file: (required) + :type log_target_file: LogTargetFile + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + log_target_file=log_target_file, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('LogTargetsApi', 'api255_log_targets_file_patch_with_http_info', kwargs) + + def post_log_targets_file( + self, + log_target_file: 'models.LogTargetFile', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create file log target + + Creates a new file log target. + + :param log_target_file: (required) + :type log_target_file: LogTargetFile + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + log_target_file=log_target_file, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('LogTargetsApi', 'api255_log_targets_file_post_with_http_info', kwargs) + + def get_log_targets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List log targets + + Displays a list of configured log targets. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('LogTargetsApi', 'api255_log_targets_get_with_http_info', kwargs) + + def delete_log_targets_syslog( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete syslog server + + Deletes a configured syslog server and stop forwarding syslog messages. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('LogTargetsApi', 'api255_log_targets_syslog_delete_with_http_info', kwargs) + + def get_log_targets_syslog( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List syslog servers + + Displays a list of configured syslog servers. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('LogTargetsApi', 'api255_log_targets_syslog_get_with_http_info', kwargs) + + def patch_log_targets_syslog( + self, + syslog_server: 'models.SyslogServer', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify syslog server + + Modifies the URI and services of a configured syslog server. + + :param syslog_server: (required) + :type syslog_server: SyslogServer + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + syslog_server=syslog_server, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('LogTargetsApi', 'api255_log_targets_syslog_patch_with_http_info', kwargs) + + def post_log_targets_syslog( + self, + syslog_server: 'models.SyslogServer', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create syslog server + + Creates a new syslog server. + + :param syslog_server: (required) + :type syslog_server: SyslogServer + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + syslog_server=syslog_server, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('LogTargetsApi', 'api255_log_targets_syslog_post_with_http_info', kwargs) + + def get_log_targets_syslog_settings( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List syslog settings + + Displays syslog settings. Values include `continuation_token`, `items`, `more_items_remaining`, and `total_item_count`. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('LogTargetsApi', 'api255_log_targets_syslog_settings_get_with_http_info', kwargs) + + def patch_log_targets_syslog_settings( + self, + syslog_server_settings: 'models.SyslogServerSettings', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify syslog settings + + Modifies syslog settings. Values include `continuation_token`, `items`, `more_items_remaining`, and `total_item_count`. + + :param syslog_server_settings: (required) + :type syslog_server_settings: SyslogServerSettings + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + syslog_server_settings=syslog_server_settings, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('LogTargetsApi', 'api255_log_targets_syslog_settings_patch_with_http_info', kwargs) + + def get_log_targets_syslog_test( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List syslog server test results + + Displays syslog server test results, which indicate whether the syslog is working and configured correctly. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('LogTargetsApi', 'api255_log_targets_syslog_test_get_with_http_info', kwargs) + + def delete_maintenance_windows( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete maintenance window + + Deletes an open maintenance window before its scheduled end (`expire`) time. The `names` parameter is required and must be set to `environment`. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('MaintenanceWindowsApi', 'api255_maintenance_windows_delete_with_http_info', kwargs) + + def get_maintenance_windows( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List maintenance window details + + Displays maintenance window details, including start time, end time, and maintenance type. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('MaintenanceWindowsApi', 'api255_maintenance_windows_get_with_http_info', kwargs) + + def post_maintenance_windows( + self, + maintenance_window: 'models.MaintenanceWindowPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a maintenance window + + Creates a maintenance window that suppresses alerts for a specified period of time. A maintenance window can be manually closed at any time. The `names` and `timeout` parameters are required. Set the `names` parameter to `environment`. + + :param maintenance_window: (required) + :type maintenance_window: MaintenanceWindowPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + maintenance_window=maintenance_window, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('MaintenanceWindowsApi', 'api255_maintenance_windows_post_with_http_info', kwargs) + + def delete_network_interfaces( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete network interface + + Deletes a network interface on a controller. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('NetworkInterfacesApi', 'api255_network_interfaces_delete_with_http_info', kwargs) + + def get_network_interfaces( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List network interfaces + + Displays all network interfaces for all controllers on the array. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('NetworkInterfacesApi', 'api255_network_interfaces_get_with_http_info', kwargs) + + def get_network_interfaces_neighbors( + self, + local_ports: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_port_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique local port name specified. Enter multiple names in comma-separated format. For example, `ct0.eth0,ct1.eth0`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List network interface neighbors + + Displays all neighbors for all network interfaces on the array. + + :param local_ports: A list of local_ports to query for. Overrides local_port_names keyword argument. + :type local_ports: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param local_port_names: Performs the operation on the unique local port name specified. Enter multiple + names in comma-separated format. For example, `ct0.eth0,ct1.eth0`. + :type local_port_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + local_port_names=local_port_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(local_ports, ['local_port_names'], kwargs) + _fixup_list_type_params(['local_port_names', 'sort'], kwargs) + return self._call_api('NetworkInterfacesApi', 'api255_network_interfaces_neighbors_get_with_http_info', kwargs) + + def patch_network_interfaces( + self, + network: 'models.NetworkInterfacePatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + remediate: Annotated[Optional[StrictBool], Field(description="The boolean value that, if `true`, indicates that `network interfaces` with a `remediation_mode` of `manual` will migrate to their `preferred_arrays`, if configured.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify network interface + + Modifies a network interface on a controller. + + :param network: (required) + :type network: NetworkInterfacePatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param remediate: The boolean value that, if `true`, indicates that `network interfaces` with a + `remediation_mode` of `manual` will migrate to their `preferred_arrays`, if + configured. + :type remediate: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + network=network, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + remediate=remediate, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('NetworkInterfacesApi', 'api255_network_interfaces_patch_with_http_info', kwargs) + + def get_network_interfaces_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List network performance statistics + + Displays network statistics, historical bandwidth, and error reporting for all specified network interfaces. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('NetworkInterfacesApi', 'api255_network_interfaces_performance_get_with_http_info', kwargs) + + def get_network_interfaces_port_details( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SFP port details + + Displays Ethernet and Fibre Channel SFP details. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('NetworkInterfacesApi', 'api255_network_interfaces_port_details_get_with_http_info', kwargs) + + def post_network_interfaces( + self, + network: 'models.NetworkInterfacePost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create network interface + + Creates a network interface on a controller on the array. + + :param network: (required) + :type network: NetworkInterfacePost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + network=network, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('NetworkInterfacesApi', 'api255_network_interfaces_post_with_http_info', kwargs) + + def delete_object_store_access_keys( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE object-store-access-keys + + Delete an object store access key. Once an access key has been deleted, it cannot be recovered. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ObjectStoreAccessKeysApi', 'api255_object_store_access_keys_delete_with_http_info', kwargs) + + def get_object_store_access_keys( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET object-store-access-keys + + List object store access keys. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('ObjectStoreAccessKeysApi', 'api255_object_store_access_keys_get_with_http_info', kwargs) + + def patch_object_store_access_keys( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + object_store_access_key: 'models.ObjectStoreAccessKey', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """PATCH object-store-access-keys + + Enable or disable object store access keys. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param object_store_access_key: (required) + :type object_store_access_key: ObjectStoreAccessKey + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + object_store_access_key=object_store_access_key, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ObjectStoreAccessKeysApi', 'api255_object_store_access_keys_patch_with_http_info', kwargs) + + def post_object_store_access_keys( + self, + object_store_access_key: 'models.ObjectStoreAccessKeyPostBase', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST object-store-access-keys + + The generation of object store access keys. This process produces a new `access key ID` and `secret key` for the specified user. + + :param object_store_access_key: (required) + :type object_store_access_key: ObjectStoreAccessKeyPostBase + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + object_store_access_key=object_store_access_key, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('ObjectStoreAccessKeysApi', 'api255_object_store_access_keys_post_with_http_info', kwargs) + + def delete_object_store_accounts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE object-store-accounts + + The deletion of an object store account. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ObjectStoreAccountsApi', 'api255_object_store_accounts_delete_with_http_info', kwargs) + + def get_object_store_accounts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET object-store-accounts + + The list of object store accounts and their associated attributes. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ObjectStoreAccountsApi', 'api255_object_store_accounts_get_with_http_info', kwargs) + + def post_object_store_accounts( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST object-store-accounts + + The creation of an object store account. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ObjectStoreAccountsApi', 'api255_object_store_accounts_post_with_http_info', kwargs) + + def get_object_store_accounts_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List object store account space information + + The monitoring interface or dataset that provides `physical storage` `consumption` data for each `object store account`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ObjectStoreAccountsApi', 'api255_object_store_accounts_space_get_with_http_info', kwargs) + + def delete_object_store_users( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE object-store-users + + Delete an object store user. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ObjectStoreUsersApi', 'api255_object_store_users_delete_with_http_info', kwargs) + + def get_object_store_users( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET object-store-users + + List object store users and their attributes. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ObjectStoreUsersApi', 'api255_object_store_users_get_with_http_info', kwargs) + + def delete_object_store_users_policies_object_store_access( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE object-store-users/policies/object-store-access + + Revoke an object store user’s access policy. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('ObjectStoreUsersApi', 'api255_object_store_users_policies_object_store_access_delete_with_http_info', kwargs) + + def get_object_store_users_policies_object_store_access( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET object-store-users/policies/object-store-access + + List object store users and their access policies. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('ObjectStoreUsersApi', 'api255_object_store_users_policies_object_store_access_get_with_http_info', kwargs) + + def post_object_store_users_policies_object_store_access( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST object-store-users/policies/object-store-access + + Grant access policies to an object store user. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('ObjectStoreUsersApi', 'api255_object_store_users_policies_object_store_access_post_with_http_info', kwargs) + + def post_object_store_users( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST object-store-users + + Create object store users to administer object storage for an object store account. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ObjectStoreUsersApi', 'api255_object_store_users_post_with_http_info', kwargs) + + def delete_object_store_virtual_hosts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE object-store-virtual-hosts + + The deletion of an object store virtual host. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ObjectStoreVirtualHostsApi', 'api255_object_store_virtual_hosts_delete_with_http_info', kwargs) + + def get_object_store_virtual_hosts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET object-store-virtual-hosts + + The list of object store virtual hosts. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ObjectStoreVirtualHostsApi', 'api255_object_store_virtual_hosts_get_with_http_info', kwargs) + + def post_object_store_virtual_hosts( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST object-store-virtual-hosts + + The creation of an object store virtual host. A maximum of `10` virtual hosts is supported. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ObjectStoreVirtualHostsApi', 'api255_object_store_virtual_hosts_post_with_http_info', kwargs) + + def delete_offloads( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete offload target + + Deletes an offload target. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('OffloadsApi', 'api255_offloads_delete_with_http_info', kwargs) + + def get_offloads( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `azure`, `google-cloud`, `nfs`, and `s3`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List offload targets + + Displays a list of offload targets that are connected to the array. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `azure`, `google-cloud`, `nfs`, and `s3`. + :type protocol: str + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + protocol=protocol, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('OffloadsApi', 'api255_offloads_get_with_http_info', kwargs) + + def patch_offloads( + self, + offload: 'models.OffloadPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Patch offload target + + Modifies an existing offload target. Usage includes rotating the client secret. + + :param offload: (required) + :type offload: OffloadPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + offload=offload, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('OffloadsApi', 'api255_offloads_patch_with_http_info', kwargs) + + def post_offloads( + self, + offload: 'models.OffloadPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + initialize: Annotated[Optional[StrictBool], Field(description="If set to `true`, initializes the Amazon S3/Azure Blob container/Google Cloud Storage in preparation for offloading. The parameter must be set to `true` if this is the first time the array is connecting to the offload target.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create offload target + + Creates an offload target, connecting it to an array. Before you can connect to, manage, and replicate to an offload target, the Purity Run app must be installed. + + :param offload: (required) + :type offload: OffloadPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param initialize: If set to `true`, initializes the Amazon S3/Azure Blob container/Google Cloud + Storage in preparation for offloading. The parameter must be set to `true` + if this is the first time the array is connecting to the offload target. + :type initialize: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + offload=offload, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + initialize=initialize, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('OffloadsApi', 'api255_offloads_post_with_http_info', kwargs) + + def delete_pod_replica_links( + self, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete pod replica links + + Deletes pod replica links. The `local_pod_names` and `remote_pod_names` are required. Valid values are `replicating`, `baselining`, `paused`, `unhealthy`, `quiescing`, and `quiesced`. A status of `replicating` indicates that the source array is replicating to the target array. A status of `baselining` indicates that the the initial version of the dataset is being sent. During this phase, you cannot promote the target pod. In addition, changing the link direction might trigger the `baselining` status to recur. A status of `paused ` indicates that data transfer between objects has stopped. A status of `unhealthy` indicates that the link is currently unhealthy and customers must perform some health checks to determine the cause. A status of `quiescing` indicates that the source pod is not accepting new write requests but the most recent changes to the source have not arrived on the target. A status of `quiesced` indicates that the source pod has been demoted and all changes have been replicated to the target pod. + + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'remote_pod_ids', 'remote_pod_names'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api255_pod_replica_links_delete_with_http_info', kwargs) + + def get_pod_replica_links( + self, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pod replica links + + Displays the list of pod replica links that are configured between arrays. + + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names', 'sort'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api255_pod_replica_links_get_with_http_info', kwargs) + + def get_pod_replica_links_lag( + self, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pod replica link lag + + Displays the lag in milliseconds that the replication target is behind the source. This is the time difference between the current time and the recovery point. + + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names', 'sort'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api255_pod_replica_links_lag_get_with_http_info', kwargs) + + def get_pod_replica_links_mappings_policies( + self, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + pod_replica_links: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + pod_replica_link_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of pod replica link IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List policy mappings + + Displays a list of policy mappings. + + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param pod_replica_links: A list of pod_replica_links to query for. Overrides pod_replica_link_ids keyword argument. + :type pod_replica_links: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param pod_replica_link_ids: A comma-separated list of pod replica link IDs. If, after filtering, there is + not at least one resource that matches each of the elements, then an + error is returned. + :type pod_replica_link_ids: List[str] + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + offset=offset, + pod_replica_link_ids=pod_replica_link_ids, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(pod_replica_links, ['pod_replica_link_ids'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'pod_replica_link_ids', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names', 'sort'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api255_pod_replica_links_mappings_policies_get_with_http_info', kwargs) + + def patch_pod_replica_links_mappings_policies( + self, + mapping: 'models.MappingPolicyPatch', + remote_policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + pod_replica_links: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + pod_replica_link_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of pod replica link IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + remote_policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote policy IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_policy_names` query parameter.")] = None, + remote_policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote policy names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_policy_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify policy mappings + + Modifies policy mappings of a replica link. Valid `mapping` values are `connected` and `disconnected`. `connected` indicates that the source policy and its attachments will be mirrored on the target pod. `disconnected` indicates that the associated policy and its attachments are independent from any policy on the remote. This operation can only be performed on the target side of a pod replica link. + + :param mapping: (required) + :type mapping: MappingPolicyPatch + :param remote_policies: A list of remote_policies to query for. Overrides remote_policy_ids and remote_policy_names keyword arguments. + :type remote_policies: ReferenceType or List[ReferenceType], optional + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param pod_replica_links: A list of pod_replica_links to query for. Overrides pod_replica_link_ids keyword argument. + :type pod_replica_links: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param pod_replica_link_ids: A comma-separated list of pod replica link IDs. If, after filtering, there is + not at least one resource that matches each of the elements, then an + error is returned. + :type pod_replica_link_ids: List[str] + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :param remote_policy_ids: A comma-separated list of remote policy IDs. If, after filtering, there is not + at least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_policy_names` + query parameter. + :type remote_policy_ids: List[str] + :param remote_policy_names: A comma-separated list of remote policy names. If, after filtering, there is not + at least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_policy_ids` + query parameter. + :type remote_policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + mapping=mapping, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + pod_replica_link_ids=pod_replica_link_ids, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + remote_policy_ids=remote_policy_ids, + remote_policy_names=remote_policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(pod_replica_links, ['pod_replica_link_ids'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _process_references(remote_policies, ['remote_policy_ids', 'remote_policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'pod_replica_link_ids', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names', 'remote_policy_ids', 'remote_policy_names'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api255_pod_replica_links_mappings_policies_patch_with_http_info', kwargs) + + def patch_pod_replica_links( + self, + pod_replica_link: 'models.PodReplicaLinkPatch', + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify pod replica links + + Modifies pod replica links. The `local_pod_names` and `remote_pod_names` are required. Valid values are `replicating`, `baselining`, `paused`, `unhealthy`, `quiescing`, and `quiesced`. A status of `replicating` indicates that the source array is replicating to the target array. A status of `baselining` indicates that the the initial version of the dataset is being sent. During this phase, you cannot promote the target pod. In addition, changing the link direction might trigger the `baselining` status to recur. A status of `paused ` indicates that data transfer between objects has stopped. A status of `unhealthy` indicates that the link is currently unhealthy and customers must perform some health checks to determine the cause. A status of `quiescing` indicates that the source pod is not accepting new write requests but the most recent changes to the source have not arrived on the target. A status of `quiesced` indicates that the source pod has been demoted and all changes have been replicated to the target pod. + + :param pod_replica_link: (required) + :type pod_replica_link: PodReplicaLinkPatch + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + pod_replica_link=pod_replica_link, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api255_pod_replica_links_patch_with_http_info', kwargs) + + def get_pod_replica_links_performance_replication_by_array( + self, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, only return the aggregate value of all items after filtering. For real-time performance, the values are aggregated for the latest timestamp. For historical performance, the values are aggregated for each timestamp from `start_time` to `end_time`. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List replica link performance data with array details + + The monitoring interface that provides the total number of `bytes` of `replication` data transmitted and received `per second`. This data is organized by `array` and further categorized by the specific `replica link`, `source array`, and `target array` to provide granular visibility into network throughput. + + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, only return the aggregate value of all items after filtering. + For real-time performance, the values are aggregated for the latest + timestamp. For historical performance, the values are aggregated for each + timestamp from `start_time` to `end_time`. Where it makes more sense, the + average value is displayed instead. The values are displayed for each name + where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names', 'sort'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api255_pod_replica_links_performance_replication_by_array_get_with_http_info', kwargs) + + def get_pod_replica_links_performance_replication( + self, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, only return the aggregate value of all items after filtering. For real-time performance, the values are aggregated for the latest timestamp. For historical performance, the values are aggregated for each timestamp from `start_time` to `end_time`. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List replica link performance data + + The monitoring interface or metric that provides the total number of `bytes` of `replication` data transmitted and received `per second`. + + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, only return the aggregate value of all items after filtering. + For real-time performance, the values are aggregated for the latest + timestamp. For historical performance, the values are aggregated for each + timestamp from `start_time` to `end_time`. Where it makes more sense, the + average value is displayed instead. The values are displayed for each name + where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names', 'sort'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api255_pod_replica_links_performance_replication_get_with_http_info', kwargs) + + def post_pod_replica_links( + self, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create pod replica links + + Creates pod replica links between two arrays. The `local_pod_names` and `remote_pod_names` are required. Valid values are `replicating`, `baselining`, `paused`, `unhealthy`, `quiescing`, and `quiesced`. A status of `replicating` indicates that the source array is replicating to the target array. A status of `baselining` indicates that the the initial version of the dataset is being sent. During this phase, you cannot promote the target pod. In addition, changing the link direction might trigger the `baselining` status to recur. A status of `paused ` indicates that data transfer between objects has stopped. A status of `unhealthy` indicates that the link is currently unhealthy and customers must perform some health checks to determine the cause. A status of `quiescing` indicates that the source pod is not accepting new write requests but the most recent changes to the source have not arrived on the target. A status of `quiesced` indicates that the source pod has been demoted and all changes have been replicated to the target pod. + + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'local_pod_ids', 'local_pod_names', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api255_pod_replica_links_post_with_http_info', kwargs) + + def delete_pods_arrays( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + with_unknown: Annotated[Optional[StrictBool], Field(description="If set to `true`, unstretches the specified pod from the specified array by force. Use the `with_unknown` parameter in the following rare event: the local array goes offline while the pod is still stretched across two arrays, the status of the remote array becomes unknown, and there is no guarantee that the pod is online elsewhere.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a pod that was stretched to an array + + Deletes a pod that was stretchd to an array, collapsing the pod to a single array. Unstretch a pod from an array when the volumes within the stretched pod no longer need to be synchronously replicated between the two arrays. After a pod has been unstretched, synchronous replication stops. A destroyed version of the pod with 'restretch' appended to the pod name is created on the array that no longer has the pod. The restretched pod represents a point-in-time snapshot of the pod, just before it was unstretched. The restretch pod enters an eradication pending period starting from the time that the pod was unstretched. A restretched pod can be cloned or destroyed, but it cannot be explicitly recovered. The `group_names` parameter represents the name of the pod to be unstretched. The `member_names` parameter represents the name of the array from which the pod is to be unstretched. The `group_names` and `member_names` parameters are required and must be set together. (Deprecated) Use pods/members instead. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param with_unknown: If set to `true`, unstretches the specified pod from the specified array by + force. Use the `with_unknown` parameter in the following rare event: + the local array goes offline while the pod is still stretched across two + arrays, the status of the remote array becomes unknown, and there is no + guarantee that the pod is online elsewhere. + :type with_unknown: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + with_unknown=with_unknown, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('PodsApi', 'api255_pods_arrays_delete_with_http_info', kwargs) + + def get_pods_arrays( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pods and their the array members + + Displays a list of pods and the local and remote arrays over which the pods are stretched. Pods with realm members will not be returned. The optional `group_names` parameter represents the name of the pod. The optional `member_names` parameter represents the name of the array over which the pod is stretched. (Deprecated) Use pods/members instead.) + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api255_pods_arrays_get_with_http_info', kwargs) + + def post_pods_arrays( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Creates a pod to be stretched to an array + + Creates a pod to be stretched to an array. When a pod is stretched to an array, the data in the arrays over which the pod is stretched is synchronously replicated. The `group_names` parameter represents the name of the pod to be stretched. The `member_names` parameter represents the name of the array over which the pod is to be stretched. The `group_names` and `member_names` parameters are required and must be set together. (Deprecated) Use pods/members instead. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('PodsApi', 'api255_pods_arrays_post_with_http_info', kwargs) + + def delete_pods( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + eradicate_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to eradicate contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups). This enables you to eradicate containers with contents.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a pod + + Deletes a pod that has been destroyed and is pending eradication. Eradicated pods cannot be recovered. Pods are destroyed using the PATCH method. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param eradicate_contents: Set to `true` to eradicate contents (e.g., volumes, protection groups, + snapshots) and containers (e.g., realms, pods, volume groups). This + enables you to eradicate containers with contents. + :type eradicate_contents: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + eradicate_contents=eradicate_contents, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PodsApi', 'api255_pods_delete_with_http_info', kwargs) + + def get_pods( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pods + + Displays a list of pods that are stretched to this array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api255_pods_get_with_http_info', kwargs) + + def delete_pods_members( + self, + pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of pod IDs.")] = None, + pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique pod name specified. Enter multiple names in comma-separated format. For example, `pod01,pod02`.")] = None, + with_unknown: Annotated[Optional[StrictBool], Field(description="If set to `true`, unstretches the specified pod from the specified array by force. Use the `with_unknown` parameter in the following rare event: the local array goes offline while the pod is still stretched across two arrays, the status of the remote array becomes unknown, and there is no guarantee that the pod is online elsewhere.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a member from a pod + + Deletes a stretched pod from an array or realm, collapsing the pod to a member array or realm. Unstretch a pod from an array or realm when the volumes within the stretched podno longer need to be synchronously replicated between the two members. After a pod has been unstretched, synchronous replication stops. A destroyed version of the pod with 'restretch' appended to the pod name is created on the member that no longer has the pod. The restretched pod represents a point-in-time snapshot of the pod, just before it was unstretched. The restretched pod enters an eradication pending period starting from the time that the pod was unstretched. A restretched pod can be cloned or destroyed, but it cannot be explicitly recovered. The `member_names` parameter represents the name of the array or realm from which the pod is to be unstretched. Both pod and member must be specified by name or ID. + + :param pods: A list of pods to query for. Overrides pod_ids and pod_names keyword arguments. + :type pods: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param pod_ids: A comma-separated list of pod IDs. + :type pod_ids: List[str] + :param pod_names: Performs the operation on the unique pod name specified. Enter multiple names in + comma-separated format. For example, `pod01,pod02`. + :type pod_names: List[str] + :param with_unknown: If set to `true`, unstretches the specified pod from the specified array by + force. Use the `with_unknown` parameter in the following rare event: + the local array goes offline while the pod is still stretched across two + arrays, the status of the remote array becomes unknown, and there is no + guarantee that the pod is online elsewhere. + :type with_unknown: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + pod_ids=pod_ids, + pod_names=pod_names, + with_unknown=with_unknown, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(pods, ['pod_ids', 'pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'pod_ids', 'pod_names'], kwargs) + return self._call_api('PodsApi', 'api255_pods_members_delete_with_http_info', kwargs) + + def get_pods_members( + self, + pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of pod IDs.")] = None, + pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique pod name specified. Enter multiple names in comma-separated format. For example, `pod01,pod02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pods and their members + + Displays a list of pods and the local and remote members over which the pods are stretched. Currently either array or realm is supported as member. + + :param pods: A list of pods to query for. Overrides pod_ids and pod_names keyword arguments. + :type pods: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param pod_ids: A comma-separated list of pod IDs. + :type pod_ids: List[str] + :param pod_names: Performs the operation on the unique pod name specified. Enter multiple names in + comma-separated format. For example, `pod01,pod02`. + :type pod_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + pod_ids=pod_ids, + pod_names=pod_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(pods, ['pod_ids', 'pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'pod_ids', 'pod_names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api255_pods_members_get_with_http_info', kwargs) + + def post_pods_members( + self, + pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of pod IDs.")] = None, + pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique pod name specified. Enter multiple names in comma-separated format. For example, `pod01,pod02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Creates a pod to be stretched to a member + + Creates a pod to be stretched to a member. When a pod is stretched to an array or a realm on another array, the data in the arrays or realms over which the pod is stretched is synchronously replicated. The `member_names` or `member_ids` parameter represents the array or realm over which the pod is to be stretched. Both pod and member must be specified by name or ID. + + :param pods: A list of pods to query for. Overrides pod_ids and pod_names keyword arguments. + :type pods: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param pod_ids: A comma-separated list of pod IDs. + :type pod_ids: List[str] + :param pod_names: Performs the operation on the unique pod name specified. Enter multiple names in + comma-separated format. For example, `pod01,pod02`. + :type pod_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + pod_ids=pod_ids, + pod_names=pod_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(pods, ['pod_ids', 'pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'pod_ids', 'pod_names'], kwargs) + return self._call_api('PodsApi', 'api255_pods_members_post_with_http_info', kwargs) + + def patch_pods( + self, + pod: 'models.PodPatch', + to_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + move_with_hosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + move_with_host_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + from_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + abort_quiesce: Annotated[Optional[StrictBool], Field(description="Set to `true` to promote the pod when the `pod-replica-link` is in the `quiescing` state and abort when waiting for the `pod-replica-link` to complete the quiescing operation.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + destroy_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups), including eradicating containers with content.")] = None, + from_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays from which the resource should be removed. Enter multiple IDs in a comma-separated format.")] = None, + from_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays to be removed from the specified resource. Enter multiple names in a comma-separated format.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + move_with_host_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The host groups to be moved together with the pods to the specified local member realm or array. All the hosts in the host groups will also be moved. Enter multiple names in a comma-separated format.")] = None, + move_with_host_names: Annotated[Optional[conlist(StrictStr)], Field(description="The hosts to be moved together with the pods to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + promote_from: Annotated[Optional[StrictStr], Field(description="The `undo-demote` pod that should be used to promote the pod. After the pod has been promoted, it will have the same data as the `undo-demote` pod and the `undo-demote` pod will be eradicated.")] = None, + quiesce: Annotated[Optional[StrictBool], Field(description="Set to `true` to demote the pod after the `pod-replica-link` goes into `quiesced` state and allow the pod to become a target of the remote pod. This ensures that all local data has been replicated to the remote pod before the pod is demoted.")] = None, + skip_quiesce: Annotated[Optional[StrictBool], Field(description="Set to `true` to demote the pod without quiescing the `pod-replica-link` and allow the pod to become a target of the remote pod. This stops all pending replication to the remote pod.")] = None, + to_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format.")] = None, + to_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a pod + + Modifies pod details. + + :param pod: (required) + :type pod: PodPatch + :param to_members: A list of to_members to query for. Overrides to_member_ids and to_member_names keyword arguments. + :type to_members: ReferenceType or List[ReferenceType], optional + :param move_with_hosts: A list of move_with_hosts to query for. Overrides move_with_host_names keyword argument. + :type move_with_hosts: ReferenceType or List[ReferenceType], optional + :param move_with_host_groups: A list of move_with_host_groups to query for. Overrides move_with_host_group_names keyword argument. + :type move_with_host_groups: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param from_members: A list of from_members to query for. Overrides from_member_ids and from_member_names keyword arguments. + :type from_members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param abort_quiesce: Set to `true` to promote the pod when the `pod-replica-link` is in the + `quiescing` state and abort when waiting for the `pod-replica-link` to + complete the quiescing operation. + :type abort_quiesce: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param destroy_contents: Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) + and containers (e.g., realms, pods, volume groups), including eradicating + containers with content. + :type destroy_contents: bool + :param from_member_ids: Move the resource from the specified local member realm or array. This should be + a union of all local realms and arrays from which the resource should be + removed. Enter multiple IDs in a comma-separated format. + :type from_member_ids: List[str] + :param from_member_names: Move the resource from the specified local member realm or array. This should be + a union of all local realms and arrays to be removed from the specified + resource. Enter multiple names in a comma-separated format. + :type from_member_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param move_with_host_group_names: The host groups to be moved together with the pods to the specified local member + realm or array. All the hosts in the host groups will also be moved. + Enter multiple names in a comma-separated format. + :type move_with_host_group_names: List[str] + :param move_with_host_names: The hosts to be moved together with the pods to the specified local member realm + or array. Enter multiple names in a comma-separated format. + :type move_with_host_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param promote_from: The `undo-demote` pod that should be used to promote the pod. After the pod has + been promoted, it will have the same data as the `undo-demote` pod and the + `undo-demote` pod will be eradicated. + :type promote_from: str + :param quiesce: Set to `true` to demote the pod after the `pod-replica-link` goes into + `quiesced` state and allow the pod to become a target of the remote pod. + This ensures that all local data has been replicated to the remote pod + before the pod is demoted. + :type quiesce: bool + :param skip_quiesce: Set to `true` to demote the pod without quiescing the `pod-replica-link` and + allow the pod to become a target of the remote pod. This stops all pending + replication to the remote pod. + :type skip_quiesce: bool + :param to_member_ids: The resource will be moved to the specified local member realm or array. Enter + multiple IDs in a comma-separated format. + :type to_member_ids: List[str] + :param to_member_names: The resource will be moved to the specified local member realm or array. Enter + multiple names in a comma-separated format. + :type to_member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + pod=pod, + authorization=authorization, + x_request_id=x_request_id, + abort_quiesce=abort_quiesce, + context_names=context_names, + destroy_contents=destroy_contents, + from_member_ids=from_member_ids, + from_member_names=from_member_names, + ids=ids, + move_with_host_group_names=move_with_host_group_names, + move_with_host_names=move_with_host_names, + names=names, + promote_from=promote_from, + quiesce=quiesce, + skip_quiesce=skip_quiesce, + to_member_ids=to_member_ids, + to_member_names=to_member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(from_members, ['from_member_ids', 'from_member_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(move_with_host_groups, ['move_with_host_group_names'], kwargs) + _process_references(move_with_hosts, ['move_with_host_names'], kwargs) + _process_references(to_members, ['to_member_ids', 'to_member_names'], kwargs) + _fixup_list_type_params(['context_names', 'from_member_ids', 'from_member_names', 'ids', 'move_with_host_group_names', 'move_with_host_names', 'names', 'to_member_ids', 'to_member_names'], kwargs) + return self._call_api('PodsApi', 'api255_pods_patch_with_http_info', kwargs) + + def get_pods_performance_by_array( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`.")] = None, + protocol_group: Annotated[Optional[StrictStr], Field(description="Protocol group type. Valid values are `block`, `file`, `object-store`, and `all`.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pod performance data by array + + Displays real-time and historical performance data, real-time latency data, and average I/O size data. The data is displayed as a total across all pods on the local array and by individual pod. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`. + :type protocol: str + :param protocol_group: Protocol group type. Valid values are `block`, `file`, `object-store`, and + `all`. + :type protocol_group: str + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + protocol=protocol, + protocol_group=protocol_group, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api255_pods_performance_by_array_get_with_http_info', kwargs) + + def get_pods_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`.")] = None, + protocol_group: Annotated[Optional[StrictStr], Field(description="Protocol group type. Valid values are `block`, `file`, `object-store`, and `all`.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pod performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes across all pods, displayed both by pod and as a total across all pods. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`. + :type protocol: str + :param protocol_group: Protocol group type. Valid values are `block`, `file`, `object-store`, and + `all`. + :type protocol_group: str + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + protocol=protocol, + protocol_group=protocol_group, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api255_pods_performance_get_with_http_info', kwargs) + + def get_pods_performance_replication_by_array( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pod replication performance data by array + + Displays pod replication performance data, organized by array. The data returned is the real-time and historical performance data for each replication type at the pod level. Values include `continuous`, `periodic`, `resync`, and `sync`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api255_pods_performance_replication_by_array_get_with_http_info', kwargs) + + def get_pods_performance_replication( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, only return the aggregate value of all items after filtering. For real-time performance, the values are aggregated for the latest timestamp. For historical performance, the values are aggregated for each timestamp from `start_time` to `end_time`. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pod replication performance data + + Displays pod replication performance data. The data returned is the real-time and historical performance data for each replication type at the pod level. Values include `continuous`, `periodic`, `resync`, and `sync`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, only return the aggregate value of all items after filtering. + For real-time performance, the values are aggregated for the latest + timestamp. For historical performance, the values are aggregated for each + timestamp from `start_time` to `end_time`. Where it makes more sense, the + average value is displayed instead. The values are displayed for each name + where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api255_pods_performance_replication_get_with_http_info', kwargs) + + def post_pods( + self, + pod: 'models.PodPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows operation to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the newly created container (pod or realm) will inherit the default protection configuration from its parent container (realm or array). If specified as `false`, the default protection of the parent container will not be applied automatically. If not specified, defaults to `true`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a pod + + Creates a pod on the local array. Each pod must be given a unique name across the arrays to which they are stretched. A pod cannot be stretched to an array that already contains a pod with the same name. After a pod has been created, add volumes and protection groups, and then stretch the pod to another connected array or realm. + + :param pod: (required) + :type pod: PodPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows operation to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param with_default_protection: If specified as `true`, the newly created container (pod or realm) will inherit + the default protection configuration from its parent container (realm or + array). If specified as `false`, the default protection of the parent + container will not be applied automatically. If not specified, defaults + to `true`. + :type with_default_protection: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + pod=pod, + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + context_names=context_names, + names=names, + with_default_protection=with_default_protection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('PodsApi', 'api255_pods_post_with_http_info', kwargs) + + def get_pods_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pod space information + + Displays provisioned size and physical storage consumption data for each pod on the local array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api255_pods_space_get_with_http_info', kwargs) + + def put_pods_tags_batch( + self, + tag: Annotated[conlist('models.Tag', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if already existing, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags for all specified objects. + + :param tag: A list of tags to be created or, if already existing, updated. (required) + :type tag: List[Tag] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('PodsApi', 'api255_pods_tags_batch_put_with_http_info', kwargs) + + def delete_pods_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('PodsApi', 'api255_pods_tags_delete_with_http_info', kwargs) + + def get_pods_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api255_pods_tags_get_with_http_info', kwargs) + + def post_pods_test( + self, + pod: 'models.PodPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows operation to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the newly created container (pod or realm) will inherit the default protection configuration from its parent container (realm or array). If specified as `false`, the default protection of the parent container will not be applied automatically. If not specified, defaults to `true`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an attempt to clone a pod + + Creates an attempt to clone a pod on the local array without actually cloning it to test whether the pod can be successfully cloned. This action does not suppport pod creation. + + :param pod: (required) + :type pod: PodPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows operation to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param with_default_protection: If specified as `true`, the newly created container (pod or realm) will inherit + the default protection configuration from its parent container (realm or + array). If specified as `false`, the default protection of the parent + container will not be applied automatically. If not specified, defaults + to `true`. + :type with_default_protection: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + pod=pod, + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + context_names=context_names, + names=names, + with_default_protection=with_default_protection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('PodsApi', 'api255_pods_test_post_with_http_info', kwargs) + + def delete_policies_alert_watcher( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete alert-watcher policies + + Deletes one or more alert-watcher policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_alert_watcher_delete_with_http_info', kwargs) + + def get_policies_alert_watcher( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List alert-watcher policies + + Displays a list of alert-watcher policies. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_alert_watcher_get_with_http_info', kwargs) + + def delete_policies_alert_watcher_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between alert-watcher policies and attached object + + Deletes a membership between one or more alert-watcher policies and attached object. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_alert_watcher_members_delete_with_http_info', kwargs) + + def get_policies_alert_watcher_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List alert-watcher policy members + + Displays a list of alert-watcher policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_alert_watcher_members_get_with_http_info', kwargs) + + def post_policies_alert_watcher_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between an object and an alert-watcher policy + + Creates a membership between one or more objects and an alert-watcher policy. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_alert_watcher_members_post_with_http_info', kwargs) + + def patch_policies_alert_watcher( + self, + policy: 'models.PolicyPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify alert-watcher policies + + Modifies one or more alert-watcher policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=false`. To rename a policy, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_alert_watcher_patch_with_http_info', kwargs) + + def post_policies_alert_watcher( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create alert-watcher policies + + Creates one or more alert-watcher policies. To copy a policy, the `source_names` or `source_ids` parameter is required, but they cannot be set together. To create a policy from scratch, policy body is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_alert_watcher_post_with_http_info', kwargs) + + def delete_policies_alert_watcher_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete alert-watcher policy rules + + Deletes one or more alert-watcher policy rules. Either the 'policy_ids' or 'policy_names' parameter is required, but both parameters cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_alert_watcher_rules_delete_with_http_info', kwargs) + + def get_policies_alert_watcher_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List alert-watcher policy rules + + Displays a list of alert-watcher policy rules. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_alert_watcher_rules_get_with_http_info', kwargs) + + def patch_policies_alert_watcher_rules( + self, + rules: 'models.PolicyRuleAlertWatcherPatch', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify alert-watcher policy rules + + Modifies alert-watcher policy rules. + + :param rules: (required) + :type rules: PolicyRuleAlertWatcherPatch + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_alert_watcher_rules_patch_with_http_info', kwargs) + + def post_policies_alert_watcher_rules( + self, + rules: 'models.PolicyRuleAlertWatcherPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create alert-watcher policy rules + + Creates one or more alert-watcher policy rules. Either the 'policy_ids' or 'policy_names' parameter is required, but both parameters cannot be set together. + + :param rules: (required) + :type rules: PolicyRuleAlertWatcherPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_alert_watcher_rules_post_with_http_info', kwargs) + + def get_policies_alert_watcher_rules_test( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List rules of alert-watcher policy rule test + + Displays alert-watcher policy rule email test results. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_alert_watcher_rules_test_get_with_http_info', kwargs) + + def delete_policies_audit_file( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete audit policies + + Deletes one or more audit policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_audit_file_delete_with_http_info', kwargs) + + def get_policies_audit_file( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List audit policies + + Displays a list of audit policies. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_audit_file_get_with_http_info', kwargs) + + def delete_policies_audit_file_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between audit policies and managed directories + + Deletes a membership between one or more audit policies and managed directories. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_audit_file_members_delete_with_http_info', kwargs) + + def get_policies_audit_file_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List audit policy members + + Displays a list of audit policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_audit_file_members_get_with_http_info', kwargs) + + def post_policies_audit_file_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a managed directory and a audit policy + + Creates a membership between one or more managed directories and a audit policy. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_audit_file_members_post_with_http_info', kwargs) + + def patch_policies_audit_file( + self, + policy: 'models.PolicyAuditFilePatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify audit policies + + Modifies one or more audit policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=false`. To rename a policy, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyAuditFilePatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_audit_file_patch_with_http_info', kwargs) + + def post_policies_audit_file( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyAuditFilePost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create audit policies + + Creates one or more audit policies. To copy a policy, the `source_names` or `source_ids` parameter is required, but they cannot be set together. To create a policy from scratch, policy body is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyAuditFilePost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_audit_file_post_with_http_info', kwargs) + + def delete_policies_autodir( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete auto managed directory policies + + Deletes one or more auto managed directory policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_autodir_delete_with_http_info', kwargs) + + def get_policies_autodir( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List auto managed directory policies + + Displays a list of auto managed directory policies. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_autodir_get_with_http_info', kwargs) + + def delete_policies_autodir_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete auto managed directory policies + + Deletes one or more auto managed directory policies from resources. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_autodir_members_delete_with_http_info', kwargs) + + def get_policies_autodir_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List auto managed directories policy members + + Displays a list of auto managed directory policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_autodir_members_get_with_http_info', kwargs) + + def post_policies_autodir_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create auto managed directory policies + + Creates a membership between one or more resources with an auto managed directory policy. Applicable resources are directories. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_autodir_members_post_with_http_info', kwargs) + + def patch_policies_autodir( + self, + policy: 'models.PolicyPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify auto managed directory policies + + Modifies one or more auto managed directory policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=true`. To rename a policy, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_autodir_patch_with_http_info', kwargs) + + def post_policies_autodir( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create auto managed directory policies + + Creates one or more auto managed directory policies. To copy a policy, set one of either `source_names` or `source_ids`. Each policy can only have one entry. To create a policy from scratch, policy body is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_autodir_post_with_http_info', kwargs) + + def get_policies( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List policies + + Displays a list of policies. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_get_with_http_info', kwargs) + + def delete_policies_management_access( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete management access policies + + Deletes one or more management access policies. One of `ids` or `names` is required. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_management_access_delete_with_http_info', kwargs) + + def get_policies_management_access( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List management access policies + + Displays a list of management access policies. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_management_access_get_with_http_info', kwargs) + + def delete_policies_management_access_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in a comma-separated format.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between management access policies and attached object + + Deletes a membership between one or more management access policies and attached object. One of `policy_ids` or `policy_names` is required, as well as one of `member_ids` or `member_names`. `member_types` is required. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in a comma-separated format. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_management_access_members_delete_with_http_info', kwargs) + + def get_policies_management_access_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in a comma-separated format.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in a comma-separated format.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List management access policy members + + Displays a list of management access policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in a comma-separated format. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in a comma-separated format. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_management_access_members_get_with_http_info', kwargs) + + def post_policies_management_access_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in a comma-separated format.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between an object and a management access policy + + Creates a membership between one or more objects and a management access policy. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in a comma-separated format. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_management_access_members_post_with_http_info', kwargs) + + def patch_policies_management_access( + self, + policy: 'models.PolicyManagementAccessPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify management access policies + + Modifies one or more management access policies. One of `ids` or `names` is required. For renames, can only specify one old policy in `ids` or `names`. + + :param policy: (required) + :type policy: PolicyManagementAccessPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_management_access_patch_with_http_info', kwargs) + + def post_policies_management_access( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyManagementAccessPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create management access policies + + Creates one or more management access policies. To copy a policy, one of `source_names` or `source_ids` is required. To create a policy from scratch, policy body is required. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyManagementAccessPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_management_access_post_with_http_info', kwargs) + + def get_policies_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List policy members + + Displays a list of policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_members_get_with_http_info', kwargs) + + def delete_policies_network_access( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete network access policies + + The operation that deletes one or more `network access policies`. This action requires the specification of either `ids` or `names` to identify the target policies, though these parameters are mutually exclusive and cannot be used simultaneously within the same request. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_network_access_delete_with_http_info', kwargs) + + def get_policies_network_access( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List network access policies + + The reporting interface or dataset that provides a `list` of all `network access policies`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_network_access_get_with_http_info', kwargs) + + def get_policies_network_access_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List network access policy members + + The reporting interface or dataset that provides a `list` of all `members` associated with a `network access policy`. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_network_access_members_get_with_http_info', kwargs) + + def patch_policies_network_access( + self, + policy: 'models.PolicyPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify network access policies + + The operation that modifies one or more `network access policies`. This action supports updating the administrative state by adjusting the `enabled` attribute, as well as renaming policies via the `name` parameter. To identify the target policies, the specification of either `ids` or `names` is required; however, these parameters are mutually exclusive and cannot be used simultaneously. + + :param policy: (required) + :type policy: PolicyPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_network_access_patch_with_http_info', kwargs) + + def post_policies_network_access( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create network access policies + + The operation that creates one or more `network access policies`. This action supports two modes: duplicating an existing policy by providing either `source_names` or `source_ids`, or instantiating a new policy from scratch by providing a `policy body`. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_network_access_post_with_http_info', kwargs) + + def delete_policies_network_access_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in a comma-separated format.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete network access policy rules + + The operation that deletes one or more `network access policy rules`. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in a comma-separated format. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_network_access_rules_delete_with_http_info', kwargs) + + def get_policies_network_access_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in a comma-separated format.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List network access policy rules + + The reporting interface or dataset that provides a `list` of all `rules` associated with a `network access policy`. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in a comma-separated format. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_network_access_rules_get_with_http_info', kwargs) + + def patch_policies_network_access_rules( + self, + rules: 'models.PolicyRuleNetworkAccessPatch', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in a comma-separated format.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify network access policy rules + + The operation that modifies one or more `network access policy rules`. + + :param rules: (required) + :type rules: PolicyRuleNetworkAccessPatch + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in a comma-separated format. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_network_access_rules_patch_with_http_info', kwargs) + + def post_policies_network_access_rules( + self, + rules: 'models.PolicyRuleNetworkAccessPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create network access policy rules + + The operation that creates one or more `network access policy rules`. This action requires the specification of either `policy_ids` or `policy_names` to identify the target policies, though these parameters are mutually exclusive and cannot be used simultaneously within the same request. + + :param rules: (required) + :type rules: PolicyRuleNetworkAccessPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_network_access_rules_post_with_http_info', kwargs) + + def delete_policies_nfs_client_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete NFS client policy rules. + + Deletes one or more NFS client policy rules. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_nfs_client_rules_delete_with_http_info', kwargs) + + def get_policies_nfs_client_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List NFS client policy rules + + The list of NFS client policy rules. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_nfs_client_rules_get_with_http_info', kwargs) + + def patch_policies_nfs_client_rules( + self, + rules: 'models.PolicyRuleNfsClientPatch', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify NFS client policy rules + + Modifies one or more NFS client policy rules. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param rules: (required) + :type rules: PolicyRuleNfsClientPatch + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_nfs_client_rules_patch_with_http_info', kwargs) + + def post_policies_nfs_client_rules( + self, + rules: 'models.PolicyRuleNfsClientPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create NFS client policy rules + + The creation of one or more NFS client policy rules. The `policy_ids` or `policy_names` parameter is required; however, these parameters cannot be specified together. + + :param rules: (required) + :type rules: PolicyRuleNfsClientPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_nfs_client_rules_post_with_http_info', kwargs) + + def delete_policies_nfs( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete NFS policies + + Deletes one or more NFS policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_nfs_delete_with_http_info', kwargs) + + def get_policies_nfs( + self, + workloads: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + workload_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter.")] = None, + workload_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List NFS policies + + Displays a list of NFS policies. + + :param workloads: A list of workloads to query for. Overrides workload_ids and workload_names keyword arguments. + :type workloads: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param workload_ids: A comma-separated list of workload IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_names` query + parameter. + :type workload_ids: List[str] + :param workload_names: A comma-separated list of workload names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_ids` query + parameter. + :type workload_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + workload_ids=workload_ids, + workload_names=workload_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(workloads, ['workload_ids', 'workload_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'workload_ids', 'workload_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_nfs_get_with_http_info', kwargs) + + def delete_policies_nfs_members( + self, + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + server_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of server IDs.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete NFS policies + + Deletes one or more NFS policies from resources. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param servers: A list of servers to query for. Overrides server_ids and server_names keyword arguments. + :type servers: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param server_ids: A comma-separated list of server IDs. + :type server_ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + server_ids=server_ids, + server_names=server_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(servers, ['server_ids', 'server_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'server_ids', 'server_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_nfs_members_delete_with_http_info', kwargs) + + def get_policies_nfs_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List NFS policy members + + Displays a list of NFS policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_nfs_members_get_with_http_info', kwargs) + + def post_policies_nfs_members( + self, + members: 'models.PolicyMemberExportPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create NFS policies + + Creates a membership between one or more resources and an NFS policy. Applicable resources are directories. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param members: (required) + :type members: PolicyMemberExportPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_nfs_members_post_with_http_info', kwargs) + + def patch_policies_nfs( + self, + policy: 'models.PolicyNfsPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify NFS policies + + Modifies one or more NFS policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=false`. To rename a policy, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyNfsPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_nfs_patch_with_http_info', kwargs) + + def post_policies_nfs( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyNfsPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create NFS policies + + Creates one or more NFS policies or copies an existing policy. To copy a policy, the `source_names` or `source_ids` parameter is required, but they cannot be set together. To create a policy, policy body is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyNfsPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_nfs_post_with_http_info', kwargs) + + def get_policies_object_store_access( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + exclude_rules: Annotated[Optional[StrictBool], Field(description="If true, the rules field in each policy will be null. If false, each returned policy will include its list of rules in the response. If not specified, defaults to `false`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET policies/object-store-access + + The list of access policies and their associated attributes. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param exclude_rules: If true, the rules field in each policy will be null. If false, each returned + policy will include its list of rules in the response. If not specified, + defaults to `false`. + :type exclude_rules: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + exclude_rules=exclude_rules, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_object_store_access_get_with_http_info', kwargs) + + def delete_policies_object_store_access_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE policies/object-store-access/members + + Revokes an object store user's access policy. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_object_store_access_members_delete_with_http_info', kwargs) + + def get_policies_object_store_access_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET policies/object-store-access/members + + List object store users and their access policies. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_object_store_access_members_get_with_http_info', kwargs) + + def post_policies_object_store_access_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST policies/object-store-access/members + + Grant access policies to an object store user. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_object_store_access_members_post_with_http_info', kwargs) + + def get_policies_object_store_access_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET policies/object-store-access/rules + + The list of access policy rules and their associated attributes. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_object_store_access_rules_get_with_http_info', kwargs) + + def get_policies_password( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List password policies + + Displays a list of password policies. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_password_get_with_http_info', kwargs) + + def patch_policies_password( + self, + policy: 'models.PolicyPassword', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify password policies + + Modifies one or more password policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=false`. + + :param policy: (required) + :type policy: PolicyPassword + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_password_patch_with_http_info', kwargs) + + def delete_policies_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete QoS policies + + The operation that deletes one or more `QoS policies`. Either the `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_qos_delete_with_http_info', kwargs) + + def get_policies_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List QoS policies + + The operation that displays a list of `QoS policies`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_qos_get_with_http_info', kwargs) + + def delete_policies_qos_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between QoS policies and entities + + The operation that deletes a `membership` between one or more `QoS policies` and `entities` by detaching them. For this request, either `policy_ids` or `policy_names` must be provided, and either `member_ids` or `member_names` must be provided; however, the ID and name parameters for each respective category cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_qos_members_delete_with_http_info', kwargs) + + def get_policies_qos_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List QoS policy members + + The operation that displays a list of `QoS policy members`. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_qos_members_get_with_http_info', kwargs) + + def post_policies_qos_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between an entity and a QoS policy + + The operation that creates a `membership` between one or more `entities` and a `QoS policy` by attaching them. Either the `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_qos_members_post_with_http_info', kwargs) + + def patch_policies_qos( + self, + policy: 'models.PolicyQosPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify QoS policies + + The operation that modifies one or more `QoS policies`. To enable a policy, set `enabled=true`; to disable a policy, set `enabled=false`. To rename a policy, set `name` to the new name. Either the `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyQosPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_qos_patch_with_http_info', kwargs) + + def post_policies_qos( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyQosPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create QoS policies + + The operation that creates one or more `QoS policies`. To copy a policy, either the `source_names` or `source_ids` parameter is required, but they cannot be set together. Alternatively, to create a policy from scratch, a `policy body` must be provided. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyQosPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_qos_post_with_http_info', kwargs) + + def delete_policies_quota( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete quota policies + + Deletes one or more quota policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_quota_delete_with_http_info', kwargs) + + def get_policies_quota( + self, + workloads: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + workload_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter.")] = None, + workload_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List quota policies + + Displays a list of quota policies. + + :param workloads: A list of workloads to query for. Overrides workload_ids and workload_names keyword arguments. + :type workloads: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param workload_ids: A comma-separated list of workload IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_names` query + parameter. + :type workload_ids: List[str] + :param workload_names: A comma-separated list of workload names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_ids` query + parameter. + :type workload_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + workload_ids=workload_ids, + workload_names=workload_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(workloads, ['workload_ids', 'workload_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'workload_ids', 'workload_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_quota_get_with_http_info', kwargs) + + def delete_policies_quota_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between quota policies and managed directories + + Deletes a membership between one or more quota policies and managed directories. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_quota_members_delete_with_http_info', kwargs) + + def get_policies_quota_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List quota policy members + + Displays a list of quota policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_quota_members_get_with_http_info', kwargs) + + def post_policies_quota_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a managed directory and a quota policy + + Creates a membership between one or more managed directories and a quota policy. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for quota management operations. If set to `true`, + directory usage is not checked against the `quota_limits` that are set. If + set to `false`, the actual logical bytes in use are prevented from + exceeding the limits set on the directory. Client operations might be + impacted. If the limit exceeds the quota, the client operation is not + allowed. If not specified, defaults to `false`. + :type ignore_usage: bool + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_quota_members_post_with_http_info', kwargs) + + def patch_policies_quota( + self, + policy: 'models.PolicyQuotaPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify quota policies + + Modifies one or more quota policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=false`. To rename a policy, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyQuotaPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param ignore_usage: Flag used to override checks for quota management operations. If set to `true`, + directory usage is not checked against the `quota_limits` that are set. If + set to `false`, the actual logical bytes in use are prevented from + exceeding the limits set on the directory. Client operations might be + impacted. If the limit exceeds the quota, the client operation is not + allowed. If not specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + ignore_usage=ignore_usage, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_quota_patch_with_http_info', kwargs) + + def post_policies_quota( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create quota policies + + Creates one or more quota policies. To copy a policy, the `source_names` or `source_ids` parameter is required, but they cannot be set together. To create a policy from scratch, policy body is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_quota_post_with_http_info', kwargs) + + def delete_policies_quota_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete quota policy rules + + Deletes one or more quota policy rules. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_quota_rules_delete_with_http_info', kwargs) + + def get_policies_quota_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List quota policy rules + + Displays a list of quota policy rules. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_quota_rules_get_with_http_info', kwargs) + + def patch_policies_quota_rules( + self, + rules: 'models.PolicyRuleQuotaPatch', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify quota policy rules + + Modifies quota policy rules. + + :param rules: (required) + :type rules: PolicyRuleQuotaPatch + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for quota management operations. If set to `true`, + directory usage is not checked against the `quota_limits` that are set. If + set to `false`, the actual logical bytes in use are prevented from + exceeding the limits set on the directory. Client operations might be + impacted. If the limit exceeds the quota, the client operation is not + allowed. If not specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_quota_rules_patch_with_http_info', kwargs) + + def post_policies_quota_rules( + self, + rules: 'models.PolicyRuleQuotaPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create quota policy rules + + Creates one or more quota policy rules. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param rules: (required) + :type rules: PolicyRuleQuotaPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for quota management operations. If set to `true`, + directory usage is not checked against the `quota_limits` that are set. If + set to `false`, the actual logical bytes in use are prevented from + exceeding the limits set on the directory. Client operations might be + impacted. If the limit exceeds the quota, the client operation is not + allowed. If not specified, defaults to `false`. + :type ignore_usage: bool + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_quota_rules_post_with_http_info', kwargs) + + def delete_policies_smb_client_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete SMB client policy rules. + + Deletes one or more SMB client policy rules. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_smb_client_rules_delete_with_http_info', kwargs) + + def get_policies_smb_client_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SMB client policy rules + + Displays a list of SMB client policy rules. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_smb_client_rules_get_with_http_info', kwargs) + + def post_policies_smb_client_rules( + self, + rules: 'models.PolicyRuleSmbClientPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create SMB client policy rules + + Creates one or more SMB client policy rules. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param rules: (required) + :type rules: PolicyRuleSmbClientPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_smb_client_rules_post_with_http_info', kwargs) + + def delete_policies_smb( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete SMB policies + + Deletes one or more SMB policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_smb_delete_with_http_info', kwargs) + + def get_policies_smb( + self, + workloads: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + workload_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter.")] = None, + workload_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SMB policies + + Displays a list of SMB policies. + + :param workloads: A list of workloads to query for. Overrides workload_ids and workload_names keyword arguments. + :type workloads: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param workload_ids: A comma-separated list of workload IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_names` query + parameter. + :type workload_ids: List[str] + :param workload_names: A comma-separated list of workload names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_ids` query + parameter. + :type workload_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + workload_ids=workload_ids, + workload_names=workload_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(workloads, ['workload_ids', 'workload_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'workload_ids', 'workload_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_smb_get_with_http_info', kwargs) + + def delete_policies_smb_members( + self, + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + server_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of server IDs.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete SMB policies + + Deletes one or more SMB policies from resources. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param servers: A list of servers to query for. Overrides server_ids and server_names keyword arguments. + :type servers: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param server_ids: A comma-separated list of server IDs. + :type server_ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + server_ids=server_ids, + server_names=server_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(servers, ['server_ids', 'server_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'server_ids', 'server_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_smb_members_delete_with_http_info', kwargs) + + def get_policies_smb_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SMB policy members + + Displays a list of SMB policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_smb_members_get_with_http_info', kwargs) + + def post_policies_smb_members( + self, + members: 'models.PolicyMemberExportPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create SMB policies + + Creates a membership between one or more resources and an SMB policy. Applicable resources are directories. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param members: (required) + :type members: PolicyMemberExportPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_smb_members_post_with_http_info', kwargs) + + def patch_policies_smb( + self, + policy: 'models.PolicySmbPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify SMB policies + + Modifies one or more SMB policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=false`. To enable access based enumeration, set `access_based_enumeration_enabled=true`. To disable access based enumeration, set `access_based_enumeration_enabled=false`. To enable continuous availability, set `continuous_availability=true`. To disable continuous availability, set `continuous_availability=false`. To rename a policy, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicySmbPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_smb_patch_with_http_info', kwargs) + + def post_policies_smb( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicySmbPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create SMB policies + + Creates one or more SMB policies. To copy a policy, set one of either `source_names` or `source_ids`. Each policy can only have one entry. To create a policy from scratch, policy body is required. To create an SMB policy with access based enumeration enabled, set `access_based_enumeration_enabled=true`. To create an SMB policy with continuous availability enabled, set `continuous_availability=true`. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicySmbPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_smb_post_with_http_info', kwargs) + + def delete_policies_snapshot( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete snapshot policies + + Deletes one or more snapshot policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_snapshot_delete_with_http_info', kwargs) + + def get_policies_snapshot( + self, + workloads: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + workload_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter.")] = None, + workload_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List snapshot policies + + Displays a list of snapshot policies. + + :param workloads: A list of workloads to query for. Overrides workload_ids and workload_names keyword arguments. + :type workloads: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param workload_ids: A comma-separated list of workload IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_names` query + parameter. + :type workload_ids: List[str] + :param workload_names: A comma-separated list of workload names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_ids` query + parameter. + :type workload_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + workload_ids=workload_ids, + workload_names=workload_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(workloads, ['workload_ids', 'workload_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'workload_ids', 'workload_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_snapshot_get_with_http_info', kwargs) + + def delete_policies_snapshot_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete snapshot policies + + Deletes one or more snapshot policies from resources. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_snapshot_members_delete_with_http_info', kwargs) + + def get_policies_snapshot_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List snapshot policy members + + Displays a list of snapshot policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_snapshot_members_get_with_http_info', kwargs) + + def post_policies_snapshot_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create snapshot policies + + Creates a membership between one or more resources and a snapshot policy. Applicable resources are directories. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_snapshot_members_post_with_http_info', kwargs) + + def patch_policies_snapshot( + self, + policy: 'models.PolicyLockablePatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify snapshot policies + + Modifies one or more snapshot policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=true`. To rename a policy, set `name` to the new name. To ratchet a policy, set `retention_lock=ratcheted`. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyLockablePatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_snapshot_patch_with_http_info', kwargs) + + def post_policies_snapshot( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create snapshot policies + + Creates one or more snapshot policies. To copy a policy, set one of either `source_names` or `source_ids`. Each policy can only have one entry. To create a policy from scratch, policy body is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_snapshot_post_with_http_info', kwargs) + + def delete_policies_snapshot_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete snapshot policy rules + + Deletes one or more snapshot policy rules. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_snapshot_rules_delete_with_http_info', kwargs) + + def get_policies_snapshot_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List snapshot policy rules + + Displays a list of snapshot policy rules. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_snapshot_rules_get_with_http_info', kwargs) + + def patch_policies_snapshot_rules( + self, + rules: 'models.PolicyRuleSnapshotPatch', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify snapshot policy rules + + Modifies one or more snapshot policy rules. + + :param rules: (required) + :type rules: PolicyRuleSnapshotPatch + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_snapshot_rules_patch_with_http_info', kwargs) + + def post_policies_snapshot_rules( + self, + rules: 'models.PolicyRuleSnapshotPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create snapshot policy rules + + Creates one or more snapshot policy rules. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param rules: (required) + :type rules: PolicyRuleSnapshotPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_snapshot_rules_post_with_http_info', kwargs) + + def delete_policies_tls( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete TLS policies + + The operation that deletes one or more `TLS policies`. A `policy` cannot be deleted if it is currently applied to any `resources`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_tls_delete_with_http_info', kwargs) + + def get_policies_tls( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + effective: Annotated[Optional[StrictBool], Field(description="The flag that, when set to `true`, ensures the `TLS policies` returned are fully evaluated. Evaluation involves expanding shortened `TLS ciphers`, removing disabled `TLS ciphers` from the list of expanded enabled `TLS ciphers`, and converting values such as `default` and `legacy` into concrete values to return the discrete effective TLS settings that the policies encode. This value defaults to `false`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + purity_defined: Annotated[Optional[StrictBool], Field(description="The flag that, when set to `true`, ensures the results returned include the specification for `purity-defined values` on the current `purity version`. These values may be used in configurations to dynamically adopt new behavior across upgrades, and this option allows the exact behavior for the current version to be returned. This value defaults to `false`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List TLS policies + + The operation that returns a list of `TLS policies` and their `attributes`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param effective: The flag that, when set to `true`, ensures the `TLS policies` returned are fully + evaluated. Evaluation involves expanding shortened `TLS ciphers`, removing + disabled `TLS ciphers` from the list of expanded enabled `TLS ciphers`, and + converting values such as `default` and `legacy` into concrete values to + return the discrete effective TLS settings that the policies encode. This + value defaults to `false`. + :type effective: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param purity_defined: The flag that, when set to `true`, ensures the results returned include the + specification for `purity-defined values` on the current `purity version`. + These values may be used in configurations to dynamically adopt new + behavior across upgrades, and this option allows the exact behavior for the + current version to be returned. This value defaults to `false`. + :type purity_defined: bool + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + effective=effective, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + purity_defined=purity_defined, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_tls_get_with_http_info', kwargs) + + def delete_policies_tls_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between TLS policies and attached object + + The operation that deletes a `membership` between one or more `TLS policies` and an `attached object`. For this request, either `policy_ids` or `policy_names` must be provided, and either `member_ids` or `member_names` must be provided; however, the ID and name parameters for each respective category cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_tls_members_delete_with_http_info', kwargs) + + def get_policies_tls_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List TLS policy members + + The operation that displays a list of `TLS policy members`. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_tls_members_get_with_http_info', kwargs) + + def post_policies_tls_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between an object and a TLS policy + + The operation that creates a `membership` between one or more `resources` and a `TLS policy`. Applicable `resources` are `servers`. Either the `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_tls_members_post_with_http_info', kwargs) + + def patch_policies_tls( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy: Optional['models.PolicyTlsPatch'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify TLS policies + + The operation that modifies one or more `TLS policies`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy: + :type policy: PolicyTlsPatch + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_tls_patch_with_http_info', kwargs) + + def post_policies_tls( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyTlsPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create TLS policies + + The operation that creates one or more `TLS policies`. The `names` parameter is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyTlsPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_tls_post_with_http_info', kwargs) + + def delete_policies_user_group_quota( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete user-group-quota policies + + Deletes one or more user-group-quota policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_user_group_quota_delete_with_http_info', kwargs) + + def get_policies_user_group_quota( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List user-group-quota policies + + Displays a list of user-group-quota policies. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_user_group_quota_get_with_http_info', kwargs) + + def delete_policies_user_group_quota_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between user-group-quota policies and managed directories + + Deletes a membership between one or more user-group-quota policies and managed directories. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_user_group_quota_members_delete_with_http_info', kwargs) + + def get_policies_user_group_quota_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List user-group-quota policy members + + Displays a list of user-group-quota policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_user_group_quota_members_get_with_http_info', kwargs) + + def post_policies_user_group_quota_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a managed directory and a user-group-quota policy + + Creates a membership between one or more managed directories and a user-group-quota policy. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_user_group_quota_members_post_with_http_info', kwargs) + + def patch_policies_user_group_quota( + self, + policy: 'models.PolicyPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify user-group-quota policies + + Modifies one or more user-group-quota policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=false`. To rename a policy, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + ignore_usage=ignore_usage, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_user_group_quota_patch_with_http_info', kwargs) + + def post_policies_user_group_quota( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create user-group-quota policies + + Creates one or more user-group-quota policies. To copy a policy, the `source_names` or `source_ids` parameter is required, but they cannot be set together. To create a policy from scratch, policy body is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_user_group_quota_post_with_http_info', kwargs) + + def delete_policies_user_group_quota_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete quota policy rules + + Deletes one or more user-group-quota policy rules. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_user_group_quota_rules_delete_with_http_info', kwargs) + + def get_policies_user_group_quota_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List user-group-quota policy rules + + Displays a list of user-group-quota policy rules. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_user_group_quota_rules_get_with_http_info', kwargs) + + def patch_policies_user_group_quota_rules( + self, + rules: 'models.PolicyRuleUserGroupQuotaPatch', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify user-group-quota policy rules + + Modifies user-group-quota policy rules. + + :param rules: (required) + :type rules: PolicyRuleUserGroupQuotaPatch + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_user_group_quota_rules_patch_with_http_info', kwargs) + + def post_policies_user_group_quota_rules( + self, + rules: 'models.PolicyRuleUserGroupQuotaPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create user-group-quota policy rules + + Creates one or more user-group-quota policy rules. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param rules: (required) + :type rules: PolicyRuleUserGroupQuotaPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api255_policies_user_group_quota_rules_post_with_http_info', kwargs) + + def get_ports( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List ports + + Displays host name, iSCSI Qualified Names (IQNs), NVMe Qualified Names (NQNs), IPv4 address of the portal, Fibre Channel World Wide Names (WWNs), and failover ports, including those that were discovered by Purity//FA and those that have been manually assigned by system administrators. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('PortsApi', 'api255_ports_get_with_http_info', kwargs) + + def get_ports_initiators( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List port initiators + + Displays host iSCSI Qualified Names (IQNs), NVMe Qualified Names (NQNs), and Fibre Channel World Wide Names (WWNs), including those that were discovered by Purity//FA and those that have been manually assigned by system administrators, along with the array ports (targets) on which they are eligible to communicate. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('PortsApi', 'api255_ports_initiators_get_with_http_info', kwargs) + + def delete_presets_workload( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a workload preset + + Deletes a workload preset permanently. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Only one value is + supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PresetsApi', 'api255_presets_workload_delete_with_http_info', kwargs) + + def get_presets_workload( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List workload presets + + Displays a list of workload presets. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PresetsApi', 'api255_presets_workload_get_with_http_info', kwargs) + + def patch_presets_workload( + self, + preset: 'models.PresetWorkloadPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a workload preset + + Modifies a workload preset by overriding the fields specified in `preset`. To rename a workload preset, set name to the new name. + + :param preset: (required) + :type preset: PresetWorkloadPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Only one value is + supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + preset=preset, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PresetsApi', 'api255_presets_workload_patch_with_http_info', kwargs) + + def post_presets_workload( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique resource names specified. Only one value is supported.")], + preset: 'models.PresetWorkloadPost', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + skip_verify_deployable: Annotated[Optional[StrictBool], Field(description="If set to `true`, only the most basic syntax checks are performed on the preset to ensure it is valid, but it is possible that it includes configuration that no array in the current fleet can honor when creating a workload. This is primarily useful when uploading a preset created elsewhere so it can be edited until it is deployable. If set to `false`, when a workload preset is created or updated, arrays in the fleet are queried to ensure at least one array in the fleet can deploy a workload based on the configuration specified in the preset. Defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a workload preset + + Creates one workload preset. + + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. (required) + :type names: List[str] + :param preset: (required) + :type preset: PresetWorkloadPost + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param skip_verify_deployable: If set to `true`, only the most basic syntax checks are performed on the preset + to ensure it is valid, but it is possible that it includes configuration + that no array in the current fleet can honor when creating a workload. + This is primarily useful when uploading a preset created elsewhere so it + can be edited until it is deployable. If set to `false`, when a workload + preset is created or updated, arrays in the fleet are queried to ensure + at least one array in the fleet can deploy a workload based on the + configuration specified in the preset. Defaults to `false`. + :type skip_verify_deployable: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + preset=preset, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + skip_verify_deployable=skip_verify_deployable, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('PresetsApi', 'api255_presets_workload_post_with_http_info', kwargs) + + def put_presets_workload( + self, + preset: 'models.PresetWorkload', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + skip_verify_deployable: Annotated[Optional[StrictBool], Field(description="If set to `true`, only the most basic syntax checks are performed on the preset to ensure it is valid, but it is possible that it includes configuration that no array in the current fleet can honor when creating a workload. This is primarily useful when uploading a preset created elsewhere so it can be edited until it is deployable. If set to `false`, when a workload preset is created or updated, arrays in the fleet are queried to ensure at least one array in the fleet can deploy a workload based on the configuration specified in the preset. Defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update a workload preset + + Updates a workload preset by replacing it with the new contents in `preset`. The `ids` or `names` parameter is required, but they cannot be set together. + + :param preset: (required) + :type preset: PresetWorkload + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Only one value is + supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :param skip_verify_deployable: If set to `true`, only the most basic syntax checks are performed on the preset + to ensure it is valid, but it is possible that it includes configuration + that no array in the current fleet can honor when creating a workload. + This is primarily useful when uploading a preset created elsewhere so it + can be edited until it is deployable. If set to `false`, when a workload + preset is created or updated, arrays in the fleet are queried to ensure + at least one array in the fleet can deploy a workload based on the + configuration specified in the preset. Defaults to `false`. + :type skip_verify_deployable: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + preset=preset, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + skip_verify_deployable=skip_verify_deployable, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PresetsApi', 'api255_presets_workload_put_with_http_info', kwargs) + + def delete_protection_group_snapshots( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a protection group snapshot + + Deletes a protection group snapshot that has been destroyed and is pending eradication. Eradicating a protection group snapshot eradicates all of its protection group snapshots and cannot be recovered. Protection group snapshots are destroyed through the `PATCH` method. The `names` or `ids` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api255_protection_group_snapshots_delete_with_http_info', kwargs) + + def get_protection_group_snapshots( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection group snapshots + + Displays a list of protection group snapshots, including those pending eradication. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api255_protection_group_snapshots_get_with_http_info', kwargs) + + def patch_protection_group_snapshots( + self, + protection_group_snapshot: 'models.ProtectionGroupSnapshotPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a protection group snapshot + + Modifies a protection group snapshot so that it can be destroyed. To destroy a volume, set `destroyed=true`. To recover a volume that has been destroyed and is pending eradication, set `destroyed=false`. The `names` or `ids` parameter is required, but they cannot be set together. + + :param protection_group_snapshot: (required) + :type protection_group_snapshot: ProtectionGroupSnapshotPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + protection_group_snapshot=protection_group_snapshot, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api255_protection_group_snapshots_patch_with_http_info', kwargs) + + def post_protection_group_snapshots( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows snapshot to fail if array health is not optimal.")] = None, + apply_retention: Annotated[Optional[StrictBool], Field(description="If `true`, applies the local and remote retention policy to the snapshots.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + for_replication: Annotated[Optional[StrictBool], Field(description="If `true`, destroys and eradicates the snapshot after 1 hour.")] = None, + replicate: Annotated[Optional[StrictBool], Field(description="If set to `true`, queues up and begins replicating to each allowed target after all earlier replication sessions for the same protection group have been completed to that target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + replicate_now: Annotated[Optional[StrictBool], Field(description="If set to `true`, replicates the snapshots to each allowed target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + protection_group_snapshot: Optional['models.ProtectionGroupSnapshotPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a protection group snapshot and create tags. + + Creates a point-in-time snapshot of the contents of a protection group. The `source_ids` or `source_names` parameter is required, but they cannot be set together. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows snapshot to fail if array health is not optimal. + :type allow_throttle: bool + :param apply_retention: If `true`, applies the local and remote retention policy to the snapshots. + :type apply_retention: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param for_replication: If `true`, destroys and eradicates the snapshot after 1 hour. + :type for_replication: bool + :param replicate: If set to `true`, queues up and begins replicating to each allowed target after + all earlier replication sessions for the same protection group have been + completed to that target. The `replicate` and `replicate_now` parameters + cannot be used together. + :type replicate: bool + :param replicate_now: If set to `true`, replicates the snapshots to each allowed target. The + `replicate` and `replicate_now` parameters cannot be used together. + :type replicate_now: bool + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param protection_group_snapshot: + :type protection_group_snapshot: ProtectionGroupSnapshotPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + apply_retention=apply_retention, + context_names=context_names, + for_replication=for_replication, + replicate=replicate, + replicate_now=replicate_now, + source_ids=source_ids, + source_names=source_names, + protection_group_snapshot=protection_group_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api255_protection_group_snapshots_post_with_http_info', kwargs) + + def post_protection_group_snapshots_replica( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + convert_source_to_baseline: Annotated[Optional[StrictBool], Field(description="Set to `true` to have the snapshot be eradicated when it is no longer baseline on source.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation locally with the target names specified as the destinations of the operation. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an action to send protection group snapshots + + Creates an action to send protection group snapshots to protection pgroup targets. When the `on` option is used, only specified targets will recieve the protection group snapshots. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param convert_source_to_baseline: Set to `true` to have the snapshot be eradicated when it is no longer baseline + on source. + :type convert_source_to_baseline: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation locally with the target names specified as the + destinations of the operation. Enter multiple target names in comma-separated + format. For example, `targetName01,targetName02`. + :type on: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + convert_source_to_baseline=convert_source_to_baseline, + ids=ids, + names=names, + on=on, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api255_protection_group_snapshots_replica_post_with_http_info', kwargs) + + def put_protection_group_snapshots_tags_batch( + self, + tag: Annotated[conlist('models.TagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if already existing, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates or creates tags for all specified objects. + + :param tag: A list of tags to be created or, if already existing, updated. (required) + :type tag: List[TagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api255_protection_group_snapshots_tags_batch_put_with_http_info', kwargs) + + def delete_protection_group_snapshots_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api255_protection_group_snapshots_tags_delete_with_http_info', kwargs) + + def get_protection_group_snapshots_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api255_protection_group_snapshots_tags_get_with_http_info', kwargs) + + def post_protection_group_snapshots_test( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows snapshot to fail if array health is not optimal.")] = None, + apply_retention: Annotated[Optional[StrictBool], Field(description="If `true`, applies the local and remote retention policy to the snapshots.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + for_replication: Annotated[Optional[StrictBool], Field(description="If `true`, destroys and eradicates the snapshot after 1 hour.")] = None, + replicate: Annotated[Optional[StrictBool], Field(description="If set to `true`, queues up and begins replicating to each allowed target after all earlier replication sessions for the same protection group have been completed to that target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + replicate_now: Annotated[Optional[StrictBool], Field(description="If set to `true`, replicates the snapshots to each allowed target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + protection_group_snapshot: Optional['models.ProtectionGroupSnapshotPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an attempt to take protection group snapshot + + Creates an attempt to take the protection group snapshot, without actually taking it, to test if the snapshot can be successfully taken. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows snapshot to fail if array health is not optimal. + :type allow_throttle: bool + :param apply_retention: If `true`, applies the local and remote retention policy to the snapshots. + :type apply_retention: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param for_replication: If `true`, destroys and eradicates the snapshot after 1 hour. + :type for_replication: bool + :param replicate: If set to `true`, queues up and begins replicating to each allowed target after + all earlier replication sessions for the same protection group have been + completed to that target. The `replicate` and `replicate_now` parameters + cannot be used together. + :type replicate: bool + :param replicate_now: If set to `true`, replicates the snapshots to each allowed target. The + `replicate` and `replicate_now` parameters cannot be used together. + :type replicate_now: bool + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param protection_group_snapshot: + :type protection_group_snapshot: ProtectionGroupSnapshotPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + apply_retention=apply_retention, + context_names=context_names, + for_replication=for_replication, + replicate=replicate, + replicate_now=replicate_now, + source_ids=source_ids, + source_names=source_names, + protection_group_snapshot=protection_group_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api255_protection_group_snapshots_test_post_with_http_info', kwargs) + + def get_protection_group_snapshots_transfer( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection group snapshots with transfer statistics + + Displays a list of protection group snapshots and corresponding transfer statistics. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api255_protection_group_snapshots_transfer_get_with_http_info', kwargs) + + def delete_protection_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a protection group + + Deletes a protection group that has been destroyed and is pending eradication. Eradicated protection groups cannot be recovered. Protection groups are destroyed through the `PATCH` method. The `names` parameter is required. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_delete_with_http_info', kwargs) + + def get_protection_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection groups + + Displays a list of protection groups, including their associated source arrays or pods, replication targets, hosts, host groups, and volumes. The list includes protection groups that were created on the local array or realm to replicate snapshot data to other arrays, pods or offload targets, created on a remote array or pod and replicated asynchronously to this array or realm, or created inside a pod on a remote array or realm and stretched to the local array or realm. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_get_with_http_info', kwargs) + + def delete_protection_groups_host_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a host group from a protection group + + Deletes a host group member from a protection group. After the member has been removed, it is no longer protected by the group. Protection group snapshots taken before the member was removed will not be affected. Removing a member from a protection group does not delete the member from the array or realm, and the member can be added back to the protection group at any time. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host group. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_host_groups_delete_with_http_info', kwargs) + + def get_protection_groups_host_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection groups with host group members + + Displays a list of protection groups that have host group members. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_host_groups_get_with_http_info', kwargs) + + def post_protection_groups_host_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Creates an action to add a host group to a protection group + + Creates an action to add a host group member to a protection group. Members that are already in the protection group are not affected. For asynchronous replication, only members of the same type can belong to a protection group. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host group. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_host_groups_post_with_http_info', kwargs) + + def delete_protection_groups_hosts( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a host from a protection group + + Deletes a host member from a protection group. After the member has been removed, it is no longer protected by the group. Any protection group snapshots that were taken before the member was removed will not be affected. Removing a member from a protection group does not delete the member from the array or realm, and the member can be added back to the protection group at any time. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_hosts_delete_with_http_info', kwargs) + + def get_protection_groups_hosts( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection groups with host members + + Displays a list of protection groups that have host members. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_hosts_get_with_http_info', kwargs) + + def post_protection_groups_hosts( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an action to add a host to a protection group + + Creates an action to add a host member to a protection group. Members that are already in the protection group are not affected. For asynchronous replication, only members of the same type can belong to a protection group. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_hosts_post_with_http_info', kwargs) + + def patch_protection_groups( + self, + protection_group: 'models.ProtectionGroup', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a protection group + + Modifies the protection group schedules to generate and replicate snapshots to another array, pod or to an external storage system. Renames or destroys a protection group. + + :param protection_group: (required) + :type protection_group: ProtectionGroup + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + protection_group=protection_group, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_patch_with_http_info', kwargs) + + def get_protection_groups_performance_replication_by_array( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection group replication performance data with array details + + Displays the total number of bytes of replication data transmitted and received per second. The data is grouped by protection group and includes the names of the source array and targets for each protection group. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_performance_replication_by_array_get_with_http_info', kwargs) + + def get_protection_groups_performance_replication( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection group replication performance data + + Displays the total number of bytes of replication data transmitted and received per second. The data is grouped by protection group. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_performance_replication_get_with_http_info', kwargs) + + def post_protection_groups( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The id of the protection group or protection group snapshot to be copied into a new or existing protection group. If the destination protection group and all of its volumes already exist, include the `overwrite` parameter to overwrite all of the existing volumes with the snapshot contents. If including the `overwrite` parameter, the names of the volumes that are being overwritten must match the names of the volumes that are being restored. If the source is a protection group, the latest snapshot of the protection group will be used as the source during the copy operation.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="The name of the protection group or protection group snapshot to be copied into a new or existing protection group. If the destination protection group and all of its volumes already exist, include the `overwrite` parameter to overwrite all of the existing volumes with the snapshot contents. If including the `overwrite` parameter, the names of the volumes that are being overwritten must match the names of the volumes that are being restored. If the source is a protection group, the latest snapshot of the protection group will be used as the source during the copy operation.")] = None, + protection_group: Optional['models.ProtectionGroupPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a protection group and upsert tags + + Creates a protection group on the local array or realm for asynchronous replication. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :param source_ids: The id of the protection group or protection group snapshot to be copied into a + new or existing protection group. If the destination protection group and + all of its volumes already exist, include the `overwrite` parameter to + overwrite all of the existing volumes with the snapshot contents. If + including the `overwrite` parameter, the names of the volumes that are being + overwritten must match the names of the volumes that are being restored. If + the source is a protection group, the latest snapshot of the protection + group will be used as the source during the copy operation. + :type source_ids: List[str] + :param source_names: The name of the protection group or protection group snapshot to be copied into + a new or existing protection group. If the destination protection group and + all of its volumes already exist, include the `overwrite` parameter to + overwrite all of the existing volumes with the snapshot contents. If + including the `overwrite` parameter, the names of the volumes that are + being overwritten must match the names of the volumes that are being + restored. If the source is a protection group, the latest snapshot of the + protection group will be used as the source during the copy operation. + :type source_names: List[str] + :param protection_group: + :type protection_group: ProtectionGroupPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + overwrite=overwrite, + source_ids=source_ids, + source_names=source_names, + protection_group=protection_group, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_post_with_http_info', kwargs) + + def get_protection_groups_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection group space information + + Displays provisioned size and physical storage consumption data for each protection group. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_space_get_with_http_info', kwargs) + + def put_protection_groups_tags_batch( + self, + tag: Annotated[conlist('models.TagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if one already exists, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags for all specified objects. + + :param tag: A list of tags to be created or, if one already exists, updated. (required) + :type tag: List[TagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_tags_batch_put_with_http_info', kwargs) + + def delete_protection_groups_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_tags_delete_with_http_info', kwargs) + + def get_protection_groups_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_tags_get_with_http_info', kwargs) + + def delete_protection_groups_targets( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a target from a protection group + + Deletes an array, pod, or offload target from a protection group. The `group_names` parameter represents the name of the protection group. The `member_names` parameter represents the name of the array, pod, or offload target that is being removed from the protection group. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_targets_delete_with_http_info', kwargs) + + def get_protection_groups_targets( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection groups with targets + + Displays a list of protection groups that have target arrays, pods, or offload targets. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_targets_get_with_http_info', kwargs) + + def patch_protection_groups_targets( + self, + target: 'models.TargetProtectionGroupPostPatch', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a protection group target + + Modifies the source array or pod to replicate protection group data to the target, or disallows the source array or pod from replicating protection group data to the target. The `allowed` parameter must be set from the target array or realm. The `group_names` parameter represents the name of the protection group. The `allowed` and `group_names` parameters are required and must be set together. Offload targets do not support the `allowed` parameter. + + :param target: (required) + :type target: TargetProtectionGroupPostPatch + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + target=target, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_targets_patch_with_http_info', kwargs) + + def post_protection_groups_targets( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an action to add a target to a protection group + + Creates an action to add an array, pod, or offload target to a protection group. The `group_names` parameter represents the name of the protection group. The `member_names` parameter represents the name of the array, pod, or offload target that is being added to the protection group. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_targets_post_with_http_info', kwargs) + + def delete_protection_groups_volumes( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a volume from a protection group + + Deletes a volume member from a protection group. After the member has been deleted, it is no longer protected by the group. Any protection group snapshots that were taken before the member was deleted are not affected. Deleting a member from a protection group does not delete the member from the array or realm, and the member can be added back to the protection group at any time. The `group_names` parameter represents the name of the protection group, and the `member_names` and `member_ids` parameters represent the names or IDs of the volume. The `group_names` parameter, and either the `member_names` or `member_ids` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_volumes_delete_with_http_info', kwargs) + + def get_protection_groups_volumes( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group id specified. Provide multiple resource IDs in comma-separated format. The group_ids or names parameter is required, but they cannot be set together.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + include_remote: Annotated[Optional[StrictBool], Field(description="If set to `true` the response will include remote membership for protection groups that belong to the remote arrays or realms as well as local volumes. Defaults to `false`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_destroyed: Annotated[Optional[StrictBool], Field(description="If true, returns only destroyed member objects. Returns an error if a name of a live member object is specified in the member_names query param. If false, returns only live member objects. Returns an error if a name of a destroyed member object is specified in the member_names query param.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection groups with volume members + + Displays a list of protection groups that have volume members. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: Performs the operation on the unique group id specified. Provide multiple + resource IDs in comma-separated format. The group_ids or names parameter is + required, but they cannot be set together. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param include_remote: If set to `true` the response will include remote membership for protection + groups that belong to the remote arrays or realms as well as local volumes. + Defaults to `false`. + :type include_remote: bool + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_destroyed: If true, returns only destroyed member objects. Returns an error if a name of a + live member object is specified in the member_names query param. If false, + returns only live member objects. Returns an error if a name of a + destroyed member object is specified in the member_names query param. + :type member_destroyed: bool + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + include_remote=include_remote, + limit=limit, + member_destroyed=member_destroyed, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_volumes_get_with_http_info', kwargs) + + def post_protection_groups_volumes( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a volume to add it to a protection group + + Creates a volume member and adds it to a protection group. Members that are already in the protection group are not affected. For asynchronous replication, only members of the same type can belong to a protection group. The `group_names` parameter represents the name of the protection group, and the `member_names` and `member_ids` parameters represent the names or IDs of the volume. The `group_names` parameter, and either the `member_names` or `member_ids` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api255_protection_groups_volumes_post_with_http_info', kwargs) + + def delete_realm_connections_connection_keys( + self, + realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete realm connection keys + + Deletes all connection keys for a given realm. Note that every realm connection key is a one-time key and is deleted automatically upon a successful connection or once it expires. + + :param realms: A list of realms to query for. Overrides realm_ids and realm_names keyword arguments. + :type realms: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` + can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + realm_ids=realm_ids, + realm_names=realm_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(realms, ['realm_ids', 'realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'realm_ids', 'realm_names'], kwargs) + return self._call_api('RealmConnectionsApi', 'api255_realm_connections_connection_keys_delete_with_http_info', kwargs) + + def get_realm_connections_connection_keys( + self, + realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Get realm connection key information + + Displays information about existing realm connection keys. Secret keys are not displayed, as they are only available at the time of key creation. + + :param realms: A list of realms to query for. Overrides realm_ids and realm_names keyword arguments. + :type realms: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` + can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + realm_ids=realm_ids, + realm_names=realm_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(realms, ['realm_ids', 'realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'realm_ids', 'realm_names', 'sort'], kwargs) + return self._call_api('RealmConnectionsApi', 'api255_realm_connections_connection_keys_get_with_http_info', kwargs) + + def post_realm_connections_connection_keys( + self, + connection_key: 'models.RealmConnectionKeyPost', + realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create realm connection key + + Creates a new one-time connection key to allow establishing a connection to the specified realm. The key is valid until a successful connection is established or its expiration time is reached. Note that this is the only time the connection key is displayed; it cannot be retrieved subsequently. + + :param connection_key: (required) + :type connection_key: RealmConnectionKeyPost + :param realms: A list of realms to query for. Overrides realm_ids and realm_names keyword arguments. + :type realms: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` + can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + connection_key=connection_key, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + realm_ids=realm_ids, + realm_names=realm_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(realms, ['realm_ids', 'realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'realm_ids', 'realm_names'], kwargs) + return self._call_api('RealmConnectionsApi', 'api255_realm_connections_connection_keys_post_with_http_info', kwargs) + + def delete_realm_connections( + self, + remote_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format.")] = None, + local_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together.")] = None, + local_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together.")] = None, + remote_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + remote_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete realm connections. + + Deletes connections between realms. + + :param remote_realms: A list of remote_realms to query for. Overrides remote_realm_ids and remote_realm_names keyword arguments. + :type remote_realms: ReferenceType or List[ReferenceType], optional + :param local_realms: A list of local_realms to query for. Overrides local_realm_ids and local_realm_names keyword arguments. + :type local_realms: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Enter multiple + resource IDs in comma-separated format. + :type ids: List[str] + :param local_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The local_realm_ids and + local_realm_names parameters cannot be set together. + :type local_realm_ids: List[str] + :param local_realm_names: Performs the operation on the specified unique resource names. Enter multiple + resource names in comma-separated format. The local_realm_names and + local_realm_ids parameters cannot be set together. + :type local_realm_names: List[str] + :param remote_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_ids: List[str] + :param remote_realm_names: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + local_realm_ids=local_realm_ids, + local_realm_names=local_realm_names, + remote_realm_ids=remote_realm_ids, + remote_realm_names=remote_realm_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_realms, ['local_realm_ids', 'local_realm_names'], kwargs) + _process_references(remote_realms, ['remote_realm_ids', 'remote_realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_realm_ids', 'local_realm_names', 'remote_realm_ids', 'remote_realm_names'], kwargs) + return self._call_api('RealmConnectionsApi', 'api255_realm_connections_delete_with_http_info', kwargs) + + def get_realm_connections( + self, + remote_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together.")] = None, + local_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + remote_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List realm connections. + + Displays a list of configured realm connections. + + :param remote_realms: A list of remote_realms to query for. Overrides remote_realm_ids and remote_realm_names keyword arguments. + :type remote_realms: ReferenceType or List[ReferenceType], optional + :param local_realms: A list of local_realms to query for. Overrides local_realm_ids and local_realm_names keyword arguments. + :type local_realms: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: Performs the operation on the unique resource IDs specified. Enter multiple + resource IDs in comma-separated format. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param local_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The local_realm_ids and + local_realm_names parameters cannot be set together. + :type local_realm_ids: List[str] + :param local_realm_names: Performs the operation on the specified unique resource names. Enter multiple + resource names in comma-separated format. The local_realm_names and + local_realm_ids parameters cannot be set together. + :type local_realm_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param remote_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_ids: List[str] + :param remote_realm_names: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + local_realm_ids=local_realm_ids, + local_realm_names=local_realm_names, + offset=offset, + remote_realm_ids=remote_realm_ids, + remote_realm_names=remote_realm_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_realms, ['local_realm_ids', 'local_realm_names'], kwargs) + _process_references(remote_realms, ['remote_realm_ids', 'remote_realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_realm_ids', 'local_realm_names', 'remote_realm_ids', 'remote_realm_names', 'sort'], kwargs) + return self._call_api('RealmConnectionsApi', 'api255_realm_connections_get_with_http_info', kwargs) + + def patch_realm_connections( + self, + connection: 'models.RealmConnectionWithKey', + remote_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format.")] = None, + local_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together.")] = None, + local_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together.")] = None, + remote_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + remote_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify realm connections. + + Modifies the connection type between realms. + + :param connection: (required) + :type connection: RealmConnectionWithKey + :param remote_realms: A list of remote_realms to query for. Overrides remote_realm_ids and remote_realm_names keyword arguments. + :type remote_realms: ReferenceType or List[ReferenceType], optional + :param local_realms: A list of local_realms to query for. Overrides local_realm_ids and local_realm_names keyword arguments. + :type local_realms: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Enter multiple + resource IDs in comma-separated format. + :type ids: List[str] + :param local_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The local_realm_ids and + local_realm_names parameters cannot be set together. + :type local_realm_ids: List[str] + :param local_realm_names: Performs the operation on the specified unique resource names. Enter multiple + resource names in comma-separated format. The local_realm_names and + local_realm_ids parameters cannot be set together. + :type local_realm_names: List[str] + :param remote_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_ids: List[str] + :param remote_realm_names: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + connection=connection, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + local_realm_ids=local_realm_ids, + local_realm_names=local_realm_names, + remote_realm_ids=remote_realm_ids, + remote_realm_names=remote_realm_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_realms, ['local_realm_ids', 'local_realm_names'], kwargs) + _process_references(remote_realms, ['remote_realm_ids', 'remote_realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_realm_ids', 'local_realm_names', 'remote_realm_ids', 'remote_realm_names'], kwargs) + return self._call_api('RealmConnectionsApi', 'api255_realm_connections_patch_with_http_info', kwargs) + + def post_realm_connections( + self, + connection: 'models.RealmConnectionWithKey', + remote_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together.")] = None, + local_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together.")] = None, + remote_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + remote_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create realm connection. + + Creates a new connection between two realms. + + :param connection: (required) + :type connection: RealmConnectionWithKey + :param remote_realms: A list of remote_realms to query for. Overrides remote_realm_ids and remote_realm_names keyword arguments. + :type remote_realms: ReferenceType or List[ReferenceType], optional + :param local_realms: A list of local_realms to query for. Overrides local_realm_ids and local_realm_names keyword arguments. + :type local_realms: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The local_realm_ids and + local_realm_names parameters cannot be set together. + :type local_realm_ids: List[str] + :param local_realm_names: Performs the operation on the specified unique resource names. Enter multiple + resource names in comma-separated format. The local_realm_names and + local_realm_ids parameters cannot be set together. + :type local_realm_names: List[str] + :param remote_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_ids: List[str] + :param remote_realm_names: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + connection=connection, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_realm_ids=local_realm_ids, + local_realm_names=local_realm_names, + remote_realm_ids=remote_realm_ids, + remote_realm_names=remote_realm_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_realms, ['local_realm_ids', 'local_realm_names'], kwargs) + _process_references(remote_realms, ['remote_realm_ids', 'remote_realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'local_realm_ids', 'local_realm_names', 'remote_realm_ids', 'remote_realm_names'], kwargs) + return self._call_api('RealmConnectionsApi', 'api255_realm_connections_post_with_http_info', kwargs) + + def delete_realms( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + eradicate_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to eradicate contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups). This enables you to eradicate containers with contents.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete realms + + Deletes realms that have been destroyed and are pending eradication. Eradicated realms cannot be recovered. Realms are destroyed using the PATCH method. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param eradicate_contents: Set to `true` to eradicate contents (e.g., volumes, protection groups, + snapshots) and containers (e.g., realms, pods, volume groups). This + enables you to eradicate containers with contents. + :type eradicate_contents: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + eradicate_contents=eradicate_contents, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('RealmsApi', 'api255_realms_delete_with_http_info', kwargs) + + def get_realms( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List realms + + Displays a list of realms. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('RealmsApi', 'api255_realms_get_with_http_info', kwargs) + + def delete_realms_members( + self, + realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a member from a realm + + The deletion of a `stretched realm` from an `array`, collapsing the `realm` to a `member array`. Unstretch a `realm` from an `array` when the `data` within the `stretched realm` no longer needs to be synchronously replicated between the two `members`. After a `realm` has been unstretched, synchronous replication stops. A `destroyed` version of the `realm` with `restretch` appended to the `realm name` is created on the `member` that no longer has the `realm`. The `restretched realm` represents a point-in-time `snapshot` of the `realm`, just before it was unstretched. The `restretched realm` enters an `eradication pending period` starting from the time that the `realm` was unstretched. A `restretched realm` can be `destroyed`, but it cannot be explicitly recovered. The `member_names` parameter represents the `name` of the `array` from which the `realm` is to be unstretched. Both `realm` and `member` must be specified by `name` or `ID`. + + :param realms: A list of realms to query for. Overrides realm_ids and realm_names keyword arguments. + :type realms: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` + can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + realm_ids=realm_ids, + realm_names=realm_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(realms, ['realm_ids', 'realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'realm_ids', 'realm_names'], kwargs) + return self._call_api('RealmsApi', 'api255_realms_members_delete_with_http_info', kwargs) + + def get_realms_members( + self, + realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List realms and their members + + The list of `realms` and the `local` and `remote array members` over which the `realms` are stretched. Currently, either `array` is supported as a `member`. + + :param realms: A list of realms to query for. Overrides realm_ids and realm_names keyword arguments. + :type realms: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` + can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + realm_ids=realm_ids, + realm_names=realm_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(realms, ['realm_ids', 'realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'realm_ids', 'realm_names', 'sort'], kwargs) + return self._call_api('RealmsApi', 'api255_realms_members_get_with_http_info', kwargs) + + def post_realms_members( + self, + realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Creates a stretched realm + + The creation of a `stretched realm`. When a `realm` is stretched to an `array`, the `data` in the `arrays` over which the `realm` is stretched is synchronously replicated. The `member_names` or `member_ids` parameter represents the `array` over which the `realm` is to be stretched. Both `realm` and `member` must be specified by `name` or `ID`. + + :param realms: A list of realms to query for. Overrides realm_ids and realm_names keyword arguments. + :type realms: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` + can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + realm_ids=realm_ids, + realm_names=realm_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(realms, ['realm_ids', 'realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'realm_ids', 'realm_names'], kwargs) + return self._call_api('RealmsApi', 'api255_realms_members_post_with_http_info', kwargs) + + def patch_realms( + self, + realm: 'models.RealmPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + destroy_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups), including eradicating containers with content.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Set to `true` to set a `quota_limit` that is lower than the existing usage. This ensures that no new volumes can be created until the existing usage drops below the `quota_limit`. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify realms + + Modifies realm details. + + :param realm: (required) + :type realm: RealmPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param destroy_contents: Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) + and containers (e.g., realms, pods, volume groups), including eradicating + containers with content. + :type destroy_contents: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param ignore_usage: Set to `true` to set a `quota_limit` that is lower than the existing usage. This + ensures that no new volumes can be created until the existing usage drops + below the `quota_limit`. If not specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + realm=realm, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + destroy_contents=destroy_contents, + ids=ids, + ignore_usage=ignore_usage, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('RealmsApi', 'api255_realms_patch_with_http_info', kwargs) + + def get_realms_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List realm performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes across all realms, displayed both by realm and as a total across all realms. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('RealmsApi', 'api255_realms_performance_get_with_http_info', kwargs) + + def post_realms( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the newly created container (pod or realm) will inherit the default protection configuration from its parent container (realm or array). If specified as `false`, the default protection of the parent container will not be applied automatically. If not specified, defaults to `true`.")] = None, + realm: Optional['models.RealmPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create realms + + Creates realms on the local array. Each realm must be given a name that is unique across the connected arrays. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param with_default_protection: If specified as `true`, the newly created container (pod or realm) will inherit + the default protection configuration from its parent container (realm or + array). If specified as `false`, the default protection of the parent + container will not be applied automatically. If not specified, defaults + to `true`. + :type with_default_protection: bool + :param realm: + :type realm: RealmPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + with_default_protection=with_default_protection, + realm=realm, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('RealmsApi', 'api255_realms_post_with_http_info', kwargs) + + def get_realms_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List realm QoS config + + Displays real-time and historical QoS configuration data for each realm. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('RealmsApi', 'api255_realms_qos_get_with_http_info', kwargs) + + def get_realms_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List realm space information + + Displays provisioned size and storage consumption data for each realm on the local array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('RealmsApi', 'api255_realms_space_get_with_http_info', kwargs) + + def put_realms_tags_batch( + self, + tag: Annotated[conlist('models.NonCopyableTag', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if already existing, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates or creates tags for all specified objects. + + :param tag: A list of tags to be created or, if already existing, updated. (required) + :type tag: List[NonCopyableTag] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('RealmsApi', 'api255_realms_tags_batch_put_with_http_info', kwargs) + + def delete_realms_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('RealmsApi', 'api255_realms_tags_delete_with_http_info', kwargs) + + def get_realms_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('RealmsApi', 'api255_realms_tags_get_with_http_info', kwargs) + + def get_remote_arrays( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + current_fleet_only: Annotated[Optional[StrictBool], Field(description="If current_fleet_only is specified, then results will only show arrays from the same fleet to which the current array is a member of.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote arrays + + The operation that displays `arrays` in the current `fleet`, as well as `arrays` that the current `array` has existing `replication connections` to. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param current_fleet_only: If current_fleet_only is specified, then results will only show arrays from the + same fleet to which the current array is a member of. + :type current_fleet_only: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + current_fleet_only=current_fleet_only, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('RemoteArraysApi', 'api255_remote_arrays_get_with_http_info', kwargs) + + def patch_remote_arrays( + self, + to_topology_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + to_topology_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The operation that moves a selected `remote array` to a specified `topology group` by ID. Either the `to_topology_group_ids` or `to_topology_group_names` parameter is required, but they cannot be set together.")] = None, + to_topology_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The operation that moves a selected `remote array` to a specified `topology group` by name. Either the `to_topology_group_ids` or `to_topology_group_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify remote arrays + + The operation that modifies the `topology group` of `remote arrays`. + + :param to_topology_groups: A list of to_topology_groups to query for. Overrides to_topology_group_ids and to_topology_group_names keyword arguments. + :type to_topology_groups: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param to_topology_group_ids: The operation that moves a selected `remote array` to a specified `topology + group` by ID. Either the `to_topology_group_ids` or + `to_topology_group_names` parameter is required, but they cannot be set + together. + :type to_topology_group_ids: List[str] + :param to_topology_group_names: The operation that moves a selected `remote array` to a specified `topology + group` by name. Either the `to_topology_group_ids` or + `to_topology_group_names` parameter is required, but they cannot be set + together. + :type to_topology_group_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + to_topology_group_ids=to_topology_group_ids, + to_topology_group_names=to_topology_group_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _process_references(to_topology_groups, ['to_topology_group_ids', 'to_topology_group_names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'to_topology_group_ids', 'to_topology_group_names'], kwargs) + return self._call_api('RemoteArraysApi', 'api255_remote_arrays_patch_with_http_info', kwargs) + + def get_remote_pods( + self, + ons: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + on_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified target IDs. Enter multiple target IDs in comma-separated format. The on and on_ids parameters cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote pods + + Displays a list of pods that that are on connected arrays or realms but not stretched to this array or realm. + + :param ons: A list of ons to query for. Overrides on_ids keyword argument. + :type ons: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param on_ids: Performs the operation on the specified target IDs. Enter multiple target IDs in + comma-separated format. The on and on_ids parameters cannot be set together. + :type on_ids: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + on=on, + on_ids=on_ids, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(ons, ['on_ids'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on', 'on_ids', 'sort'], kwargs) + return self._call_api('RemotePodsApi', 'api255_remote_pods_get_with_http_info', kwargs) + + def get_remote_pods_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + ons: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + on_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified target IDs. Enter multiple target IDs in comma-separated format. The on and on_ids parameters cannot be set together.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param ons: A list of ons to query for. Overrides on_ids keyword argument. + :type ons: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param on_ids: Performs the operation on the specified target IDs. Enter multiple target IDs in + comma-separated format. The on and on_ids parameters cannot be set together. + :type on_ids: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + on=on, + on_ids=on_ids, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(ons, ['on_ids'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'on', 'on_ids', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('RemotePodsApi', 'api255_remote_pods_tags_get_with_http_info', kwargs) + + def delete_remote_protection_group_snapshots( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a remote protection group snapshot + + Deletes a remote protection group snapshot that has been destroyed and is pending eradication. Eradicated remote protection group snapshots cannot be recovered. Remote protection group snapshots are destroyed using the `PATCH` method. The `names` parameter represents the name of the protection group snapshot. The `on` parameter represents the name of the offload target. The `names` and `on` parameters are required and must be used together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + on=on, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('RemoteProtectionGroupSnapshotsApi', 'api255_remote_protection_group_snapshots_delete_with_http_info', kwargs) + + def get_remote_protection_group_snapshots( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote protection group snapshots + + Displays a list of remote protection group snapshots. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + on=on, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('RemoteProtectionGroupSnapshotsApi', 'api255_remote_protection_group_snapshots_get_with_http_info', kwargs) + + def patch_remote_protection_group_snapshots( + self, + remote_protection_group_snapshot: 'models.DestroyedPatchPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a remote protection group snapshot + + Modifies a remote protection group snapshot, removing it from the offload target and destroying the snapshot. The `on` parameter represents the name of the offload target. The `ids` or `names` parameter and the `on` parameter are required and must be used together. + + :param remote_protection_group_snapshot: (required) + :type remote_protection_group_snapshot: DestroyedPatchPost + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + remote_protection_group_snapshot=remote_protection_group_snapshot, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + on=on, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('RemoteProtectionGroupSnapshotsApi', 'api255_remote_protection_group_snapshots_patch_with_http_info', kwargs) + + def post_remote_protection_group_snapshots( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows snapshot to fail if array health is not optimal.")] = None, + apply_retention: Annotated[Optional[StrictBool], Field(description="If `true`, applies the local and remote retention policy to the snapshots.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + convert_source_to_baseline: Annotated[Optional[StrictBool], Field(description="Set to `true` to have the snapshot be eradicated when it is no longer baseline on source.")] = None, + for_replication: Annotated[Optional[StrictBool], Field(description="If `true`, destroys and eradicates the snapshot after 1 hour.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + replicate: Annotated[Optional[StrictBool], Field(description="If set to `true`, queues up and begins replicating to each allowed target after all earlier replication sessions for the same protection group have been completed to that target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + replicate_now: Annotated[Optional[StrictBool], Field(description="If set to `true`, replicates the snapshots to each allowed target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + remote_protection_group_snapshot: Optional['models.RemoteProtectionGroupSnapshotPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create remote protection group snapshot and tags + + Creates remote protection group snapshots. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows snapshot to fail if array health is not optimal. + :type allow_throttle: bool + :param apply_retention: If `true`, applies the local and remote retention policy to the snapshots. + :type apply_retention: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param convert_source_to_baseline: Set to `true` to have the snapshot be eradicated when it is no longer baseline + on source. + :type convert_source_to_baseline: bool + :param for_replication: If `true`, destroys and eradicates the snapshot after 1 hour. + :type for_replication: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :param replicate: If set to `true`, queues up and begins replicating to each allowed target after + all earlier replication sessions for the same protection group have been + completed to that target. The `replicate` and `replicate_now` parameters + cannot be used together. + :type replicate: bool + :param replicate_now: If set to `true`, replicates the snapshots to each allowed target. The + `replicate` and `replicate_now` parameters cannot be used together. + :type replicate_now: bool + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param remote_protection_group_snapshot: + :type remote_protection_group_snapshot: RemoteProtectionGroupSnapshotPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + apply_retention=apply_retention, + context_names=context_names, + convert_source_to_baseline=convert_source_to_baseline, + for_replication=for_replication, + ids=ids, + names=names, + on=on, + replicate=replicate, + replicate_now=replicate_now, + source_ids=source_ids, + source_names=source_names, + remote_protection_group_snapshot=remote_protection_group_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('RemoteProtectionGroupSnapshotsApi', 'api255_remote_protection_group_snapshots_post_with_http_info', kwargs) + + def post_remote_protection_group_snapshots_test( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows snapshot to fail if array health is not optimal.")] = None, + apply_retention: Annotated[Optional[StrictBool], Field(description="If `true`, applies the local and remote retention policy to the snapshots.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + convert_source_to_baseline: Annotated[Optional[StrictBool], Field(description="Set to `true` to have the snapshot be eradicated when it is no longer baseline on source.")] = None, + for_replication: Annotated[Optional[StrictBool], Field(description="If `true`, destroys and eradicates the snapshot after 1 hour.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + replicate: Annotated[Optional[StrictBool], Field(description="If set to `true`, queues up and begins replicating to each allowed target after all earlier replication sessions for the same protection group have been completed to that target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + replicate_now: Annotated[Optional[StrictBool], Field(description="If set to `true`, replicates the snapshots to each allowed target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + remote_protection_group_snapshot: Optional['models.RemoteProtectionGroupSnapshotPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an attempt to take remote protection group snapshot + + Creates an attempt to take a remote protection group snapshot without actually taking it, to test if the snapshot can be successfully taken. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows snapshot to fail if array health is not optimal. + :type allow_throttle: bool + :param apply_retention: If `true`, applies the local and remote retention policy to the snapshots. + :type apply_retention: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param convert_source_to_baseline: Set to `true` to have the snapshot be eradicated when it is no longer baseline + on source. + :type convert_source_to_baseline: bool + :param for_replication: If `true`, destroys and eradicates the snapshot after 1 hour. + :type for_replication: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :param replicate: If set to `true`, queues up and begins replicating to each allowed target after + all earlier replication sessions for the same protection group have been + completed to that target. The `replicate` and `replicate_now` parameters + cannot be used together. + :type replicate: bool + :param replicate_now: If set to `true`, replicates the snapshots to each allowed target. The + `replicate` and `replicate_now` parameters cannot be used together. + :type replicate_now: bool + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param remote_protection_group_snapshot: + :type remote_protection_group_snapshot: RemoteProtectionGroupSnapshotPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + apply_retention=apply_retention, + context_names=context_names, + convert_source_to_baseline=convert_source_to_baseline, + for_replication=for_replication, + ids=ids, + names=names, + on=on, + replicate=replicate, + replicate_now=replicate_now, + source_ids=source_ids, + source_names=source_names, + remote_protection_group_snapshot=remote_protection_group_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('RemoteProtectionGroupSnapshotsApi', 'api255_remote_protection_group_snapshots_test_post_with_http_info', kwargs) + + def get_remote_protection_group_snapshots_transfer( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote protection groups with transfer statistics + + Displays a list of remote protection groups and their transfer statistics. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + on=on, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('RemoteProtectionGroupSnapshotsApi', 'api255_remote_protection_group_snapshots_transfer_get_with_http_info', kwargs) + + def delete_remote_protection_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a remote protection group + + Deletes a remote protection group that has been destroyed and is pending eradication. Eradicated remote protection groups cannot be recovered. Remote protection groups are destroyed through the `PATCH` method. The `on` parameter represents the name of the offload target. The `ids` or `names` parameter and the `on` parameter are required and must be used together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + on=on, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('RemoteProtectionGroupsApi', 'api255_remote_protection_groups_delete_with_http_info', kwargs) + + def get_remote_protection_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote protection groups + + Returns a list of remote protection groups. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + on=on, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on', 'sort'], kwargs) + return self._call_api('RemoteProtectionGroupsApi', 'api255_remote_protection_groups_get_with_http_info', kwargs) + + def patch_remote_protection_groups( + self, + remote_protection_group: 'models.RemoteProtectionGroup', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a remote protection group + + Modifies the snapshot retention schedule of a remote protection group. Also destroys a remote protection group from the offload target. Before the remote protection group can be destroyed, the offload target must first be removed from the protection group via the source array. The `on` parameter represents the name of the offload target. The `ids` or `names` parameter and the `on` parameter are required and must be used together. + + :param remote_protection_group: (required) + :type remote_protection_group: RemoteProtectionGroup + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + remote_protection_group=remote_protection_group, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + on=on, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('RemoteProtectionGroupsApi', 'api255_remote_protection_groups_patch_with_http_info', kwargs) + + def get_remote_realms( + self, + ons: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + on_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified target IDs. Enter multiple target IDs in comma-separated format. The on and on_ids parameters cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote realms + + Displays a list of realms that are on connected arrays. + + :param ons: A list of ons to query for. Overrides on_ids keyword argument. + :type ons: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param on_ids: Performs the operation on the specified target IDs. Enter multiple target IDs in + comma-separated format. The on and on_ids parameters cannot be set together. + :type on_ids: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + on=on, + on_ids=on_ids, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(ons, ['on_ids'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on', 'on_ids', 'sort'], kwargs) + return self._call_api('RemoteRealmsApi', 'api255_remote_realms_get_with_http_info', kwargs) + + def get_remote_realms_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + ons: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + on_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified target IDs. Enter multiple target IDs in comma-separated format. The on and on_ids parameters cannot be set together.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param ons: A list of ons to query for. Overrides on_ids keyword argument. + :type ons: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param on_ids: Performs the operation on the specified target IDs. Enter multiple target IDs in + comma-separated format. The on and on_ids parameters cannot be set together. + :type on_ids: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + on=on, + on_ids=on_ids, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(ons, ['on_ids'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'on', 'on_ids', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('RemoteRealmsApi', 'api255_remote_realms_tags_get_with_http_info', kwargs) + + def delete_remote_volume_snapshots( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + replication_snapshot: Annotated[Optional[StrictBool], Field(description="If set to `true`, allow destruction/eradication of snapshots in use by replication. If set to `false`, allow destruction/eradication of snapshots not in use by replication. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a remote volume snapshot + + Deletes a remote volume snapshot that has been destroyed and is pending eradication. Eradicated remote volume snapshots cannot be recovered. Remote volume snapshots are destroyed through the `PATCH` method. The `names` parameter represents the name of the volume snapshot. The `on` parameter represents the name of the offload target. The `names` and `on` parameters are required and must be used together. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :param replication_snapshot: If set to `true`, allow destruction/eradication of snapshots in use by + replication. If set to `false`, allow destruction/eradication of + snapshots not in use by replication. If not specified, defaults to + `false`. + :type replication_snapshot: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + on=on, + replication_snapshot=replication_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('RemoteVolumeSnapshotsApi', 'api255_remote_volume_snapshots_delete_with_http_info', kwargs) + + def get_remote_volume_snapshots( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote volume snapshots + + Displays a list of remote volume snapshots. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + on=on, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('RemoteVolumeSnapshotsApi', 'api255_remote_volume_snapshots_get_with_http_info', kwargs) + + def patch_remote_volume_snapshots( + self, + remote_volume_snapshot: 'models.DestroyedPatchPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + replication_snapshot: Annotated[Optional[StrictBool], Field(description="If set to `true`, allow destruction/eradication of snapshots in use by replication. If set to `false`, allow destruction/eradication of snapshots not in use by replication. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a remote volume snapshot + + Modifies a remote volume snapshot by destroying or recovering it from the offload target. The `on` parameter represents the name of the offload target. The `names` parameter and the `on` parameter are required and must be used together. + + :param remote_volume_snapshot: (required) + :type remote_volume_snapshot: DestroyedPatchPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :param replication_snapshot: If set to `true`, allow destruction/eradication of snapshots in use by + replication. If set to `false`, allow destruction/eradication of + snapshots not in use by replication. If not specified, defaults to + `false`. + :type replication_snapshot: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + remote_volume_snapshot=remote_volume_snapshot, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + on=on, + replication_snapshot=replication_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('RemoteVolumeSnapshotsApi', 'api255_remote_volume_snapshots_patch_with_http_info', kwargs) + + def post_remote_volume_snapshots( + self, + remote_volume_snapshot: 'models.RemoteVolumeSnapshotPost', + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a volume snapshot on a connected remote target or offload target + + Creates a volume snapshot on the specified connected remote target or offload target. + + :param remote_volume_snapshot: (required) + :type remote_volume_snapshot: RemoteVolumeSnapshotPost + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + remote_volume_snapshot=remote_volume_snapshot, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + on=on, + source_ids=source_ids, + source_names=source_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('RemoteVolumeSnapshotsApi', 'api255_remote_volume_snapshots_post_with_http_info', kwargs) + + def get_remote_volume_snapshots_transfer( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote volume snapshots with transfer statistics + + Displays a list of remote volume snapshots and their transfer statistics. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + on=on, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('RemoteVolumeSnapshotsApi', 'api255_remote_volume_snapshots_transfer_get_with_http_info', kwargs) + + def post_resource_accesses_batch( + self, + items: conlist('models.ResourceAccess'), + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a resource access configuration + + Creates resource access objects. + + :param items: (required) + :type items: List[ResourceAccess] + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + items=items, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['items'], kwargs) + return self._call_api('ResourceAccessesApi', 'api255_resource_accesses_batch_post_with_http_info', kwargs) + + def delete_resource_accesses( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a resource access configuration + + Deletes a resource access object. + + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: Performs the operation on the unique resource IDs specified. Enter multiple + resource IDs in comma-separated format. + :type ids: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids'], kwargs) + _fixup_list_type_params(['ids'], kwargs) + return self._call_api('ResourceAccessesApi', 'api255_resource_accesses_delete_with_http_info', kwargs) + + def get_resource_accesses( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List resource access configurations + + Displays a list of configured resource accesses. + + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: Performs the operation on the unique resource IDs specified. Enter multiple + resource IDs in comma-separated format. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids'], kwargs) + _fixup_list_type_params(['ids', 'sort'], kwargs) + return self._call_api('ResourceAccessesApi', 'api255_resource_accesses_get_with_http_info', kwargs) + + def get_resource_accesses_status( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List status of resource accesses as specified by resource access configuration + + Displays a list of effective resource accesses. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ResourceAccessesApi', 'api255_resource_accesses_status_get_with_http_info', kwargs) + + def delete_sso_saml2_idps( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete SAML2 SSO configurations + + Deletes SAML2 SSO configurations. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('SAML2SSOApi', 'api255_sso_saml2_idps_delete_with_http_info', kwargs) + + def get_sso_saml2_idps( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SAML2 SSO configurations + + Displays the SAML2 SSO service provider and identity provider configuration settings in the array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('SAML2SSOApi', 'api255_sso_saml2_idps_get_with_http_info', kwargs) + + def patch_sso_saml2_idps( + self, + idp: 'models.Saml2SsoPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify SAML2 SSO configurations + + Modifies one or more attributes of SAML2 SSO configurations. + + :param idp: (required) + :type idp: Saml2SsoPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + idp=idp, + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('SAML2SSOApi', 'api255_sso_saml2_idps_patch_with_http_info', kwargs) + + def post_sso_saml2_idps( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + idp: 'models.Saml2SsoPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create SAML2 SSO configurations + + Creates SAML2 SSO configurations. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param idp: (required) + :type idp: Saml2SsoPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + idp=idp, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('SAML2SSOApi', 'api255_sso_saml2_idps_post_with_http_info', kwargs) + + def get_sso_saml2_idps_test( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List existing SAML2 SSO configurations + + Displays the existing SAML2 SSO configurations in the array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('SAML2SSOApi', 'api255_sso_saml2_idps_test_get_with_http_info', kwargs) + + def patch_sso_saml2_idps_test( + self, + idp: 'models.Saml2SsoPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify provided SAML2 SSO configurations + + Modifies the provided SAML2 SSO configurations. If the configurations with the specified `ids` or `names` exist, the provided configurations will overwrite the existing configurations, but will not be persisted in the array. + + :param idp: (required) + :type idp: Saml2SsoPost + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + idp=idp, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('SAML2SSOApi', 'api255_sso_saml2_idps_test_patch_with_http_info', kwargs) + + def get_smi_s( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SMI-S settings + + Displays the SMI-S settings, including whether SLP and WBEM-HTTPS are enabled. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SMISApi', 'api255_smi_s_get_with_http_info', kwargs) + + def patch_smi_s( + self, + smi_s: 'models.Smis', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify SLP and SMI-S + + Modifies the Service Location Protocol (SLP) and the SMI-S provider, enabling or disabling them. + + :param smi_s: (required) + :type smi_s: Smis + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + smi_s=smi_s, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SMISApi', 'api255_smi_s_patch_with_http_info', kwargs) + + def get_smtp_servers( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SMTP server attributes + + Displays SMTP server attributes. Values include `user_name`, `password`, `relay_host`, `sender_domain`, `sender_username`, `subject_prefix`, `body_prefix`, `encryption_mode`, and `name`. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SMTPApi', 'api255_smtp_servers_get_with_http_info', kwargs) + + def patch_smtp_servers( + self, + smtp: 'models.SmtpServer', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify SMTP server attributes + + Modifies SMTP server attributes. Values include `user_name`, `password`, `relay_host`, `sender_domain`, `sender_username`, `subject_prefix`, `body_prefix`, `encryption_mode`, and `name`. + + :param smtp: (required) + :type smtp: SmtpServer + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + smtp=smtp, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SMTPApi', 'api255_smtp_servers_patch_with_http_info', kwargs) + + def get_snmp_agents( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SNMP agent + + Displays the SNMP agent name and protocol attributes. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SNMPAgentsApi', 'api255_snmp_agents_get_with_http_info', kwargs) + + def get_snmp_agents_mib( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SNMP agent MIB text + + Displays the SNMP MIB text. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SNMPAgentsApi', 'api255_snmp_agents_mib_get_with_http_info', kwargs) + + def patch_snmp_agents( + self, + snmp_agent: 'models.SnmpAgentPatch', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify SNMP agent + + Modifies the name or the protocol attributes of the SNMP agent. + + :param snmp_agent: (required) + :type snmp_agent: SnmpAgentPatch + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + snmp_agent=snmp_agent, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SNMPAgentsApi', 'api255_snmp_agents_patch_with_http_info', kwargs) + + def delete_snmp_managers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete SNMP manager + + Deletes the SNMP manager object and stops communication with specified managers. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('SNMPManagersApi', 'api255_snmp_managers_delete_with_http_info', kwargs) + + def get_snmp_managers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SNMP managers + + Displays designated SNMP managers and their communication and security attributes. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('SNMPManagersApi', 'api255_snmp_managers_get_with_http_info', kwargs) + + def patch_snmp_managers( + self, + snmp_manager: 'models.SnmpManagerPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify SNMP manager + + Modifies the name or the protocol attributes of the specified SNMP manager. + + :param snmp_manager: (required) + :type snmp_manager: SnmpManagerPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + snmp_manager=snmp_manager, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('SNMPManagersApi', 'api255_snmp_managers_patch_with_http_info', kwargs) + + def post_snmp_managers( + self, + snmp_manager: 'models.SnmpManagerPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create SNMP manager + + Creates a Purity SNMP manager object that identifies a host (SNMP manager) and specifies the protocol attributes for communicating with it. Once a manager object is created, the transmission of SNMP traps is immediately enabled. + + :param snmp_manager: (required) + :type snmp_manager: SnmpManagerPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + snmp_manager=snmp_manager, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('SNMPManagersApi', 'api255_snmp_managers_post_with_http_info', kwargs) + + def get_snmp_managers_test( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SNMP manager test results + + Displays SNMP manager test results (traps or informs). + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('SNMPManagersApi', 'api255_snmp_managers_test_get_with_http_info', kwargs) + + def delete_servers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + cascade_delete: Annotated[Optional[conlist(StrictStr)], Field(description="The resource types to delete when deleting the object. It will fail if the resources are referenced by other objects. Valid values include `directory-services`.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete server + + Deletes a server. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param cascade_delete: The resource types to delete when deleting the object. It will fail if the + resources are referenced by other objects. Valid values include `directory- + services`. + :type cascade_delete: List[str] + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + cascade_delete=cascade_delete, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['cascade_delete', 'context_names', 'ids', 'names'], kwargs) + return self._call_api('ServersApi', 'api255_servers_delete_with_http_info', kwargs) + + def get_servers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List servers + + Displays a list of servers. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ServersApi', 'api255_servers_get_with_http_info', kwargs) + + def patch_servers( + self, + server: 'models.ServerPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify server + + Modifies server details. + + :param server: (required) + :type server: ServerPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + server=server, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ServersApi', 'api255_servers_patch_with_http_info', kwargs) + + def delete_servers_policies_tls( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between TLS policies and attached object + + The operation that deletes a `membership` between a `server` and a `TLS policy`. For this request, either `policy_ids` or `policy_names` must be provided, and either `member_ids` or `member_names` must be provided; however, the ID and name parameters for each respective category cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('ServersApi', 'api255_servers_policies_tls_delete_with_http_info', kwargs) + + def get_servers_policies_tls( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List TLS policies attached to servers + + The operation that displays a list of `TLS policies` that are attached to `servers`. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('ServersApi', 'api255_servers_policies_tls_get_with_http_info', kwargs) + + def post_servers_policies_tls( + self, + policies: 'models.PolicyAssignmentPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a server and a TLS policy + + The operation that creates a `membership` between a `server` and a `TLS policy`. For this request, either the `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: (required) + :type policies: PolicyAssignmentPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('ServersApi', 'api255_servers_policies_tls_post_with_http_info', kwargs) + + def post_servers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + create_local_directory_service: Annotated[Optional[StrictStr], Field(description="The name of the local directory service object to be created and associated to the server. This parameter cannot be used together with `local_directory_service` property in the request entity.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + server: Optional['models.ServerPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create server + + Creates a server on the local array. The server must be given a unique name. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param create_local_directory_service: The name of the local directory service object to be created and associated to + the server. This parameter cannot be used together with + `local_directory_service` property in the request entity. + :type create_local_directory_service: str + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param server: + :type server: ServerPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + create_local_directory_service=create_local_directory_service, + names=names, + server=server, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('ServersApi', 'api255_servers_post_with_http_info', kwargs) + + def get_sessions( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List session data + + Displays session data for user login events performed in the Purity//FA GUI, CLI, and REST API. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('SessionsApi', 'api255_sessions_get_with_http_info', kwargs) + + def get_software_bundle( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List software-bundle + + Displays a list of software bundles. + + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids'], kwargs) + _fixup_list_type_params(['ids', 'sort'], kwargs) + return self._call_api('SoftwareApi', 'api255_software_bundle_get_with_http_info', kwargs) + + def post_software_bundle( + self, + source: 'models.SoftwareBundlePost', + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create software-bundle + + Creates and initiates a software bundle download. + + :param source: (required) + :type source: SoftwareBundlePost + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + source=source, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SoftwareApi', 'api255_software_bundle_post_with_http_info', kwargs) + + def delete_software_check( + self, + softwares: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + software_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of software names.")] = None, + software_versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of target software versions.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a software check task + + Deletes a software check task specified by software name and version. The check task must be queued. If the check task is running or passed/failed then the task cannot be deleted. + + :param softwares: A list of softwares to query for. Overrides software_names keyword argument. + :type softwares: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param software_names: A comma-separated list of software names. + :type software_names: List[str] + :param software_versions: A comma-separated list of target software versions. + :type software_versions: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + software_names=software_names, + software_versions=software_versions, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(softwares, ['software_names'], kwargs) + _fixup_list_type_params(['software_names', 'software_versions'], kwargs) + return self._call_api('SoftwareApi', 'api255_software_check_delete_with_http_info', kwargs) + + def get_software_check( + self, + softwares: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + software_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of software names.")] = None, + software_versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of target software versions.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List software check tasks + + Displays a list of software check tasks. + + :param softwares: A list of softwares to query for. Overrides software_names keyword argument. + :type softwares: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param software_names: A comma-separated list of software names. + :type software_names: List[str] + :param software_versions: A comma-separated list of target software versions. + :type software_versions: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + software_names=software_names, + software_versions=software_versions, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _process_references(softwares, ['software_names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'software_names', 'software_versions', 'sort'], kwargs) + return self._call_api('SoftwareApi', 'api255_software_check_get_with_http_info', kwargs) + + def post_software_check( + self, + softwares: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + software_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of software names.")] = None, + software_versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of target software versions.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a software check task + + Creates a software check task. If there are no previously queued or running software check tasks, the new task immediately starts. Otherwise, it is queued and starts once all previously queued or running software check tasks finish. To create a task, use a software name and version. + + :param softwares: A list of softwares to query for. Overrides software_names keyword argument. + :type softwares: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param software_names: A comma-separated list of software names. + :type software_names: List[str] + :param software_versions: A comma-separated list of target software versions. + :type software_versions: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + software_names=software_names, + software_versions=software_versions, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(softwares, ['software_names'], kwargs) + _fixup_list_type_params(['software_names', 'software_versions'], kwargs) + return self._call_api('SoftwareApi', 'api255_software_check_post_with_http_info', kwargs) + + def delete_software( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + software_versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of target software versions.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a software package + + Deletes a software package specified by software name and version. A software package being used for an installation can be deleted if the installation is `downloading`, `downloaded`, `aborted`, or `finished`. If the software package is currently `downloading`, the download will be cancelled. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param software_versions: A comma-separated list of target software versions. + :type software_versions: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + names=names, + software_versions=software_versions, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'software_versions'], kwargs) + return self._call_api('SoftwareApi', 'api255_software_delete_with_http_info', kwargs) + + def get_software( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of versions.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List software packages + + Displays a list of available software packages. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param versions: A comma-separated list of versions. + :type versions: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + versions=versions, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort', 'versions'], kwargs) + return self._call_api('SoftwareApi', 'api255_software_get_with_http_info', kwargs) + + def get_software_installation_steps( + self, + software_installations: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + software_installation_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of software installation IDs.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List software upgrade steps + + Displays a list of currently running and completed software upgrade steps. + + :param software_installations: A list of software_installations to query for. Overrides software_installation_ids keyword argument. + :type software_installations: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param software_installation_ids: A comma-separated list of software installation IDs. + :type software_installation_ids: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + software_installation_ids=software_installation_ids, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _process_references(software_installations, ['software_installation_ids'], kwargs) + _fixup_list_type_params(['ids', 'names', 'software_installation_ids', 'sort'], kwargs) + return self._call_api('SoftwareApi', 'api255_software_installation_steps_get_with_http_info', kwargs) + + def get_software_installations( + self, + softwares: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + software_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of software IDs.")] = None, + software_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of software names.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List software upgrades + + Displays a list of software upgrades, including currently running and past upgrades. + + :param softwares: A list of softwares to query for. Overrides software_ids and software_names keyword arguments. + :type softwares: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param software_ids: A comma-separated list of software IDs. + :type software_ids: List[str] + :param software_names: A comma-separated list of software names. + :type software_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + software_ids=software_ids, + software_names=software_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _process_references(softwares, ['software_ids', 'software_names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'software_ids', 'software_names', 'sort'], kwargs) + return self._call_api('SoftwareApi', 'api255_software_installations_get_with_http_info', kwargs) + + def patch_software_installations( + self, + command: Annotated[StrictStr, Field(..., description="A user command that interacts with the upgrade. Commands may only be issued when the upgrade is paused. Valid values are `continue`, `retry`, and `abort`. The `continue` command continues a `paused` upgrade. The `retry` command retries the previous step. The `abort` command aborts the upgrade.")], + current_step_id: Annotated[StrictStr, Field(..., description="The current step `id` of the installation.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + software_installations: Optional['models.SoftwareInstallationPatch'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify software upgrade + + Modifies a software upgrade by continuing, retrying, or aborting it. All `override_checks` are updated before the command is issued if `add_override_checks` is present. The `override_checks` parameter is valid when `command` is set to `continue` or `retry`. + + :param command: A user command that interacts with the upgrade. Commands may only be issued when + the upgrade is paused. Valid values are `continue`, `retry`, and `abort`. + The `continue` command continues a `paused` upgrade. The `retry` command + retries the previous step. The `abort` command aborts the upgrade. + (required) + :type command: str + :param current_step_id: The current step `id` of the installation. (required) + :type current_step_id: str + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param software_installations: + :type software_installations: SoftwareInstallationPatch + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + command=command, + current_step_id=current_step_id, + authorization=authorization, + x_request_id=x_request_id, + software_installations=software_installations, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SoftwareApi', 'api255_software_installations_patch_with_http_info', kwargs) + + def post_software_installations( + self, + software_ids: Annotated[conlist(StrictStr), Field(..., description="A comma-separated list of software IDs.")], + software_installations: 'models.SoftwareInstallationPost', + softwares: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a software upgrade + + Creates and initiates a software upgrade. + + :param software_ids: A comma-separated list of software IDs. (required) + :type software_ids: List[str] + :param software_installations: (required) + :type software_installations: SoftwareInstallationPost + :param softwares: A list of softwares to query for. Overrides software_ids keyword argument. + :type softwares: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + software_ids=software_ids, + software_installations=software_installations, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(softwares, ['software_ids'], kwargs) + _fixup_list_type_params(['software_ids'], kwargs) + return self._call_api('SoftwareApi', 'api255_software_installations_post_with_http_info', kwargs) + + def get_software_patches_catalog( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List available software patches + + Displays a list of available software patches. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SoftwareApi', 'api255_software_patches_catalog_get_with_http_info', kwargs) + + def get_software_patches( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List software patches + + Displays a list of software patches. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('SoftwareApi', 'api255_software_patches_get_with_http_info', kwargs) + + def post_software_patches( + self, + name: Annotated[StrictStr, Field(..., description="Name of software patch to install")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_ha_reduction: Annotated[Optional[StrictBool], Field(description="If Software Patch has ha_reduction_required set to true, `allow_ha_reduction` must be set to `true` for Software Patch installation.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a software patch + + Creates software patch download and installation. + + :param name: Name of software patch to install (required) + :type name: str + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_ha_reduction: If Software Patch has ha_reduction_required set to true, `allow_ha_reduction` + must be set to `true` for Software Patch installation. + :type allow_ha_reduction: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + name=name, + authorization=authorization, + x_request_id=x_request_id, + allow_ha_reduction=allow_ha_reduction, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SoftwareApi', 'api255_software_patches_post_with_http_info', kwargs) + + def post_software( + self, + software: 'models.SoftwarePost', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a software package + + Creates a software package download. + + :param software: (required) + :type software: SoftwarePost + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + software=software, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SoftwareApi', 'api255_software_post_with_http_info', kwargs) + + def get_software_versions( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List software versions + + Displays a list of software versions. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SoftwareApi', 'api255_software_versions_get_with_http_info', kwargs) + + def delete_subnets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete subnet + + Deletes subnets. A subnet can only be deleted if it has no interfaces. Interfaces must be removed by using the `network-interfaces` endpoint. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('SubnetsApi', 'api255_subnets_delete_with_http_info', kwargs) + + def get_subnets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List subnets + + Displays a list of subnets with statuses and attributes. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('SubnetsApi', 'api255_subnets_get_with_http_info', kwargs) + + def patch_subnets( + self, + subnet: 'models.SubnetPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify subnet + + Modifies one or more specified subnet properties. + + :param subnet: (required) + :type subnet: SubnetPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + subnet=subnet, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('SubnetsApi', 'api255_subnets_patch_with_http_info', kwargs) + + def post_subnets( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + subnet: 'models.SubnetPost', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create subnet + + Creates a subnet with the specified parameters. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param subnet: (required) + :type subnet: SubnetPost + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + subnet=subnet, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('SubnetsApi', 'api255_subnets_post_with_http_info', kwargs) + + def get_subscription_assets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List subscription assets + + Displays information about subscription assets. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('SubscriptionAssetsApi', 'api255_subscription_assets_get_with_http_info', kwargs) + + def get_subscriptions( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List subscriptions + + Displays information about subscriptions. + + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids'], kwargs) + _fixup_list_type_params(['ids', 'sort'], kwargs) + return self._call_api('SubscriptionsApi', 'api255_subscriptions_get_with_http_info', kwargs) + + def get_support_diagnostics_details( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List diagnostics details + + Displays the diagnostics tests details. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SupportApi', 'api255_support_diagnostics_details_get_with_http_info', kwargs) + + def get_support_diagnostics_settings( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List diagnostics tools version and last updated date + + Displays diagnostics tools version and last updated date. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SupportApi', 'api255_support_diagnostics_settings_get_with_http_info', kwargs) + + def patch_support_diagnostics_settings( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + purity_default: Annotated[Optional[StrictBool], Field(description="Set diagnostics tool to default version.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update diagnostics tools + + Update diagnostics tools from downloaded bundle. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param purity_default: Set diagnostics tool to default version. + :type purity_default: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + purity_default=purity_default, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SupportApi', 'api255_support_diagnostics_settings_patch_with_http_info', kwargs) + + def get_support( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List connection paths + + Displays connection paths between the current array and each connected array. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SupportApi', 'api255_support_get_with_http_info', kwargs) + + def patch_support( + self, + support: 'models.SupportPatch', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create connection path + + Creates a connection path from the array to another array. + + :param support: (required) + :type support: SupportPatch + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + support=support, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SupportApi', 'api255_support_patch_with_http_info', kwargs) + + def get_support_remote_assist_sessions( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote assist session + + Displays settings for remote assist sessions. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SupportApi', 'api255_support_remote_assist_sessions_get_with_http_info', kwargs) + + def patch_support_remote_assist_sessions( + self, + support: 'models.SupportRemoteAssistSessionsPatch', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify remote assist session + + Modifies settings for remote assist sessions. + + :param support: (required) + :type support: SupportRemoteAssistSessionsPatch + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + support=support, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SupportApi', 'api255_support_remote_assist_sessions_patch_with_http_info', kwargs) + + def get_support_remote_assist_sessions_settings( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote assist session global settings + + Displays global settings for remote assist sessions. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SupportApi', 'api255_support_remote_assist_sessions_settings_get_with_http_info', kwargs) + + def patch_support_remote_assist_sessions_settings( + self, + support: 'models.SupportRemoteAssistSessionsSettings', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update remote assist session global settings + + Updates global settings for remote assist sessions. + + :param support: (required) + :type support: SupportRemoteAssistSessionsSettings + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + support=support, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SupportApi', 'api255_support_remote_assist_sessions_settings_patch_with_http_info', kwargs) + + def get_support_system_manifest( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List the system manifest + + The creation and return of the system manifest as a `JSON` object. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SupportApi', 'api255_support_system_manifest_get_with_http_info', kwargs) + + def get_support_test( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + test_type: Annotated[Optional[StrictStr], Field(description="Specifies the type of test. Valid values are `all`, `phonehome`, and `remote-assist`. If not specified, defaults to `all`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List Pure Storage Support connection data + + Displays information about whether the array can connect to Pure Storage Support by establishing a secure shell or secure HTTP connection and verifies that messages can be exchanged. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param test_type: Specifies the type of test. Valid values are `all`, `phonehome`, and `remote- + assist`. If not specified, defaults to `all`. + :type test_type: str + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + test_type=test_type, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SupportApi', 'api255_support_test_get_with_http_info', kwargs) + + def delete_syslog_servers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete syslog server + + Deletes a configured syslog server and stops forwarding syslog messages. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('SyslogApi', 'api255_syslog_servers_delete_with_http_info', kwargs) + + def get_syslog_servers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List syslog servers + + Displays a list of configured syslog servers. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('SyslogApi', 'api255_syslog_servers_get_with_http_info', kwargs) + + def patch_syslog_servers( + self, + syslog_server: 'models.SyslogServer', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify syslog server + + Modifies the URI and services of a configured syslog server. + + :param syslog_server: (required) + :type syslog_server: SyslogServer + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + syslog_server=syslog_server, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('SyslogApi', 'api255_syslog_servers_patch_with_http_info', kwargs) + + def post_syslog_servers( + self, + syslog_server: 'models.SyslogServer', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create syslog server + + Creates a new syslog server. + + :param syslog_server: (required) + :type syslog_server: SyslogServer + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + syslog_server=syslog_server, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('SyslogApi', 'api255_syslog_servers_post_with_http_info', kwargs) + + def get_syslog_servers_settings( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List syslog settings + + Displays syslog settings. Values include `continuation_token`, `items`, `more_items_remaining`, and `total_item_count`. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('SyslogApi', 'api255_syslog_servers_settings_get_with_http_info', kwargs) + + def patch_syslog_servers_settings( + self, + syslog_server_settings: 'models.SyslogServerSettings', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify syslog settings + + Modifies syslog settings. Values include `continuation_token`, `items`, `more_items_remaining`, and `total_item_count`. + + :param syslog_server_settings: (required) + :type syslog_server_settings: SyslogServerSettings + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + syslog_server_settings=syslog_server_settings, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('SyslogApi', 'api255_syslog_servers_settings_patch_with_http_info', kwargs) + + def get_syslog_servers_test( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List syslog server test results + + Displays syslog server test results, which indicate whether the syslog is working and configured correctly. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('SyslogApi', 'api255_syslog_servers_test_get_with_http_info', kwargs) + + def get_topology_groups_arrays( + self, + topology_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + topology_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by ID. Multiple IDs must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + topology_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by name. Multiple names must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List topology group arrays + + The operation that lists `arrays` that are `members` of `topology groups`. Specific `topology groups` and `members` can be selected via `query parameters`. + + :param topology_groups: A list of topology_groups to query for. Overrides topology_group_ids and topology_group_names keyword arguments. + :type topology_groups: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param topology_group_ids: The parameter that selects `topology groups` by ID. Multiple IDs must be entered + in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_ids: List[str] + :param topology_group_names: The parameter that selects `topology groups` by name. Multiple names must be + entered in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + topology_group_ids=topology_group_ids, + topology_group_names=topology_group_names, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(topology_groups, ['topology_group_ids', 'topology_group_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'sort', 'topology_group_ids', 'topology_group_names'], kwargs) + return self._call_api('TopologyGroupsApi', 'api255_topology_groups_arrays_get_with_http_info', kwargs) + + def delete_topology_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete topology groups + + The operation that deletes `topology groups`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('TopologyGroupsApi', 'api255_topology_groups_delete_with_http_info', kwargs) + + def get_topology_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + list_all_parents: Annotated[Optional[StrictBool], Field(description="The flag that, when set to `true`, expands the results to include all ancestors of every `topology group` matching the provided `names` or `ids`. This parameter may only be specified if `names` or `ids` is also provided. If not specified, this value defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List topology groups + + The operation that lists `topology groups`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param list_all_parents: The flag that, when set to `true`, expands the results to include all ancestors + of every `topology group` matching the provided `names` or `ids`. This + parameter may only be specified if `names` or `ids` is also provided. If + not specified, this value defaults to `false`. + :type list_all_parents: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + list_all_parents=list_all_parents, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('TopologyGroupsApi', 'api255_topology_groups_get_with_http_info', kwargs) + + def delete_topology_groups_members( + self, + topology_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + topology_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by ID. Multiple IDs must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + topology_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by name. Multiple names must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Remove topology group members + + The operation that removes `members` from `topology groups`. + + :param topology_groups: A list of topology_groups to query for. Overrides topology_group_ids and topology_group_names keyword arguments. + :type topology_groups: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param topology_group_ids: The parameter that selects `topology groups` by ID. Multiple IDs must be entered + in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_ids: List[str] + :param topology_group_names: The parameter that selects `topology groups` by name. Multiple names must be + entered in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + topology_group_ids=topology_group_ids, + topology_group_names=topology_group_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(topology_groups, ['topology_group_ids', 'topology_group_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'topology_group_ids', 'topology_group_names'], kwargs) + return self._call_api('TopologyGroupsApi', 'api255_topology_groups_members_delete_with_http_info', kwargs) + + def get_topology_groups_members( + self, + topology_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + recursive: Annotated[Optional[StrictBool], Field(description="The flag that, when set to `true`, recursively includes all members of a specified `topology group`. This parameter must be used in conjunction with `topology_group_names` or `topology_group_ids`. If not specified, this value defaults to `false`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + topology_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by ID. Multiple IDs must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + topology_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by name. Multiple names must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List topology group members + + The operation that lists `topology group members`. + + :param topology_groups: A list of topology_groups to query for. Overrides topology_group_ids and topology_group_names keyword arguments. + :type topology_groups: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param recursive: The flag that, when set to `true`, recursively includes all members of a + specified `topology group`. This parameter must be used in conjunction with + `topology_group_names` or `topology_group_ids`. If not specified, this value + defaults to `false`. + :type recursive: bool + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param topology_group_ids: The parameter that selects `topology groups` by ID. Multiple IDs must be entered + in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_ids: List[str] + :param topology_group_names: The parameter that selects `topology groups` by name. Multiple names must be + entered in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + recursive=recursive, + sort=sort, + topology_group_ids=topology_group_ids, + topology_group_names=topology_group_names, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(topology_groups, ['topology_group_ids', 'topology_group_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'sort', 'topology_group_ids', 'topology_group_names'], kwargs) + return self._call_api('TopologyGroupsApi', 'api255_topology_groups_members_get_with_http_info', kwargs) + + def post_topology_groups_members( + self, + members: 'models.TgroupMembersPost', + topology_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + topology_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by ID. Multiple IDs must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + topology_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by name. Multiple names must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Add topology group members + + The operation that adds `members` to `topology groups`. The target `topology groups` are selected via `query parameters`, and the `members` must be provided in the `request body`. + + :param members: (required) + :type members: TgroupMembersPost + :param topology_groups: A list of topology_groups to query for. Overrides topology_group_ids and topology_group_names keyword arguments. + :type topology_groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param topology_group_ids: The parameter that selects `topology groups` by ID. Multiple IDs must be entered + in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_ids: List[str] + :param topology_group_names: The parameter that selects `topology groups` by name. Multiple names must be + entered in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + topology_group_ids=topology_group_ids, + topology_group_names=topology_group_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(topology_groups, ['topology_group_ids', 'topology_group_names'], kwargs) + _fixup_list_type_params(['context_names', 'topology_group_ids', 'topology_group_names'], kwargs) + return self._call_api('TopologyGroupsApi', 'api255_topology_groups_members_post_with_http_info', kwargs) + + def patch_topology_groups( + self, + topology_group: 'models.TgroupPatch', + to_parent_topology_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + to_parent_topology_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The operation that moves selected `topology groups` to a specified parent group by ID. Either the `to_parent_topology_group_ids` or `to_parent_topology_group_names` parameter is required, but they cannot be set together.")] = None, + to_parent_topology_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The operation that moves selected `topology groups` to a specified parent group by name. Either the `to_parent_topology_group_ids` or `to_parent_topology_group_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify topology groups + + The operation that modifies `topology groups`. The request body is used to rename a group, while the `to_parent_topology_group_names` or `to_parent_topology_group_ids` `query parameters` are used to move a group to a parent; however, renaming and moving cannot be performed at the same time. + + :param topology_group: (required) + :type topology_group: TgroupPatch + :param to_parent_topology_groups: A list of to_parent_topology_groups to query for. Overrides to_parent_topology_group_ids and to_parent_topology_group_names keyword arguments. + :type to_parent_topology_groups: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param to_parent_topology_group_ids: The operation that moves selected `topology groups` to a specified parent group + by ID. Either the `to_parent_topology_group_ids` or + `to_parent_topology_group_names` parameter is required, but they cannot + be set together. + :type to_parent_topology_group_ids: List[str] + :param to_parent_topology_group_names: The operation that moves selected `topology groups` to a specified parent group + by name. Either the `to_parent_topology_group_ids` or + `to_parent_topology_group_names` parameter is required, but they cannot + be set together. + :type to_parent_topology_group_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + topology_group=topology_group, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + to_parent_topology_group_ids=to_parent_topology_group_ids, + to_parent_topology_group_names=to_parent_topology_group_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(to_parent_topology_groups, ['to_parent_topology_group_ids', 'to_parent_topology_group_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'to_parent_topology_group_ids', 'to_parent_topology_group_names'], kwargs) + return self._call_api('TopologyGroupsApi', 'api255_topology_groups_patch_with_http_info', kwargs) + + def post_topology_groups( + self, + parent_topology_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + parent_topology_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The operation that assigns selected `topology groups` to a specified parent group. Either the `parent_topology_group_ids` or `parent_topology_group_names` parameter is required, but they cannot be set together.")] = None, + parent_topology_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The operation that assigns selected `topology groups` to the specified parent topology group by name. Either the `parent_topology_group_ids` or `parent_topology_group_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create topology groups + + The operation that creates `topology groups`. The `names` parameter is required, and the `parent_topology_group_names` or `parent_topology_group_ids` selectors may optionally be provided via `query parameters`. + + :param parent_topology_groups: A list of parent_topology_groups to query for. Overrides parent_topology_group_ids and parent_topology_group_names keyword arguments. + :type parent_topology_groups: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param parent_topology_group_ids: The operation that assigns selected `topology groups` to a specified parent + group. Either the `parent_topology_group_ids` or + `parent_topology_group_names` parameter is required, but they cannot be + set together. + :type parent_topology_group_ids: List[str] + :param parent_topology_group_names: The operation that assigns selected `topology groups` to the specified parent + topology group by name. Either the `parent_topology_group_ids` or + `parent_topology_group_names` parameter is required, but they cannot be + set together. + :type parent_topology_group_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + parent_topology_group_ids=parent_topology_group_ids, + parent_topology_group_names=parent_topology_group_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(parent_topology_groups, ['parent_topology_group_ids', 'parent_topology_group_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'parent_topology_group_ids', 'parent_topology_group_names'], kwargs) + return self._call_api('TopologyGroupsApi', 'api255_topology_groups_post_with_http_info', kwargs) + + def get_directory_group_quotas( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. For example, `fs:dir01,fs:dir02`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the groups that match the given list of gids. Enter names in a comma-separated format, e.g., `2001,2002`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List group quotas. + + Displays a list of groups and the group quota rules that affect their usage limits. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. For example, + `fs:dir01,fs:dir02`. + :type directory_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: Performs the operation on the groups that match the given list of gids. Enter + names in a comma-separated format, e.g., `2001,2002`. + :type group_ids: List[int] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + directory_ids=directory_ids, + directory_names=directory_names, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + group_sids=group_sids, + limit=limit, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'directory_ids', 'directory_names', 'group_ids', 'group_names', 'group_sids', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('UserGroupQuotasApi', 'api255_directory_group_quotas_get_with_http_info', kwargs) + + def get_directory_user_quotas( + self, + users: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. For example, `fs:dir01,fs:dir02`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + user_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the users that match the given list of uids. Enter names in a comma-separated format, for example, `1001,1002`.")] = None, + user_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the users that match the given list of user names. Enter names in a comma-separated format, for example, `u1,u2`.")] = None, + user_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the users that match the given list of user SIDs. Enter SIDs in a comma-separated format, for example, `S-1-1-20-1000,S-1-1-20-2002`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List user quotas. + + Displays a list of users and the user quota rules that affect their usage limits. + + :param users: A list of users to query for. Overrides user_ids and user_names keyword arguments. + :type users: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. For example, + `fs:dir01,fs:dir02`. + :type directory_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param user_ids: Performs the operation on the users that match the given list of uids. Enter + names in a comma-separated format, for example, `1001,1002`. + :type user_ids: List[int] + :param user_names: Performs the operation on the users that match the given list of user names. + Enter names in a comma-separated format, for example, `u1,u2`. + :type user_names: List[str] + :param user_sids: Performs the operation on the users that match the given list of user SIDs. + Enter SIDs in a comma-separated format, for example, + `S-1-1-20-1000,S-1-1-20-2002`. + :type user_sids: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + directory_ids=directory_ids, + directory_names=directory_names, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + user_ids=user_ids, + user_names=user_names, + user_sids=user_sids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(users, ['user_ids', 'user_names'], kwargs) + _fixup_list_type_params(['context_names', 'directory_ids', 'directory_names', 'policy_ids', 'policy_names', 'sort', 'user_ids', 'user_names', 'user_sids'], kwargs) + return self._call_api('UserGroupQuotasApi', 'api255_directory_user_quotas_get_with_http_info', kwargs) + + def delete_vchost_connections( + self, + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + protocol_endpoints: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + all_vchosts: Annotated[Optional[StrictBool], Field(description="If set to `true`, the storage container represented by the protocol endpoint is accessible to all vchosts. Users should not specify `vchost_ids` or `vchost_names` in the request. If set to `false`, the storage container represented by the protocol endpoint is only accessible to the vchosts that have explicit vchost-connections with the protocol endpoint. Users need to specify `vchost_ids` or `vchost_names` in the request.")] = None, + protocol_endpoint_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of protocol endpoint IDs. Performs the operation on the protocol endpoints specified. For example, `peid01,peid02`. Cannot be used in conjunction with `protocol_endpoint_names`. If the list contains more than one value, then `vchost_ids` or `vchost_names` must have exactly one value.")] = None, + protocol_endpoint_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of protocol endpoint names. Performs the operation on the protocol endpoints specified. For example, `pe01,pe02`. Cannot be used in conjunction with `protocol_endpoint_ids`. If the list contains more than one value, then `vchost_ids` or `vchost_names` must have exactly one value.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of vchost IDs. Performs the operation on the vchosts specified. For example, `vchostid01,vchostid02`. Cannot be used in conjunction with `vchost_names`. If the list contains more than one value, then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one value.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of vchost names. Performs the operation on the vchosts specified. For example, `vchost01,vchost02`. Cannot be used in conjunction with `vchost_ids`. If the list contains more than one value, then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one value.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete the vchost-connection between a protocol endpoint and its vchost + + Deletes the vchost-connection between a protocol endpoint and its vchost. The storage container represented by the protocol endpoint will no longer be visible to the vCenter represented by the vchost. One of the `protocol_endpoint_names` or `protocol_endpoint_ids` query parameters, and one of the `vchost_names` or `vchost_ids` query parameters are required. But if `all_vchosts` is set to `true`, `vchost_names` and `vchost_ids` should not be specified. + + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param protocol_endpoints: A list of protocol_endpoints to query for. Overrides protocol_endpoint_ids and protocol_endpoint_names keyword arguments. + :type protocol_endpoints: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param all_vchosts: If set to `true`, the storage container represented by the protocol endpoint is + accessible to all vchosts. Users should not specify `vchost_ids` or + `vchost_names` in the request. If set to `false`, the storage container + represented by the protocol endpoint is only accessible to the vchosts that + have explicit vchost-connections with the protocol endpoint. Users need to + specify `vchost_ids` or `vchost_names` in the request. + :type all_vchosts: bool + :param protocol_endpoint_ids: A comma-separated list of protocol endpoint IDs. Performs the operation on the + protocol endpoints specified. For example, `peid01,peid02`. Cannot be + used in conjunction with `protocol_endpoint_names`. If the list contains + more than one value, then `vchost_ids` or `vchost_names` must have + exactly one value. + :type protocol_endpoint_ids: List[str] + :param protocol_endpoint_names: A comma-separated list of protocol endpoint names. Performs the operation on the + protocol endpoints specified. For example, `pe01,pe02`. Cannot be used + in conjunction with `protocol_endpoint_ids`. If the list contains more + than one value, then `vchost_ids` or `vchost_names` must have exactly + one value. + :type protocol_endpoint_names: List[str] + :param vchost_ids: A comma-separated list of vchost IDs. Performs the operation on the vchosts + specified. For example, `vchostid01,vchostid02`. Cannot be used in + conjunction with `vchost_names`. If the list contains more than one value, + then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly + one value. + :type vchost_ids: List[str] + :param vchost_names: A comma-separated list of vchost names. Performs the operation on the vchosts + specified. For example, `vchost01,vchost02`. Cannot be used in conjunction + with `vchost_ids`. If the list contains more than one value, then + `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one + value. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + all_vchosts=all_vchosts, + protocol_endpoint_ids=protocol_endpoint_ids, + protocol_endpoint_names=protocol_endpoint_names, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(protocol_endpoints, ['protocol_endpoint_ids', 'protocol_endpoint_names'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['protocol_endpoint_ids', 'protocol_endpoint_names', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostConnectionsApi', 'api255_vchost_connections_delete_with_http_info', kwargs) + + def get_vchost_connections( + self, + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + protocol_endpoints: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + all_vchosts: Annotated[Optional[StrictBool], Field(description="If set to `true`, the storage container represented by the protocol endpoint is accessible to all vchosts. Users should not specify `vchost_ids` or `vchost_names` in the request. If set to `false`, the storage container represented by the protocol endpoint is only accessible to the vchosts that have explicit vchost-connections with the protocol endpoint. Users need to specify `vchost_ids` or `vchost_names` in the request.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol_endpoint_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of protocol endpoint IDs. Performs the operation on the protocol endpoints specified. For example, `peid01,peid02`. Cannot be used in conjunction with `protocol_endpoint_names`. If the list contains more than one value, then `vchost_ids` or `vchost_names` must have exactly one value.")] = None, + protocol_endpoint_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of protocol endpoint names. Performs the operation on the protocol endpoints specified. For example, `pe01,pe02`. Cannot be used in conjunction with `protocol_endpoint_ids`. If the list contains more than one value, then `vchost_ids` or `vchost_names` must have exactly one value.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of vchost IDs. Performs the operation on the vchosts specified. For example, `vchostid01,vchostid02`. Cannot be used in conjunction with `vchost_names`. If the list contains more than one value, then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one value.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of vchost names. Performs the operation on the vchosts specified. For example, `vchost01,vchost02`. Cannot be used in conjunction with `vchost_ids`. If the list contains more than one value, then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one value.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List the vchost-connections between protocol endpoint and vchost. + + Displays a list of vchost-connections between the protocol endpoint and vchost. + + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param protocol_endpoints: A list of protocol_endpoints to query for. Overrides protocol_endpoint_ids and protocol_endpoint_names keyword arguments. + :type protocol_endpoints: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param all_vchosts: If set to `true`, the storage container represented by the protocol endpoint is + accessible to all vchosts. Users should not specify `vchost_ids` or + `vchost_names` in the request. If set to `false`, the storage container + represented by the protocol endpoint is only accessible to the vchosts that + have explicit vchost-connections with the protocol endpoint. Users need to + specify `vchost_ids` or `vchost_names` in the request. + :type all_vchosts: bool + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol_endpoint_ids: A comma-separated list of protocol endpoint IDs. Performs the operation on the + protocol endpoints specified. For example, `peid01,peid02`. Cannot be + used in conjunction with `protocol_endpoint_names`. If the list contains + more than one value, then `vchost_ids` or `vchost_names` must have + exactly one value. + :type protocol_endpoint_ids: List[str] + :param protocol_endpoint_names: A comma-separated list of protocol endpoint names. Performs the operation on the + protocol endpoints specified. For example, `pe01,pe02`. Cannot be used + in conjunction with `protocol_endpoint_ids`. If the list contains more + than one value, then `vchost_ids` or `vchost_names` must have exactly + one value. + :type protocol_endpoint_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param vchost_ids: A comma-separated list of vchost IDs. Performs the operation on the vchosts + specified. For example, `vchostid01,vchostid02`. Cannot be used in + conjunction with `vchost_names`. If the list contains more than one value, + then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly + one value. + :type vchost_ids: List[str] + :param vchost_names: A comma-separated list of vchost names. Performs the operation on the vchosts + specified. For example, `vchost01,vchost02`. Cannot be used in conjunction + with `vchost_ids`. If the list contains more than one value, then + `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one + value. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + all_vchosts=all_vchosts, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + protocol_endpoint_ids=protocol_endpoint_ids, + protocol_endpoint_names=protocol_endpoint_names, + sort=sort, + total_item_count=total_item_count, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(protocol_endpoints, ['protocol_endpoint_ids', 'protocol_endpoint_names'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['protocol_endpoint_ids', 'protocol_endpoint_names', 'sort', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostConnectionsApi', 'api255_vchost_connections_get_with_http_info', kwargs) + + def post_vchost_connections( + self, + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + protocol_endpoints: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + all_vchosts: Annotated[Optional[StrictBool], Field(description="If set to `true`, the storage container represented by the protocol endpoint is accessible to all vchosts. Users should not specify `vchost_ids` or `vchost_names` in the request. If set to `false`, the storage container represented by the protocol endpoint is only accessible to the vchosts that have explicit vchost-connections with the protocol endpoint. Users need to specify `vchost_ids` or `vchost_names` in the request.")] = None, + allow_stretched_multi_vchost: Annotated[Optional[StrictBool], Field(description="If set to `true`, users are allowed to create a new vchost-connection to a stretched container that already has a vchost-connection. In principle, a stretched container can only have one vchost-connection at a time.")] = None, + protocol_endpoint_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of protocol endpoint IDs. Performs the operation on the protocol endpoints specified. For example, `peid01,peid02`. Cannot be used in conjunction with `protocol_endpoint_names`. If the list contains more than one value, then `vchost_ids` or `vchost_names` must have exactly one value.")] = None, + protocol_endpoint_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of protocol endpoint names. Performs the operation on the protocol endpoints specified. For example, `pe01,pe02`. Cannot be used in conjunction with `protocol_endpoint_ids`. If the list contains more than one value, then `vchost_ids` or `vchost_names` must have exactly one value.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of vchost IDs. Performs the operation on the vchosts specified. For example, `vchostid01,vchostid02`. Cannot be used in conjunction with `vchost_names`. If the list contains more than one value, then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one value.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of vchost names. Performs the operation on the vchosts specified. For example, `vchost01,vchost02`. Cannot be used in conjunction with `vchost_ids`. If the list contains more than one value, then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one value.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a vchost-connection between protocol endpoint and vchost. + + Creates a vchost-connection between protocol endpoint and vchost. Each vchost is associated with a vCenter. Each protocol endpoint is associated with a storage container. A vchost-connection makes the storage container accessible to the vCenter when the vCenter attempts to mount the container. One of `protocol_endpoint_names` or `protocol_endpoint_ids` query parameters and one of `vchost_names` or `vchost_ids` query parameters are required. But if `all_vchosts` is set to `true`, `vchost_names` and `vchost_ids` should not be specified. + + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param protocol_endpoints: A list of protocol_endpoints to query for. Overrides protocol_endpoint_ids and protocol_endpoint_names keyword arguments. + :type protocol_endpoints: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param all_vchosts: If set to `true`, the storage container represented by the protocol endpoint is + accessible to all vchosts. Users should not specify `vchost_ids` or + `vchost_names` in the request. If set to `false`, the storage container + represented by the protocol endpoint is only accessible to the vchosts that + have explicit vchost-connections with the protocol endpoint. Users need to + specify `vchost_ids` or `vchost_names` in the request. + :type all_vchosts: bool + :param allow_stretched_multi_vchost: If set to `true`, users are allowed to create a new vchost-connection to a + stretched container that already has a vchost-connection. In principle, + a stretched container can only have one vchost-connection at a time. + :type allow_stretched_multi_vchost: bool + :param protocol_endpoint_ids: A comma-separated list of protocol endpoint IDs. Performs the operation on the + protocol endpoints specified. For example, `peid01,peid02`. Cannot be + used in conjunction with `protocol_endpoint_names`. If the list contains + more than one value, then `vchost_ids` or `vchost_names` must have + exactly one value. + :type protocol_endpoint_ids: List[str] + :param protocol_endpoint_names: A comma-separated list of protocol endpoint names. Performs the operation on the + protocol endpoints specified. For example, `pe01,pe02`. Cannot be used + in conjunction with `protocol_endpoint_ids`. If the list contains more + than one value, then `vchost_ids` or `vchost_names` must have exactly + one value. + :type protocol_endpoint_names: List[str] + :param vchost_ids: A comma-separated list of vchost IDs. Performs the operation on the vchosts + specified. For example, `vchostid01,vchostid02`. Cannot be used in + conjunction with `vchost_names`. If the list contains more than one value, + then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly + one value. + :type vchost_ids: List[str] + :param vchost_names: A comma-separated list of vchost names. Performs the operation on the vchosts + specified. For example, `vchost01,vchost02`. Cannot be used in conjunction + with `vchost_ids`. If the list contains more than one value, then + `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one + value. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + all_vchosts=all_vchosts, + allow_stretched_multi_vchost=allow_stretched_multi_vchost, + protocol_endpoint_ids=protocol_endpoint_ids, + protocol_endpoint_names=protocol_endpoint_names, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(protocol_endpoints, ['protocol_endpoint_ids', 'protocol_endpoint_names'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['protocol_endpoint_ids', 'protocol_endpoint_names', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostConnectionsApi', 'api255_vchost_connections_post_with_http_info', kwargs) + + def delete_vchosts_certificates( + self, + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a vchost certificate + + Deletes an existing vchost certificate. The `ids` query parameter alone, or the `certificate_names` query parameter together with one of `vchost_names` or `vchost_ids`, is required. + + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param certificates: A list of certificates to query for. Overrides certificate_names keyword argument. + :type certificates: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_names=certificate_names, + ids=ids, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificates, ['certificate_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['certificate_names', 'ids', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api255_vchosts_certificates_delete_with_http_info', kwargs) + + def get_vchosts_certificates( + self, + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List vchost certificates + + Displays certificates that are attached to configured vchosts on at least one endpoint. + + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param certificates: A list of certificates to query for. Overrides certificate_names keyword argument. + :type certificates: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_names=certificate_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificates, ['certificate_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['certificate_names', 'ids', 'sort', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api255_vchosts_certificates_get_with_http_info', kwargs) + + def patch_vchosts_certificates( + self, + certificate: 'models.VchostCertificatePatch', + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a vchost certificate + + Modifies an existing vchost certificate. The `ids` query parameter alone, or the `certificate_names` query parameter together with one of `vchost_names` or `vchost_ids`, is required. + + :param certificate: (required) + :type certificate: VchostCertificatePatch + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param certificates: A list of certificates to query for. Overrides certificate_names keyword argument. + :type certificates: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + certificate=certificate, + authorization=authorization, + x_request_id=x_request_id, + certificate_names=certificate_names, + ids=ids, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificates, ['certificate_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['certificate_names', 'ids', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api255_vchosts_certificates_patch_with_http_info', kwargs) + + def post_vchosts_certificates( + self, + certificate: 'models.VchostCertificatePost', + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a vchost certificate + + Creates an association between a certificate and vchost on one or more endpoints. The `vchost_names` or `vchost_ids` query parameter is required. + + :param certificate: (required) + :type certificate: VchostCertificatePost + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + certificate=certificate, + authorization=authorization, + x_request_id=x_request_id, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api255_vchosts_certificates_post_with_http_info', kwargs) + + def delete_vchosts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a vchost + + Deletes an existing vchost. The `names` or `ids` query parameter is required. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('VchostsApi', 'api255_vchosts_delete_with_http_info', kwargs) + + def delete_vchosts_endpoints( + self, + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + endpoints: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique endpoints specified. Enter multiple endpoints in a comma-separated format.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a vchost endpoint + + Deletes an existing vchost endpoint The `ids` query parameter alone, or the `endpoints` query parameter together with one of `vchost_names` or `vchost_ids`, is required. + + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param endpoints: Performs the operation on the unique endpoints specified. Enter multiple + endpoints in a comma-separated format. + :type endpoints: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + endpoints=endpoints, + ids=ids, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['endpoints', 'ids', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api255_vchosts_endpoints_delete_with_http_info', kwargs) + + def get_vchosts_endpoints( + self, + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + endpoints: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique endpoints specified. Enter multiple endpoints in a comma-separated format.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List vchost endpoints + + Displays a list of vchost endpoints with their associated vchosts and certificates. + + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param endpoints: Performs the operation on the unique endpoints specified. Enter multiple + endpoints in a comma-separated format. + :type endpoints: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + endpoints=endpoints, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['endpoints', 'ids', 'sort', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api255_vchosts_endpoints_get_with_http_info', kwargs) + + def patch_vchosts_endpoints( + self, + endpoint: 'models.VchostEndpointPatch', + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + endpoints: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique endpoints specified. Enter multiple endpoints in a comma-separated format.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a vchost endpoint + + Modifies an existing vchost endpoint. The `ids` query parameter alone, or the `endpoints` query parameter together with one of `vchost_names` or `vchost_ids`, is required. + + :param endpoint: (required) + :type endpoint: VchostEndpointPatch + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param endpoints: Performs the operation on the unique endpoints specified. Enter multiple + endpoints in a comma-separated format. + :type endpoints: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + endpoint=endpoint, + authorization=authorization, + x_request_id=x_request_id, + endpoints=endpoints, + ids=ids, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['endpoints', 'ids', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api255_vchosts_endpoints_patch_with_http_info', kwargs) + + def post_vchosts_endpoints( + self, + endpoint: 'models.VchostEndpointPost', + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a vchost endpoint + + Creates a vchost endpoint. Either the `vchost_names` or `vchost_ids` query parameter is required. + + :param endpoint: (required) + :type endpoint: VchostEndpointPost + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + endpoint=endpoint, + authorization=authorization, + x_request_id=x_request_id, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api255_vchosts_endpoints_post_with_http_info', kwargs) + + def get_vchosts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List vchosts + + Displays a list of vchosts. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('VchostsApi', 'api255_vchosts_get_with_http_info', kwargs) + + def patch_vchosts( + self, + vchost: 'models.VchostPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a vchost + + Modifies an existing vchost. The `names` or `ids` query parameter is required. + + :param vchost: (required) + :type vchost: VchostPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + vchost=vchost, + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('VchostsApi', 'api255_vchosts_patch_with_http_info', kwargs) + + def post_vchosts( + self, + vchost: 'models.VchostPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a vchost + + Creates a vchost. The `names` query parameter is required. + + :param vchost: (required) + :type vchost: VchostPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + vchost=vchost, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('VchostsApi', 'api255_vchosts_post_with_http_info', kwargs) + + def get_virtual_machine_snapshots( + self, + vms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + vm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique virtual machine IDs specified. Enter multiple resource IDs in a comma-separated format.")] = None, + vm_type: Annotated[Optional[StrictStr], Field(description="The type of virtual machine. The only valid value is `vvol`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List Virtual Machine Snapshots + + Displays a list of virtual machine snapshots, including those pending eradication. If `vm_type` is `vvol`, the `recovery_context` in the response will represent a protection group snapshot containing the virtual machine. This must be used as the `source` in the `POST /virtual-machine` method when recovering or overwriting a virtual machine from a snapshot. + + :param vms: A list of vms to query for. Overrides vm_ids keyword argument. + :type vms: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param vm_ids: Performs the operation on the unique virtual machine IDs specified. Enter + multiple resource IDs in a comma-separated format. + :type vm_ids: List[str] + :param vm_type: The type of virtual machine. The only valid value is `vvol`. + :type vm_type: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + vm_ids=vm_ids, + vm_type=vm_type, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(vms, ['vm_ids'], kwargs) + _fixup_list_type_params(['sort', 'vm_ids'], kwargs) + return self._call_api('VirtualMachinesApi', 'api255_virtual_machine_snapshots_get_with_http_info', kwargs) + + def get_virtual_machine_volume_snapshots( + self, + vm_ids: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique virtual machine IDs specified. Enter multiple resource IDs in a comma-separated format.")], + vms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + vm_type: Annotated[Optional[StrictStr], Field(description="The type of virtual machine. The only valid value is `vvol`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List Virtual Machine Volume Snapshots + + Displays a list of virtual machine volume snapshots, including those pending eradication. If `vm_type` is `vvol`, the `recover_context` in the response will represent a protection group snapshot containing the virtual machine volume. + + :param vm_ids: Performs the operation on the unique virtual machine IDs specified. Enter + multiple resource IDs in a comma-separated format. (required) + :type vm_ids: List[str] + :param vms: A list of vms to query for. Overrides vm_ids keyword argument. + :type vms: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param vm_type: The type of virtual machine. The only valid value is `vvol`. + :type vm_type: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + vm_ids=vm_ids, + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + vm_type=vm_type, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(vms, ['vm_ids'], kwargs) + _fixup_list_type_params(['vm_ids', 'sort'], kwargs) + return self._call_api('VirtualMachinesApi', 'api255_virtual_machine_volume_snapshots_get_with_http_info', kwargs) + + def get_virtual_machines( + self, + vms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + vm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique virtual machine IDs specified. Enter multiple virtual machine IDs in a comma-separated format.")] = None, + vm_type: Annotated[Optional[StrictStr], Field(description="The type of virtual machine. The only valid value is `vvol`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List Virtual Machines + + Displays a list of virtual machines, including those pending eradication. If `vm_type` is `vvol`, the `recovery_context` in the response will represent the most recent snapshot of the config vVol. This must be used as the `source` in the `PATCH` method when recovering a virtual machine from the destroyed state. + + :param vms: A list of vms to query for. Overrides vm_ids keyword argument. + :type vms: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param vm_ids: Performs the operation on the unique virtual machine IDs specified. Enter + multiple virtual machine IDs in a comma-separated format. + :type vm_ids: List[str] + :param vm_type: The type of virtual machine. The only valid value is `vvol`. + :type vm_type: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + vm_ids=vm_ids, + vm_type=vm_type, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(vms, ['vm_ids'], kwargs) + _fixup_list_type_params(['sort', 'vm_ids'], kwargs) + return self._call_api('VirtualMachinesApi', 'api255_virtual_machines_get_with_http_info', kwargs) + + def patch_virtual_machines( + self, + virtual_machine: 'models.VirtualMachinePost', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update a virtual machine + + Updates a virtual machine, recovering it from the destroyed state. If the virtual machine is of type `vvol`, the `source` property of the request body must be a `recovery_context` value retrieved from the `GET /virtual-machines` endpoint. If recovering the virtual machine will cause a conflict with an existing virtual machine, the operation will fail. + + :param virtual_machine: (required) + :type virtual_machine: VirtualMachinePost + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + virtual_machine=virtual_machine, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('VirtualMachinesApi', 'api255_virtual_machines_patch_with_http_info', kwargs) + + def post_virtual_machines( + self, + virtual_machine: 'models.VirtualMachinePost', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a virtual machine + + Creates one or more virtual machines from a protection group snapshot. If the virtual machine is of type `vvol`, the `source` property of the request body must be a `recovery_context` value retrieved from the `GET /virtual-machine-snapshots` endpoint. If `overwrite` is specified, an existing virtual machine will have its volumes overwritten by the snapshot. Otherwise, a new virtual machine will be created from the snapshot. If creating the new virtual machine will cause a conflict with an existing virtual machine, the operation will fail. + + :param virtual_machine: (required) + :type virtual_machine: VirtualMachinePost + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + virtual_machine=virtual_machine, + authorization=authorization, + x_request_id=x_request_id, + overwrite=overwrite, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('VirtualMachinesApi', 'api255_virtual_machines_post_with_http_info', kwargs) + + def delete_volume_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + eradicate_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to eradicate contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups). This enables you to eradicate containers with contents.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a volume group + + Deletes a volume group that has been destroyed and is pending eradication. Eradicated volume groups cannot be recovered. Volume groups are destroyed through the PATCH method. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param eradicate_contents: Set to `true` to eradicate contents (e.g., volumes, protection groups, + snapshots) and containers (e.g., realms, pods, volume groups). This + enables you to eradicate containers with contents. + :type eradicate_contents: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + eradicate_contents=eradicate_contents, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('VolumeGroupsApi', 'api255_volume_groups_delete_with_http_info', kwargs) + + def get_volume_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume groups + + Displays a list of volume groups, including those pending eradication. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumeGroupsApi', 'api255_volume_groups_get_with_http_info', kwargs) + + def patch_volume_groups( + self, + volume_group: 'models.VolumeGroupPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + destroy_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups), including eradicating containers with content.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a volume group + + Modifies a volume group. You can rename, destroy, recover, or set QoS limits for a volume group. To rename a volume group, set `name` to the new name. To destroy a volume group, set `destroyed=true`. To recover a volume group that has been destroyed and is pending eradication, set `destroyed=false`. Sets the bandwidth and IOPS limits of a volume group through the respective `bandwidth_limit` and `iops_limit` parameter. The `ids` or `names` parameter is required, but they cannot be set together. Sets the priority adjustment for a volume group using the `priority_adjustment_operator` and `priority_adjustment_value` fields. + + :param volume_group: (required) + :type volume_group: VolumeGroupPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param destroy_contents: Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) + and containers (e.g., realms, pods, volume groups), including eradicating + containers with content. + :type destroy_contents: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume_group=volume_group, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + destroy_contents=destroy_contents, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('VolumeGroupsApi', 'api255_volume_groups_patch_with_http_info', kwargs) + + def get_volume_groups_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume group performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes for each volume group and and as a total of all volume groups across the entire array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumeGroupsApi', 'api255_volume_groups_performance_get_with_http_info', kwargs) + + def post_volume_groups( + self, + volume_group: 'models.VolumeGroupPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a volume group and upsert tags. + + Creates a volume group. The volume group itself does not contain any meaningful content; instead, it acts as a container that is used to organize volumes. Once a volume group has been created, volumes can be created inside the volume group or moved into and out of the volume group. + + :param volume_group: (required) + :type volume_group: VolumeGroupPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume_group=volume_group, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('VolumeGroupsApi', 'api255_volume_groups_post_with_http_info', kwargs) + + def get_volume_groups_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume group QoS config + + Displays real-time and historical QoS configuration data for each volume group. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumeGroupsApi', 'api255_volume_groups_qos_get_with_http_info', kwargs) + + def get_volume_groups_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume group space information + + Displays the provisioned size and physical storage consumption data for each volume group. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumeGroupsApi', 'api255_volume_groups_space_get_with_http_info', kwargs) + + def put_volume_groups_tags_batch( + self, + tag: Annotated[conlist('models.TagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if one already exists, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags for all specified objects. + + :param tag: A list of tags to be created or, if one already exists, updated. (required) + :type tag: List[TagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('VolumeGroupsApi', 'api255_volume_groups_tags_batch_put_with_http_info', kwargs) + + def delete_volume_groups_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('VolumeGroupsApi', 'api255_volume_groups_tags_delete_with_http_info', kwargs) + + def get_volume_groups_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('VolumeGroupsApi', 'api255_volume_groups_tags_get_with_http_info', kwargs) + + def get_volume_groups_volumes( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume groups with volumes + + Displays a list of volume groups that contain volumes. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names', 'sort'], kwargs) + return self._call_api('VolumeGroupsApi', 'api255_volume_groups_volumes_get_with_http_info', kwargs) + + def post_volume_snapshots_batch( + self, + volume_snapshot: Annotated[conlist('models.VolumeSnapshotBatchPost'), Field(..., description="The list of volume snapshots to be created.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows snapshot to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create volume snapshots and create tags. + + Creates point-in-time snapshots of the contents of volumes. The destroyed parameter, suffixes, and tags can be different for each snapshot. + + :param volume_snapshot: The list of volume snapshots to be created. (required) + :type volume_snapshot: List[VolumeSnapshotBatchPost] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows snapshot to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume_snapshot=volume_snapshot, + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + context_names=context_names, + on=on, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['volume_snapshot', 'context_names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api255_volume_snapshots_batch_post_with_http_info', kwargs) + + def delete_volume_snapshots( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + replication_snapshot: Annotated[Optional[StrictBool], Field(description="If set to `true`, allow destruction/eradication of snapshots in use by replication. If set to `false`, allow destruction/eradication of snapshots not in use by replication. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a volume snapshot + + Deletes a volume snapshot that has been destroyed and is pending eradication. Eradicated volume snapshots cannot be recovered. Volume snapshots are destroyed by using the `PATCH` method. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param replication_snapshot: If set to `true`, allow destruction/eradication of snapshots in use by + replication. If set to `false`, allow destruction/eradication of + snapshots not in use by replication. If not specified, defaults to + `false`. + :type replication_snapshot: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + replication_snapshot=replication_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api255_volume_snapshots_delete_with_http_info', kwargs) + + def get_volume_snapshots( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume snapshots + + Displays a list of volume snapshots, including those pending eradication. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api255_volume_snapshots_get_with_http_info', kwargs) + + def patch_volume_snapshots( + self, + volume_snapshot: 'models.VolumeSnapshotPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + replication_snapshot: Annotated[Optional[StrictBool], Field(description="If set to `true`, allow destruction/eradication of snapshots in use by replication. If set to `false`, allow destruction/eradication of snapshots not in use by replication. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a volume snapshot + + Modifies a volume snapshot by renaming, destroying, or recovering it. To rename the suffix of a volume snapshot, set `name` to the new suffix name. To recover a volume snapshot that has been destroyed and is pending eradication, set `destroyed=true`. The `ids` or `names` parameter is required, but they cannot be set together. + + :param volume_snapshot: (required) + :type volume_snapshot: VolumeSnapshotPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param replication_snapshot: If set to `true`, allow destruction/eradication of snapshots in use by + replication. If set to `false`, allow destruction/eradication of + snapshots not in use by replication. If not specified, defaults to + `false`. + :type replication_snapshot: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume_snapshot=volume_snapshot, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + replication_snapshot=replication_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api255_volume_snapshots_patch_with_http_info', kwargs) + + def post_volume_snapshots( + self, + volume_snapshot: 'models.VolumeSnapshotPost', + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows snapshot to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a volume snapshot and tags + + Creates a point-in-time snapshot of the contents of a volume. The `source_ids` or `source_names` parameter is required, but they cannot be set together. + + :param volume_snapshot: (required) + :type volume_snapshot: VolumeSnapshotPost + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows snapshot to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume_snapshot=volume_snapshot, + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + context_names=context_names, + on=on, + source_ids=source_ids, + source_names=source_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api255_volume_snapshots_post_with_http_info', kwargs) + + def put_volume_snapshots_tags_batch( + self, + tag: Annotated[conlist('models.TagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or modified.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags. + + :param tag: A list of tags to be created or modified. (required) + :type tag: List[TagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api255_volume_snapshots_tags_batch_put_with_http_info', kwargs) + + def delete_volume_snapshots_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api255_volume_snapshots_tags_delete_with_http_info', kwargs) + + def get_volume_snapshots_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api255_volume_snapshots_tags_get_with_http_info', kwargs) + + def post_volume_snapshots_test( + self, + volume_snapshot: 'models.VolumeSnapshotPost', + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows snapshot to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create the volume snapshot path + + Creates the volume snapshot path without actually taking a volume snapshot. + + :param volume_snapshot: (required) + :type volume_snapshot: VolumeSnapshotPost + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows snapshot to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume_snapshot=volume_snapshot, + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + context_names=context_names, + on=on, + source_ids=source_ids, + source_names=source_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api255_volume_snapshots_test_post_with_http_info', kwargs) + + def get_volume_snapshots_transfer( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume snapshots with transfer statistics + + Displays a list of volume snapshots and their transfer statistics. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api255_volume_snapshots_transfer_get_with_http_info', kwargs) + + def post_volumes_batch( + self, + volume: Annotated[conlist('models.VolumeBatchPost'), Field(..., description="A list of volumes to be created or copied.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows operation to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="The boolean value that, if `true`, indicates the initial `protection` of the newly created `volumes` will be the union of the `container` default `protection configuration` and `add_to_protection_group_names`. If `false`, the default `protection` of the `container` will not be applied automatically, and the initial `protection` of the newly created `volumes` will be configured solely by `add_to_protection_group_names`. If not specified, the value defaults to `true`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create or copy volumes and upsert tags + + Creates or copies a list of virtual storage volumes. Volumes of different sizes, vgroups, and tag upsertions can be copied this way. + + :param volume: A list of volumes to be created or copied. (required) + :type volume: List[VolumeBatchPost] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows operation to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :param with_default_protection: The boolean value that, if `true`, indicates the initial `protection` of the + newly created `volumes` will be the union of the `container` default + `protection configuration` and `add_to_protection_group_names`. If + `false`, the default `protection` of the `container` will not be applied + automatically, and the initial `protection` of the newly created + `volumes` will be configured solely by `add_to_protection_group_names`. + If not specified, the value defaults to `true`. + :type with_default_protection: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume=volume, + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + context_names=context_names, + overwrite=overwrite, + with_default_protection=with_default_protection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['volume', 'context_names'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_batch_post_with_http_info', kwargs) + + def post_volumes_batch_test( + self, + volume: Annotated[conlist('models.VolumeBatchPost'), Field(..., description="A list of volumes to be copied.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows operation to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="The boolean value that, if `true`, indicates the initial `protection` of the newly created `volumes` will be the union of the `container` default `protection configuration` and `add_to_protection_group_names`. If `false`, the default `protection` of the `container` will not be applied automatically, and the initial `protection` of the newly created `volumes` will be configured solely by `add_to_protection_group_names`. If not specified, the value defaults to `true`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an attempt to copy volumes and upsert tags + + Creates an attempt to copy virtual storage volumes of different sizes in different vgroups and also upserts tags, without actually creating them, to test if they can be successfully created. Only available for creating volumes via a copy, not direct volume creation. + + :param volume: A list of volumes to be copied. (required) + :type volume: List[VolumeBatchPost] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows operation to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :param with_default_protection: The boolean value that, if `true`, indicates the initial `protection` of the + newly created `volumes` will be the union of the `container` default + `protection configuration` and `add_to_protection_group_names`. If + `false`, the default `protection` of the `container` will not be applied + automatically, and the initial `protection` of the newly created + `volumes` will be configured solely by `add_to_protection_group_names`. + If not specified, the value defaults to `true`. + :type with_default_protection: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume=volume, + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + context_names=context_names, + overwrite=overwrite, + with_default_protection=with_default_protection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['volume', 'context_names'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_batch_test_post_with_http_info', kwargs) + + def delete_volumes( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a volume + + Deletes a volume that has been destroyed and is pending eradication. Eradicated volumes cannot be recovered. Volumes are destroyed using the `PATCH` method. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_delete_with_http_info', kwargs) + + def get_volumes_diff( + self, + block_size: Annotated[StrictInt, Field(..., description="Granularity at which to compare, in bytes. Must be a multiple of 512.")], + segment_length: Annotated[StrictInt, Field(..., description="Length of the segment, in bytes, to compare.")], + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + base_id: Annotated[Optional[StrictStr], Field(description="ID of the volume or volume snapshot that the diff comparison is based on. If a base volume or volume snapshot is not specified, all mapped blocks for the volume or volume snapshot are displayed. The `base_name` or `base_id` parameter is required, but they cannot be set together.")] = None, + base_name: Annotated[Optional[StrictStr], Field(description="Name of the volume or volume snapshot that the diff comparison is based on. If a base volume or volume snapshot is not specified, all mapped blocks for the volume or volume snapshot are displayed. The `base_name` or `base_id` parameter is required, but they cannot be set together.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + next_allocated_block_hint: Annotated[Optional[StrictBool], Field(description="If set to `true`, appends offset of the next allocated block in bytes for the volume specified in `names` or `ids` to the output `items`. `base_name` or `base_id` must not be specified if this is set to `true`. If not specified, defaults to `false`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + segment_offset: Annotated[Optional[StrictInt], Field(description="Absolute offset, in bytes, of the segment to compare. Must be a multiple of block_size.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume diffs + + Displays block differences for the specified volumes. + + :param block_size: Granularity at which to compare, in bytes. Must be a multiple of 512. (required) + :type block_size: int + :param segment_length: Length of the segment, in bytes, to compare. (required) + :type segment_length: int + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param base_id: ID of the volume or volume snapshot that the diff comparison is based on. If a + base volume or volume snapshot is not specified, all mapped blocks for the + volume or volume snapshot are displayed. The `base_name` or `base_id` + parameter is required, but they cannot be set together. + :type base_id: str + :param base_name: Name of the volume or volume snapshot that the diff comparison is based on. If a + base volume or volume snapshot is not specified, all mapped blocks for the + volume or volume snapshot are displayed. The `base_name` or `base_id` + parameter is required, but they cannot be set together. + :type base_name: str + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param next_allocated_block_hint: If set to `true`, appends offset of the next allocated block in bytes for the + volume specified in `names` or `ids` to the output `items`. `base_name` + or `base_id` must not be specified if this is set to `true`. If not + specified, defaults to `false`. + :type next_allocated_block_hint: bool + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param segment_offset: Absolute offset, in bytes, of the segment to compare. Must be a multiple of + block_size. + :type segment_offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + block_size=block_size, + segment_length=segment_length, + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + base_id=base_id, + base_name=base_name, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + next_allocated_block_hint=next_allocated_block_hint, + offset=offset, + segment_offset=segment_offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_diff_get_with_http_info', kwargs) + + def get_volumes( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volumes + + Displays a list of volumes, including those pending eradication. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_get_with_http_info', kwargs) + + def patch_volumes( + self, + volume: 'models.VolumePatch', + remove_from_protection_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + add_to_protection_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + add_to_protection_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be added to the specified protection groups along with creation or movement across pods and array. When a volume is moved, the specified protection groups must be in the target pod or array. Enter multiple ids in comma-separated format.")] = None, + add_to_protection_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be added to the specified protection groups along with creation or movement across pods and array. When a volume is moved, the specified protection groups must be in the target pod or array. Enter multiple names in a comma-separated format.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + remove_from_protection_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be removed from the specified protection groups in the source pod or array along with the move. This can only be used when moving volumes across pods and arrays and must include all protection groups that the volumes are members of before the move. Enter multiple ids in a comma-separated format.")] = None, + remove_from_protection_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be removed from the specified protection groups in the source pod or array along with the move. This can only be used when moving volumes across pods and arrays and must include all protection groups that the volumes are members of before the move. Enter multiple names in a comma-separated format.")] = None, + truncate: Annotated[Optional[StrictBool], Field(description="If set to `true`, reduces the size of a volume during a volume resize operation. When a volume is truncated, Purity automatically takes an undo snapshot, providing a 24-hour window during which the previous contents can be retrieved. After truncating a volume, its provisioned size can be subsequently increased, but the data in truncated sectors cannot be retrieved. If set to `false` or not set at all and the volume is being reduced in size, the volume copy operation fails. Required if the `provisioned` parameter is set to a volume size that is smaller than the original size.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a volume + + Modifies a volume by renaming, destroying, or resizing it. To rename a volume, set `name` to the new name. To destroy a volume, set `destroyed=true`. To recover a volume that has been destroyed and is pending eradication, set `destroyed=false`. Set the bandwidth and IOPS limits of a volume through the respective `bandwidth_limit` and `iops_limit` parameter. This moves the volume into a pod or volume group through the respective `pod` or `volume_group` parameter. The `ids` or `names` parameter is required, but they cannot be set together. + + :param volume: (required) + :type volume: VolumePatch + :param remove_from_protection_groups: A list of remove_from_protection_groups to query for. Overrides remove_from_protection_group_ids and remove_from_protection_group_names keyword arguments. + :type remove_from_protection_groups: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param add_to_protection_groups: A list of add_to_protection_groups to query for. Overrides add_to_protection_group_ids and add_to_protection_group_names keyword arguments. + :type add_to_protection_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param add_to_protection_group_ids: The volumes will be added to the specified protection groups along with creation + or movement across pods and array. When a volume is moved, the + specified protection groups must be in the target pod or array. Enter + multiple ids in comma-separated format. + :type add_to_protection_group_ids: List[str] + :param add_to_protection_group_names: The volumes will be added to the specified protection groups along with creation + or movement across pods and array. When a volume is moved, the + specified protection groups must be in the target pod or array. Enter + multiple names in a comma-separated format. + :type add_to_protection_group_names: List[str] + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param remove_from_protection_group_ids: The volumes will be removed from the specified protection groups in the source + pod or array along with the move. This can only be used when moving + volumes across pods and arrays and must include all protection groups + that the volumes are members of before the move. Enter multiple ids in + a comma-separated format. + :type remove_from_protection_group_ids: List[str] + :param remove_from_protection_group_names: The volumes will be removed from the specified protection groups in the source + pod or array along with the move. This can only be used when moving + volumes across pods and arrays and must include all protection groups + that the volumes are members of before the move. Enter multiple names + in a comma-separated format. + :type remove_from_protection_group_names: List[str] + :param truncate: If set to `true`, reduces the size of a volume during a volume resize operation. + When a volume is truncated, Purity automatically takes an undo snapshot, + providing a 24-hour window during which the previous contents can be + retrieved. After truncating a volume, its provisioned size can be + subsequently increased, but the data in truncated sectors cannot be + retrieved. If set to `false` or not set at all and the volume is being + reduced in size, the volume copy operation fails. Required if the + `provisioned` parameter is set to a volume size that is smaller than the + original size. + :type truncate: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume=volume, + authorization=authorization, + x_request_id=x_request_id, + add_to_protection_group_ids=add_to_protection_group_ids, + add_to_protection_group_names=add_to_protection_group_names, + context_names=context_names, + ids=ids, + names=names, + remove_from_protection_group_ids=remove_from_protection_group_ids, + remove_from_protection_group_names=remove_from_protection_group_names, + truncate=truncate, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(add_to_protection_groups, ['add_to_protection_group_ids', 'add_to_protection_group_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(remove_from_protection_groups, ['remove_from_protection_group_ids', 'remove_from_protection_group_names'], kwargs) + _fixup_list_type_params(['add_to_protection_group_ids', 'add_to_protection_group_names', 'context_names', 'ids', 'names', 'remove_from_protection_group_ids', 'remove_from_protection_group_names'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_patch_with_http_info', kwargs) + + def get_volumes_performance_by_array( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume performance data by array + + Displays real-time and historical performance data, real-time latency data, and average I/O size data. The data returned is for each volume on the current array and for each volume on any remote arrays that are visible to the current array. The data is grouped by individual volumes and as a total across all volumes on each array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_performance_by_array_get_with_http_info', kwargs) + + def get_volumes_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes for each volume and and as a total of all volumes across the entire array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_performance_get_with_http_info', kwargs) + + def post_volumes( + self, + volume: 'models.VolumePost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + add_to_protection_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + add_to_protection_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be added to the specified protection groups along with creation or movement across pods and array. When a volume is moved, the specified protection groups must be in the target pod or array. Enter multiple ids in comma-separated format.")] = None, + add_to_protection_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be added to the specified protection groups along with creation or movement across pods and array. When a volume is moved, the specified protection groups must be in the target pod or array. Enter multiple names in a comma-separated format.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows operation to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="The boolean value that, if `true`, indicates the initial `protection` of the newly created `volumes` will be the union of the `container` default `protection configuration` and `add_to_protection_group_names`. If `false`, the default `protection` of the `container` will not be applied automatically, and the initial `protection` of the newly created `volumes` will be configured solely by `add_to_protection_group_names`. If not specified, the value defaults to `true`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create or copy a volume and upsert tags + + Creates one or more virtual storage volumes of the specified size. If `provisioned` is not specified, the size of the new volume defaults to 1 MB. The `names` query parameter is required. The `add_to_protection_group_names` query parameter specifies a list of protection group names that will compose the initial protection for the volume. The `with_default_protection` query parameter specifies whether to use the container default protection configuration for the volume. The `add_to_protection_group_names` and `with_default_protection` query parameters cannot be provided when `overwrite` is `true`. + + :param volume: (required) + :type volume: VolumePost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param add_to_protection_groups: A list of add_to_protection_groups to query for. Overrides add_to_protection_group_ids and add_to_protection_group_names keyword arguments. + :type add_to_protection_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param add_to_protection_group_ids: The volumes will be added to the specified protection groups along with creation + or movement across pods and array. When a volume is moved, the + specified protection groups must be in the target pod or array. Enter + multiple ids in comma-separated format. + :type add_to_protection_group_ids: List[str] + :param add_to_protection_group_names: The volumes will be added to the specified protection groups along with creation + or movement across pods and array. When a volume is moved, the + specified protection groups must be in the target pod or array. Enter + multiple names in a comma-separated format. + :type add_to_protection_group_names: List[str] + :param allow_throttle: If set to `true`, allows operation to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :param with_default_protection: The boolean value that, if `true`, indicates the initial `protection` of the + newly created `volumes` will be the union of the `container` default + `protection configuration` and `add_to_protection_group_names`. If + `false`, the default `protection` of the `container` will not be applied + automatically, and the initial `protection` of the newly created + `volumes` will be configured solely by `add_to_protection_group_names`. + If not specified, the value defaults to `true`. + :type with_default_protection: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume=volume, + authorization=authorization, + x_request_id=x_request_id, + add_to_protection_group_ids=add_to_protection_group_ids, + add_to_protection_group_names=add_to_protection_group_names, + allow_throttle=allow_throttle, + context_names=context_names, + names=names, + overwrite=overwrite, + with_default_protection=with_default_protection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(add_to_protection_groups, ['add_to_protection_group_ids', 'add_to_protection_group_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['add_to_protection_group_ids', 'add_to_protection_group_names', 'context_names', 'names'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_post_with_http_info', kwargs) + + def delete_volumes_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a volume from a protection group + + Deletes a volume member from a protection group. After the member has been deleted, it is no longer protected by the group. Any protection group snapshots that were taken before the member was deleted are not affected. Deleting a member from a protection group does not delete the member from the array or realm, and the member can be added back to the protection group at any time. The `group_names` parameter represents the name of the protection group, and the `member_names` and `member_ids` parameters represent the names or IDs of the volume. The `group_names` and only one of `member_names` or `member_ids` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_protection_groups_delete_with_http_info', kwargs) + + def get_volumes_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_destroyed: Annotated[Optional[StrictBool], Field(description="If true, returns only destroyed member objects. Returns an error if a name of a live member object is specified in the member_names query param. If false, returns only live member objects. Returns an error if a name of a destroyed member object is specified in the member_names query param.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volumes that are members of protection groups + + Displays a list of volume members that belong to one or more protection groups. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_destroyed: If true, returns only destroyed member objects. Returns an error if a name of a + live member object is specified in the member_names query param. If false, + returns only live member objects. Returns an error if a name of a + destroyed member object is specified in the member_names query param. + :type member_destroyed: bool + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_destroyed=member_destroyed, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_protection_groups_get_with_http_info', kwargs) + + def post_volumes_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a volume and add it to a protection group + + Creates a volume member and adds it to a protection group. Members that are already in the protection group are not affected. For asynchronous replication, only members of the same type can belong to a protection group. The `group_names` parameter represents the name of the protection group, and the `member_names` and `member_ids` parameters represent the names or IDs of the volume. The `group_names` and only one of `member_names` or `member_ids` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_protection_groups_post_with_http_info', kwargs) + + def get_volumes_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume QoS config + + Displays real-time and historical QoS configuration data for each volume. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_qos_get_with_http_info', kwargs) + + def get_volumes_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume space information + + Displays the provisioned size and physical storage consumption data for each volume. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_space_get_with_http_info', kwargs) + + def put_volumes_tags_batch( + self, + tag: Annotated[conlist('models.TagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if one already exists, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags. + + :param tag: A list of tags to be created or, if one already exists, updated. (required) + :type tag: List[TagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_tags_batch_put_with_http_info', kwargs) + + def delete_volumes_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_tags_delete_with_http_info', kwargs) + + def get_volumes_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_tags_get_with_http_info', kwargs) + + def post_volumes_test( + self, + volume: 'models.VolumePost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + add_to_protection_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + add_to_protection_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be added to the specified protection groups along with creation or movement across pods and array. When a volume is moved, the specified protection groups must be in the target pod or array. Enter multiple ids in comma-separated format.")] = None, + add_to_protection_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be added to the specified protection groups along with creation or movement across pods and array. When a volume is moved, the specified protection groups must be in the target pod or array. Enter multiple names in a comma-separated format.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows operation to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="The boolean value that, if `true`, indicates the initial `protection` of the newly created `volumes` will be the union of the `container` default `protection configuration` and `add_to_protection_group_names`. If `false`, the default `protection` of the `container` will not be applied automatically, and the initial `protection` of the newly created `volumes` will be configured solely by `add_to_protection_group_names`. If not specified, the value defaults to `true`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a dry run attempt to copy a volume + + Creates a dry run attempt to see if copying a volume would succeed. No virtual volumes are actually copied or created in this process. + + :param volume: (required) + :type volume: VolumePost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param add_to_protection_groups: A list of add_to_protection_groups to query for. Overrides add_to_protection_group_ids and add_to_protection_group_names keyword arguments. + :type add_to_protection_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param add_to_protection_group_ids: The volumes will be added to the specified protection groups along with creation + or movement across pods and array. When a volume is moved, the + specified protection groups must be in the target pod or array. Enter + multiple ids in comma-separated format. + :type add_to_protection_group_ids: List[str] + :param add_to_protection_group_names: The volumes will be added to the specified protection groups along with creation + or movement across pods and array. When a volume is moved, the + specified protection groups must be in the target pod or array. Enter + multiple names in a comma-separated format. + :type add_to_protection_group_names: List[str] + :param allow_throttle: If set to `true`, allows operation to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :param with_default_protection: The boolean value that, if `true`, indicates the initial `protection` of the + newly created `volumes` will be the union of the `container` default + `protection configuration` and `add_to_protection_group_names`. If + `false`, the default `protection` of the `container` will not be applied + automatically, and the initial `protection` of the newly created + `volumes` will be configured solely by `add_to_protection_group_names`. + If not specified, the value defaults to `true`. + :type with_default_protection: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume=volume, + authorization=authorization, + x_request_id=x_request_id, + add_to_protection_group_ids=add_to_protection_group_ids, + add_to_protection_group_names=add_to_protection_group_names, + allow_throttle=allow_throttle, + context_names=context_names, + names=names, + overwrite=overwrite, + with_default_protection=with_default_protection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(add_to_protection_groups, ['add_to_protection_group_ids', 'add_to_protection_group_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['add_to_protection_group_ids', 'add_to_protection_group_names', 'context_names', 'names'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_test_post_with_http_info', kwargs) + + def get_volumes_volume_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volumes that are in volume groups + + Displays a list of volumes that are in a volume group. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api255_volumes_volume_groups_get_with_http_info', kwargs) + + def delete_workloads( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a workload + + Deletes a workload that has been destroyed and is pending eradication. Eradicated workloads cannot be recovered. Workloads are destroyed using the `PATCH` method. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Only one value is + supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('WorkloadsApi', 'api255_workloads_delete_with_http_info', kwargs) + + def get_workloads( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List workloads + + Displays a list of workloads. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + ids=ids, + limit=limit, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('WorkloadsApi', 'api255_workloads_get_with_http_info', kwargs) + + def patch_workloads( + self, + workload: 'models.WorkloadPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a workload + + Modifies a workload by renaming or destroying it. To rename a workload, set `name` to the new name. To destroy a workload, set `destroyed=true`. To recover a workload that has been destroyed and is pending eradication, set `destroyed=false`. The `ids` or `names` parameter is required, but they cannot be set together. + + :param workload: (required) + :type workload: WorkloadPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Only one value is + supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + workload=workload, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('WorkloadsApi', 'api255_workloads_patch_with_http_info', kwargs) + + def get_workloads_placement_recommendations( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List workload placement recommendations + + Displays a list of placement recommendations for workloads. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + ids=ids, + limit=limit, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('WorkloadsApi', 'api255_workloads_placement_recommendations_get_with_http_info', kwargs) + + def post_workloads_placement_recommendations( + self, + inputs: 'models.WorkloadPlacementRecommendation', + presets: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + placements: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + placement_names: Annotated[Optional[conlist(StrictStr)], Field(description="Placements from the preset which should be used to compute recommendation. Optional parameter if preset has just one placement.")] = None, + preset_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Creates the workload placement recommendations using the presets specified by ids. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together.")] = None, + preset_names: Annotated[Optional[conlist(StrictStr)], Field(description="Creates the workload placement recommendations using the presets specified by names. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a request for a workload placement recommendation. + + Creates a recommendation for the placement of the specified workload. The computation might take a few minutes. + + :param inputs: (required) + :type inputs: WorkloadPlacementRecommendation + :param presets: A list of presets to query for. Overrides preset_ids and preset_names keyword arguments. + :type presets: ReferenceType or List[ReferenceType], optional + :param placements: A list of placements to query for. Overrides placement_names keyword argument. + :type placements: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param placement_names: Placements from the preset which should be used to compute recommendation. + Optional parameter if preset has just one placement. + :type placement_names: List[str] + :param preset_ids: Creates the workload placement recommendations using the presets specified by + ids. Only one preset can be specified. One of the `preset_ids` or + `preset_names` parameters are required, but they cannot be set together. + :type preset_ids: List[str] + :param preset_names: Creates the workload placement recommendations using the presets specified by + names. Only one preset can be specified. One of the `preset_ids` or + `preset_names` parameters are required, but they cannot be set together. + :type preset_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + inputs=inputs, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + placement_names=placement_names, + preset_ids=preset_ids, + preset_names=preset_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(placements, ['placement_names'], kwargs) + _process_references(presets, ['preset_ids', 'preset_names'], kwargs) + _fixup_list_type_params(['context_names', 'placement_names', 'preset_ids', 'preset_names'], kwargs) + return self._call_api('WorkloadsApi', 'api255_workloads_placement_recommendations_post_with_http_info', kwargs) + + def post_workloads( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique resource names specified. Only one value is supported.")], + workload: 'models.WorkloadPost', + presets: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + preset_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Create the resource using the preset specified by the ID. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together.")] = None, + preset_names: Annotated[Optional[conlist(StrictStr)], Field(description="Create the resource using the preset specified by name. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a workload + + Creates one workload. + + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. (required) + :type names: List[str] + :param workload: (required) + :type workload: WorkloadPost + :param presets: A list of presets to query for. Overrides preset_ids and preset_names keyword arguments. + :type presets: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param preset_ids: Create the resource using the preset specified by the ID. Only one preset can be + specified. One of the `preset_ids` or `preset_names` parameters are + required, but they cannot be set together. + :type preset_ids: List[str] + :param preset_names: Create the resource using the preset specified by name. Only one preset can be + specified. One of the `preset_ids` or `preset_names` parameters are + required, but they cannot be set together. + :type preset_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + workload=workload, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + preset_ids=preset_ids, + preset_names=preset_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(presets, ['preset_ids', 'preset_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'preset_ids', 'preset_names'], kwargs) + return self._call_api('WorkloadsApi', 'api255_workloads_post_with_http_info', kwargs) + + def put_workloads_tags_batch( + self, + tag: Annotated[conlist('models.TagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if they already exist, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource ID specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource name specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates or creates tags for all specified objects. + + :param tag: A list of tags to be created or, if they already exist, updated. (required) + :type tag: List[TagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: Performs the operation on the unique resource ID specified. Only one value is + supported. The `resource_ids` or `resource_names` parameter is required, + but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: Performs the operation on the unique resource name specified. Only one value is + supported. The `resource_ids` or `resource_names` parameter is required, + but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('WorkloadsApi', 'api255_workloads_tags_batch_put_with_http_info', kwargs) + + def delete_workloads_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource ID specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource name specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: Performs the operation on the unique resource ID specified. Only one value is + supported. The `resource_ids` or `resource_names` parameter is required, + but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: Performs the operation on the unique resource name specified. Only one value is + supported. The `resource_ids` or `resource_names` parameter is required, + but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('WorkloadsApi', 'api255_workloads_tags_delete_with_http_info', kwargs) + + def get_workloads_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('WorkloadsApi', 'api255_workloads_tags_get_with_http_info', kwargs) + + def _set_auth_header(self, refresh=False): + """ + Set the authorization or x-auth-token header of the internal client with the access + token. + + Args: + refresh (bool, optional): Whether to retrieve a new access token. + Defaults to False. + + Raises: + PureError: If there was an error retrieving the access token. + """ + if isinstance(self._token_man, TokenManager): + self._api_client.set_default_header(Headers.authorization, + self._token_man.get_header(refresh=refresh)) + else: + self._api_client.set_default_header(Headers.x_auth_token, + self._token_man.get_session_token(refresh=refresh)) + + def _call_api(self, api_class_name, api_function_name, kwargs): + """ + Call the API function and process the response. May call the API + repeatedly if the request failed for a reason that may not persist in + the next call. + + Args: + api_class_name (str): Swagger-generated api class to call. + api_function_name (str): Swagger-generated function to call. + kwargs (dict): kwargs to pass to the function. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs['_request_timeout'] = self._timeout + if Parameters.x_request_id in kwargs and not kwargs[Parameters.x_request_id]: + kwargs[Parameters.x_request_id] = str(uuid.uuid4()) + + _iterator_stop_on_limit = True + if Parameters.limit in kwargs and not kwargs[Parameters.limit] and self.__auto_pagination_limit: + kwargs[Parameters.limit] = self.__auto_pagination_limit + _iterator_stop_on_limit = False + + if kwargs.get('authorization') is not None: + warnings.warn("authorization parameter is deprecated, and will be removed soon.", DeprecationWarning) + retries = self._retries + original_auth_error = None + api_function = getattr(self.__get_api_instance(api_class_name), api_function_name) + while True: + try: + response = api_function(**kwargs) + # Call was successful (200) + return self._create_valid_response(response, api_function, _iterator_stop_on_limit, kwargs) + except ApiException as error: + # If no chance for retries, return the error + if retries == 0: + return self._create_error_response(original_auth_error or error) + # If bad request, forbidden, or not found, return the error (it will never work) + elif error.status in [400, 403, 404]: + return self._create_error_response(error) + # If authentication error, reset access token and retry once + elif error.status == 401: + original_auth_error = error + retries = 1 + self._set_auth_header(refresh=True) + # If rate limit error, wait the proper time and try again + elif error.status == 429: + # If the the minute limit hit, wait that long + if (int(error.headers.get(Headers.x_ratelimit_remaining_min)) + == int(error.headers.get(Headers.x_ratelimit_min))): + time.sleep(60) + # Otherwise it was the second limit and only wait a second + time.sleep(1) + # If some internal server error we know nothing about, return + elif error.status == 500: + return self._create_error_response(error) + # If internal server errors that has to do with timeouts, try again + elif error.status > 500: + pass + # If error with the swagger client, raise the error + else: + raise PureError(error) + retries = retries - 1 + + def __get_api_instance(self, api_class): + """ + Get the API instance for the given class. + + Args: + api_class (class): Swagger-generated api class. + + Returns: + class: API instance for the given class. + """ + if api_class not in self.__apis_instances: + self.__apis_instances[api_class] = getattr(api, api_class)(self._api_client) + return self.__apis_instances[api_class] + + def _create_valid_response(self, response: ApiResponse, endpoint, iterator_stop_on_limit: bool, kwargs): + """ + Create a ValidResponse from a Swagger response. + + Args: + response (ApiResponse): + Body, status, header tuple as returned from Swagger client. + endpoint (function): + The function of the Swagger client that was called. + kwargs (dict): + The processed kwargs that were passed to the endpoint function. + + Returns: + ValidResponse + """ + body = response.data + headers = response.headers + continuation_token = getattr(body, "continuation_token", None) + total_item_count = getattr(body, "total_item_count", None) + total = getattr(body, "total", None) + more_items_remaining = getattr(body, "more_items_remaining", None) + errors = getattr(body, "errors", None) + items = None + if body is not None: + items = iter(ItemIterator(endpoint, kwargs, + continuation_token, total_item_count, + body.items, + headers.get(Headers.x_request_id, None), + more_items_remaining or False, + iterator_stop_on_limit)) + return ValidResponse(response.status_code, continuation_token, total_item_count, + items, headers, total, more_items_remaining, errors=errors) + + def _create_error_response(self, error): + """ + Create an ErrorResponse from a Swagger error. + + Args: + error (ApiException): + Error returned by Swagger client. + + Returns: + ErrorResponse + """ + status = error.status + try: + body = json.loads(error.body) + except Exception: + errors = [ApiError(None, "Response is not a valid JSON")] + return ErrorResponse(status, errors, headers=error.headers) + + if not isinstance(body, dict): + errors = [ApiError(None, "Response is not an Error object")] + return ErrorResponse(status, errors, headers=error.headers) + + if status in [403, 429]: + # Parse differently if the error message came from kong + errors = [ApiError(None, body.get(Responses.message, None), None)] + else: + errors = [ApiError(err.get(Responses.context, None), + err.get(Responses.message, None), + err.get(Responses.location_context, None)) + for err in body.get(Responses.errors, [])] + return ErrorResponse(status, errors, headers=error.headers) + + +def _process_references( + references: Optional[Union[ReferenceType, List[ReferenceType]]], + params: List[str], + kwargs: Dict[str, Any] +) -> None: + + """Process reference objects into a list of ids or names. + Removes ids and names arguments. + + :param references: The references from which to extract ids or names. + :type references: ReferenceType or List[ReferenceType], optional + + :param params: The parameters to be overridden. + :type params: List[str] + + :param kwargs: The kwargs to process. + :type kwargs: Dict[str, Any] + + :raise PureError: If a reference does not have an id or name. + + """ + if references is not None: + if not isinstance(references, list): + references = [references] + for param in params: + kwargs.pop(param, None) + all_have_id = all(ref.id is not None for ref in references) + all_have_name = all(ref.name is not None for ref in references) + id_param = [param for param in params if param.endswith("ids")] + name_param = [param for param in params if param.endswith("names")] + if all_have_id and len(id_param) > 0: + kwargs[id_param[0]] = [ref.id for ref in references] + elif all_have_name and len(name_param) > 0: + kwargs[name_param[0]] = [ref.name for ref in references] + else: + raise PureError('Invalid reference for {}'.format(", ".join(params))) + + +def _fixup_list_type_params( + params: List[str], + kwargs: Dict[str, Any] +) -> None: + + """Process object into a list if it expected to be list type. + + :param params: The parameters to be overridden. + :type params: List[str] + + :param kwargs: The kwargs to process. + :type kwargs: Dict[str, Any] + + """ + for _param in params: + _value = kwargs.get(_param, None) + if _value is not None and not isinstance(_value, list): + _param_type = type(_value).__name__.replace("'", '') + warnings.warn(f"'{_param}' parameter, invalid type: expected List[{_param_type}] but received {_param_type}, converting to list. Please revisit code.", SyntaxWarning) + kwargs[_param] = [_value] + diff --git a/pypureclient/flasharray/FA_2_55/models/__init__.py b/pypureclient/flasharray/FA_2_55/models/__init__.py new file mode 100644 index 0000000000..c958890ab7 --- /dev/null +++ b/pypureclient/flasharray/FA_2_55/models/__init__.py @@ -0,0 +1,1042 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +_attribute_error_on_none = True + +class __LazyModelLoader: + def __init__(self, modname, attr): + self._modname = modname + self._attr = attr + self._mod = None + + def load(self): + import importlib + if self._mod is None: + self._mod = importlib.import_module(self._modname, package=__package__) + return getattr(self._mod, self._attr) + +__class_model_dict = { + 'ActiveDirectory': __LazyModelLoader('..._common.models.active_directory_v_2_55', 'ActiveDirectory'), + 'ActiveDirectoryGetResponse': __LazyModelLoader('..._common.models.active_directory_get_response_v_2_55', 'ActiveDirectoryGetResponse'), + 'ActiveDirectoryPatch': __LazyModelLoader('..._common.models.active_directory_patch_v_2_49', 'ActiveDirectoryPatch'), + 'ActiveDirectoryPost': __LazyModelLoader('..._common.models.active_directory_post_v_2_49', 'ActiveDirectoryPost'), + 'ActiveDirectoryResponse': __LazyModelLoader('..._common.models.active_directory_response_v_2_55', 'ActiveDirectoryResponse'), + 'Admin': __LazyModelLoader('..._common.models.admin_v_2_54', 'Admin'), + 'AdminApiToken': __LazyModelLoader('..._common.models.admin_api_token_v_2_54', 'AdminApiToken'), + 'AdminApiTokenGetResponse': __LazyModelLoader('..._common.models.admin_api_token_get_response_v_2_54', 'AdminApiTokenGetResponse'), + 'AdminApiTokenResponse': __LazyModelLoader('..._common.models.admin_api_token_response_v_2_54', 'AdminApiTokenResponse'), + 'AdminCache': __LazyModelLoader('..._common.models.admin_cache_v_2_54', 'AdminCache'), + 'AdminCacheGetResponse': __LazyModelLoader('..._common.models.admin_cache_get_response_v_2_54', 'AdminCacheGetResponse'), + 'AdminCacheResponse': __LazyModelLoader('..._common.models.admin_cache_response_v_2_54', 'AdminCacheResponse'), + 'AdminGetResponse': __LazyModelLoader('..._common.models.admin_get_response_v_2_54', 'AdminGetResponse'), + 'AdminPatch': __LazyModelLoader('..._common.models.admin_patch_v_2_54', 'AdminPatch'), + 'AdminPost': __LazyModelLoader('..._common.models.admin_post_v_2_54', 'AdminPost'), + 'AdminResponse': __LazyModelLoader('..._common.models.admin_response_v_2_54', 'AdminResponse'), + 'AdminRole': __LazyModelLoader('..._common.models.admin_role_v_2_36', 'AdminRole'), + 'AdminSettings': __LazyModelLoader('..._common.models.admin_settings_v_2_32', 'AdminSettings'), + 'AdminSettingsGetResponse': __LazyModelLoader('..._common.models.admin_settings_get_response_v_2_32', 'AdminSettingsGetResponse'), + 'AdminSettingsRequiredAuthenticationMethods': __LazyModelLoader('..._common.models.admin_settings_required_authentication_methods_v_2_32', 'AdminSettingsRequiredAuthenticationMethods'), + 'AdminSettingsResponse': __LazyModelLoader('..._common.models.admin_settings_response_v_2_32', 'AdminSettingsResponse'), + 'AggregateReplicationPerformance': __LazyModelLoader('..._common.models.aggregate_replication_performance_v_2_1', 'AggregateReplicationPerformance'), + 'Alert': __LazyModelLoader('..._common.models.alert_v_2_51', 'Alert'), + 'AlertEvent': __LazyModelLoader('..._common.models.alert_event_v_2_50', 'AlertEvent'), + 'AlertEventGetResponse': __LazyModelLoader('..._common.models.alert_event_get_response_v_2_50', 'AlertEventGetResponse'), + 'AlertEventResponse': __LazyModelLoader('..._common.models.alert_event_response_v_2_50', 'AlertEventResponse'), + 'AlertGetResponse': __LazyModelLoader('..._common.models.alert_get_response_v_2_51', 'AlertGetResponse'), + 'AlertResponse': __LazyModelLoader('..._common.models.alert_response_v_2_51', 'AlertResponse'), + 'AlertRules': __LazyModelLoader('..._common.models.alert_rules_v_2_50', 'AlertRules'), + 'AlertRulesCatalog': __LazyModelLoader('..._common.models.alert_rules_catalog_v_2_50', 'AlertRulesCatalog'), + 'AlertRulesCatalogGetResponse': __LazyModelLoader('..._common.models.alert_rules_catalog_get_response_v_2_50', 'AlertRulesCatalogGetResponse'), + 'AlertRulesCatalogResponse': __LazyModelLoader('..._common.models.alert_rules_catalog_response_v_2_50', 'AlertRulesCatalogResponse'), + 'AlertRulesGetResponse': __LazyModelLoader('..._common.models.alert_rules_get_response_v_2_50', 'AlertRulesGetResponse'), + 'AlertRulesResponse': __LazyModelLoader('..._common.models.alert_rules_response_v_2_50', 'AlertRulesResponse'), + 'AlertWatcher': __LazyModelLoader('..._common.models.alert_watcher_v_2_4', 'AlertWatcher'), + 'AlertWatcherGetResponse': __LazyModelLoader('..._common.models.alert_watcher_get_response_v_2_4', 'AlertWatcherGetResponse'), + 'AlertWatcherPatch': __LazyModelLoader('..._common.models.alert_watcher_patch_v_2_4', 'AlertWatcherPatch'), + 'AlertWatcherPost': __LazyModelLoader('..._common.models.alert_watcher_post_v_2_4', 'AlertWatcherPost'), + 'AlertWatcherResponse': __LazyModelLoader('..._common.models.alert_watcher_response_v_2_4', 'AlertWatcherResponse'), + 'ApiClient': __LazyModelLoader('..._common.models.api_client_v_2_49', 'ApiClient'), + 'ApiClientGetResponse': __LazyModelLoader('..._common.models.api_client_get_response_v_2_49', 'ApiClientGetResponse'), + 'ApiClientPatch': __LazyModelLoader('..._common.models.api_client_patch_v_2_1', 'ApiClientPatch'), + 'ApiClientPost': __LazyModelLoader('..._common.models.api_client_post_v_2_54', 'ApiClientPost'), + 'ApiClientResponse': __LazyModelLoader('..._common.models.api_client_response_v_2_49', 'ApiClientResponse'), + 'ApiToken': __LazyModelLoader('..._common.models.api_token_v_2_2', 'ApiToken'), + 'ApiVersionResponse': __LazyModelLoader('..._common.models.api_version_response_v_2_50', 'ApiVersionResponse'), + 'App': __LazyModelLoader('..._common.models.app_v_2_2', 'App'), + 'AppGetResponse': __LazyModelLoader('..._common.models.app_get_response_v_2_2', 'AppGetResponse'), + 'AppNode': __LazyModelLoader('..._common.models.app_node_v_2_49', 'AppNode'), + 'AppNodeGetResponse': __LazyModelLoader('..._common.models.app_node_get_response_v_2_49', 'AppNodeGetResponse'), + 'AppNodeResponse': __LazyModelLoader('..._common.models.app_node_response_v_2_49', 'AppNodeResponse'), + 'AppResponse': __LazyModelLoader('..._common.models.app_response_v_2_2', 'AppResponse'), + 'ArrayAvailability': __LazyModelLoader('..._common.models.array_availability_v_2_55', 'ArrayAvailability'), + 'ArrayConnection': __LazyModelLoader('..._common.models.array_connection_v_2_54', 'ArrayConnection'), + 'ArrayConnectionGetResponse': __LazyModelLoader('..._common.models.array_connection_get_response_v_2_54', 'ArrayConnectionGetResponse'), + 'ArrayConnectionKey': __LazyModelLoader('..._common.models.array_connection_key_v_2_55', 'ArrayConnectionKey'), + 'ArrayConnectionKeyGetResponse': __LazyModelLoader('..._common.models.array_connection_key_get_response_v_2_55', 'ArrayConnectionKeyGetResponse'), + 'ArrayConnectionPatch': __LazyModelLoader('..._common.models.array_connection_patch_v_2_44', 'ArrayConnectionPatch'), + 'ArrayConnectionPath': __LazyModelLoader('..._common.models.array_connection_path_v_2_54', 'ArrayConnectionPath'), + 'ArrayConnectionPathGetResponse': __LazyModelLoader('..._common.models.array_connection_path_get_response_v_2_54', 'ArrayConnectionPathGetResponse'), + 'ArrayConnectionPathResponse': __LazyModelLoader('..._common.models.array_connection_path_response_v_2_54', 'ArrayConnectionPathResponse'), + 'ArrayConnectionPost': __LazyModelLoader('..._common.models.array_connection_post_v_2_33', 'ArrayConnectionPost'), + 'ArrayConnectionResponse': __LazyModelLoader('..._common.models.array_connection_response_v_2_54', 'ArrayConnectionResponse'), + 'ArrayEncryption': __LazyModelLoader('..._common.models.array_encryption_v_2_6', 'ArrayEncryption'), + 'ArrayErasure': __LazyModelLoader('..._common.models.array_erasure_v_2_49', 'ArrayErasure'), + 'ArrayErasureGetResponse': __LazyModelLoader('..._common.models.array_erasure_get_response_v_2_49', 'ArrayErasureGetResponse'), + 'ArrayErasurePatch': __LazyModelLoader('..._common.models.array_erasure_patch_v_2_34', 'ArrayErasurePatch'), + 'ArrayErasureResponse': __LazyModelLoader('..._common.models.array_erasure_response_v_2_49', 'ArrayErasureResponse'), + 'ArrayFactoryResetToken': __LazyModelLoader('..._common.models.array_factory_reset_token_v_2_49', 'ArrayFactoryResetToken'), + 'ArrayFactoryResetTokenGetResponse': __LazyModelLoader('..._common.models.array_factory_reset_token_get_response_v_2_49', 'ArrayFactoryResetTokenGetResponse'), + 'ArrayFactoryResetTokenResponse': __LazyModelLoader('..._common.models.array_factory_reset_token_response_v_2_49', 'ArrayFactoryResetTokenResponse'), + 'ArrayGetResponse': __LazyModelLoader('..._common.models.array_get_response_v_2_54', 'ArrayGetResponse'), + 'ArrayPerformance': __LazyModelLoader('..._common.models.array_performance_v_2_52', 'ArrayPerformance'), + 'ArrayPerformanceByLink': __LazyModelLoader('..._common.models.array_performance_by_link_v_2_52', 'ArrayPerformanceByLink'), + 'ArrayPerformanceByLinkGetResponse': __LazyModelLoader('..._common.models.array_performance_by_link_get_response_v_2_52', 'ArrayPerformanceByLinkGetResponse'), + 'ArrayPerformanceByLinkResponse': __LazyModelLoader('..._common.models.array_performance_by_link_response_v_2_52', 'ArrayPerformanceByLinkResponse'), + 'ArrayPerformanceGetResponse': __LazyModelLoader('..._common.models.array_performance_get_response_v_2_52', 'ArrayPerformanceGetResponse'), + 'ArrayResponse': __LazyModelLoader('..._common.models.array_response_v_2_54', 'ArrayResponse'), + 'ArraySpace': __LazyModelLoader('..._common.models.array_space_v_2_50', 'ArraySpace'), + 'ArraySpaceGetResponse': __LazyModelLoader('..._common.models.array_space_get_response_v_2_50', 'ArraySpaceGetResponse'), + 'ArrayencryptionDataAtRest': __LazyModelLoader('..._common.models.arrayencryption_data_at_rest_v_2_6', 'ArrayencryptionDataAtRest'), + 'Arrays': __LazyModelLoader('..._common.models.arrays_v_2_54', 'Arrays'), + 'Audit': __LazyModelLoader('..._common.models.audit_v_2_51', 'Audit'), + 'AuditGetResponse': __LazyModelLoader('..._common.models.audit_get_response_v_2_51', 'AuditGetResponse'), + 'AuditResponse': __LazyModelLoader('..._common.models.audit_response_v_2_51', 'AuditResponse'), + 'BasePort': __LazyModelLoader('..._common.models.base_port_v_2_38', 'BasePort'), + 'Bucket': __LazyModelLoader('..._common.models.bucket_v_2_51', 'Bucket'), + 'BucketBase': __LazyModelLoader('..._common.models.bucket_base_v_2_51', 'BucketBase'), + 'BucketGetResponse': __LazyModelLoader('..._common.models.bucket_get_response_v_2_51', 'BucketGetResponse'), + 'BucketPatchBase': __LazyModelLoader('..._common.models.bucket_patch_base_v_2_51', 'BucketPatchBase'), + 'BucketPerformance': __LazyModelLoader('..._common.models.bucket_performance_v_2_52', 'BucketPerformance'), + 'BucketPerformanceBase': __LazyModelLoader('..._common.models.bucket_performance_base_v_2_52', 'BucketPerformanceBase'), + 'BucketPerformanceGetResponse': __LazyModelLoader('..._common.models.bucket_performance_get_response_v_2_52', 'BucketPerformanceGetResponse'), + 'BucketPostBase': __LazyModelLoader('..._common.models.bucket_post_base_v_2_54', 'BucketPostBase'), + 'BucketResponse': __LazyModelLoader('..._common.models.bucket_response_v_2_51', 'BucketResponse'), + 'BuiltIn': __LazyModelLoader('..._common.models.built_in_v_2_0', 'BuiltIn'), + 'BuiltInRelationship': __LazyModelLoader('..._common.models.built_in_relationship_v_2_2', 'BuiltInRelationship'), + 'BuiltInResourceNoId': __LazyModelLoader('..._common.models.built_in_resource_no_id_v_2_1', 'BuiltInResourceNoId'), + 'Cache': __LazyModelLoader('..._common.models.cache_v_2_51', 'Cache'), + 'CacheGetResponse': __LazyModelLoader('..._common.models.cache_get_response_v_2_51', 'CacheGetResponse'), + 'CacheSpace': __LazyModelLoader('..._common.models.cache_space_v_2_51', 'CacheSpace'), + 'Certificate': __LazyModelLoader('..._common.models.certificate_v_2_49', 'Certificate'), + 'CertificateBase': __LazyModelLoader('..._common.models.certificate_base_v_2_49', 'CertificateBase'), + 'CertificateCertificateGroupGetResponse': __LazyModelLoader('..._common.models.certificate_certificate_group_get_response_v_2_54', 'CertificateCertificateGroupGetResponse'), + 'CertificateCertificateGroupResponse': __LazyModelLoader('..._common.models.certificate_certificate_group_response_v_2_54', 'CertificateCertificateGroupResponse'), + 'CertificateGetResponse': __LazyModelLoader('..._common.models.certificate_get_response_v_2_49', 'CertificateGetResponse'), + 'CertificateGroup': __LazyModelLoader('..._common.models.certificate_group_v_2_36', 'CertificateGroup'), + 'CertificateGroupCertificateGetResponse': __LazyModelLoader('..._common.models.certificate_group_certificate_get_response_v_2_54', 'CertificateGroupCertificateGetResponse'), + 'CertificateGroupCertificateResponse': __LazyModelLoader('..._common.models.certificate_group_certificate_response_v_2_54', 'CertificateGroupCertificateResponse'), + 'CertificateGroupGetResponse': __LazyModelLoader('..._common.models.certificate_group_get_response_v_2_36', 'CertificateGroupGetResponse'), + 'CertificateGroupResponse': __LazyModelLoader('..._common.models.certificate_group_response_v_2_36', 'CertificateGroupResponse'), + 'CertificateGroupUse': __LazyModelLoader('..._common.models.certificate_group_use_v_2_49', 'CertificateGroupUse'), + 'CertificateGroupUseGetResponse': __LazyModelLoader('..._common.models.certificate_group_use_get_response_v_2_49', 'CertificateGroupUseGetResponse'), + 'CertificatePost': __LazyModelLoader('..._common.models.certificate_post_v_2_49', 'CertificatePost'), + 'CertificateResponse': __LazyModelLoader('..._common.models.certificate_response_v_2_49', 'CertificateResponse'), + 'CertificateSigningRequest': __LazyModelLoader('..._common.models.certificate_signing_request_v_2_4', 'CertificateSigningRequest'), + 'CertificateSigningRequestPost': __LazyModelLoader('..._common.models.certificate_signing_request_post_v_2_41', 'CertificateSigningRequestPost'), + 'CertificateSigningRequestResponse': __LazyModelLoader('..._common.models.certificate_signing_request_response_v_2_4', 'CertificateSigningRequestResponse'), + 'CertificateUse': __LazyModelLoader('..._common.models.certificate_use_v_2_49', 'CertificateUse'), + 'CertificateUseGetResponse': __LazyModelLoader('..._common.models.certificate_use_get_response_v_2_49', 'CertificateUseGetResponse'), + 'Chap': __LazyModelLoader('..._common.models.chap_v_2_0', 'Chap'), + 'CloudCapacityGetResponse': __LazyModelLoader('..._common.models.cloud_capacity_get_response_v_2_29', 'CloudCapacityGetResponse'), + 'CloudCapacityPatchResponse': __LazyModelLoader('..._common.models.cloud_capacity_patch_response_v_2_29', 'CloudCapacityPatchResponse'), + 'CloudCapacityStatus': __LazyModelLoader('..._common.models.cloud_capacity_status_v_2_29', 'CloudCapacityStatus'), + 'CloudCapacityStep': __LazyModelLoader('..._common.models.cloud_capacity_step_v_2_29', 'CloudCapacityStep'), + 'CloudCapacityStepsGetResponse': __LazyModelLoader('..._common.models.cloud_capacity_steps_get_response_v_2_29', 'CloudCapacityStepsGetResponse'), + 'CloudConfig': __LazyModelLoader('..._common.models.cloud_config_v_2_44', 'CloudConfig'), + 'CloudConfigAutomaticCapacityUpgrade': __LazyModelLoader('..._common.models.cloud_config_automatic_capacity_upgrade_v_2_44', 'CloudConfigAutomaticCapacityUpgrade'), + 'CloudConfigAutomaticCapacityUpgradePatch': __LazyModelLoader('..._common.models.cloud_config_automatic_capacity_upgrade_patch_v_2_44', 'CloudConfigAutomaticCapacityUpgradePatch'), + 'CloudConfigGetResponse': __LazyModelLoader('..._common.models.cloud_config_get_response_v_2_44', 'CloudConfigGetResponse'), + 'CloudConfigModel': __LazyModelLoader('..._common.models.cloud_config_model_v_2_40', 'CloudConfigModel'), + 'CloudConfigModelPatch': __LazyModelLoader('..._common.models.cloud_config_model_patch_v_2_40', 'CloudConfigModelPatch'), + 'CloudConfigPatch': __LazyModelLoader('..._common.models.cloud_config_patch_v_2_44', 'CloudConfigPatch'), + 'CloudConfigPatchResponse': __LazyModelLoader('..._common.models.cloud_config_patch_response_v_2_44', 'CloudConfigPatchResponse'), + 'CloudConfigSupported': __LazyModelLoader('..._common.models.cloud_config_supported_v_2_40', 'CloudConfigSupported'), + 'CloudConfigSupportedConfigsGetResponse': __LazyModelLoader('..._common.models.cloud_config_supported_configs_get_response_v_2_40', 'CloudConfigSupportedConfigsGetResponse'), + 'CloudProviderTag': __LazyModelLoader('..._common.models.cloud_provider_tag_v_2_6', 'CloudProviderTag'), + 'CloudProviderTagGetResponse': __LazyModelLoader('..._common.models.cloud_provider_tag_get_response_v_2_6', 'CloudProviderTagGetResponse'), + 'CloudProviderTagResponse': __LazyModelLoader('..._common.models.cloud_provider_tag_response_v_2_6', 'CloudProviderTagResponse'), + 'Connection': __LazyModelLoader('..._common.models.connection_v_2_50', 'Connection'), + 'ConnectionGetResponse': __LazyModelLoader('..._common.models.connection_get_response_v_2_50', 'ConnectionGetResponse'), + 'ConnectionPost': __LazyModelLoader('..._common.models.connection_post_v_2_49', 'ConnectionPost'), + 'ConnectionResponse': __LazyModelLoader('..._common.models.connection_response_v_2_50', 'ConnectionResponse'), + 'ContainerDefaultProtection': __LazyModelLoader('..._common.models.container_default_protection_v_2_55', 'ContainerDefaultProtection'), + 'ContainerDefaultProtectionGetResponse': __LazyModelLoader('..._common.models.container_default_protection_get_response_v_2_55', 'ContainerDefaultProtectionGetResponse'), + 'ContainerDefaultProtectionResponse': __LazyModelLoader('..._common.models.container_default_protection_response_v_2_55', 'ContainerDefaultProtectionResponse'), + 'ContainerEradicationConfig': __LazyModelLoader('..._common.models.container_eradication_config_v_2_49', 'ContainerEradicationConfig'), + 'ContainerPerformance': __LazyModelLoader('..._common.models.container_performance_v_2_52', 'ContainerPerformance'), + 'ContainerPerformanceGetResponse': __LazyModelLoader('..._common.models.container_performance_get_response_v_2_52', 'ContainerPerformanceGetResponse'), + 'ContainerPerformanceReplication': __LazyModelLoader('..._common.models.container_performance_replication_v_2_55', 'ContainerPerformanceReplication'), + 'ContainerQos': __LazyModelLoader('..._common.models.container_qos_v_2_47', 'ContainerQos'), + 'ContainerQosBandwidthLimitPatch': __LazyModelLoader('..._common.models.container_qos_bandwidth_limit_patch_v_2_52', 'ContainerQosBandwidthLimitPatch'), + 'ContainerQosCeilings': __LazyModelLoader('..._common.models.container_qos_ceilings_v_2_47', 'ContainerQosCeilings'), + 'ContainerQosCeilingsBandwidthLimitPatch': __LazyModelLoader('..._common.models.container_qos_ceilings_bandwidth_limit_patch_v_2_54', 'ContainerQosCeilingsBandwidthLimitPatch'), + 'ContainerQosCeilingsIopsLimitPatch': __LazyModelLoader('..._common.models.container_qos_ceilings_iops_limit_patch_v_2_54', 'ContainerQosCeilingsIopsLimitPatch'), + 'ContainerQosCeilingsPatch': __LazyModelLoader('..._common.models.container_qos_ceilings_patch_v_2_54', 'ContainerQosCeilingsPatch'), + 'ContainerQosFileCeilings': __LazyModelLoader('..._common.models.container_qos_file_ceilings_v_2_54', 'ContainerQosFileCeilings'), + 'ContainerQosIopsLimitPatch': __LazyModelLoader('..._common.models.container_qos_iops_limit_patch_v_2_52', 'ContainerQosIopsLimitPatch'), + 'ContainerQosPatch': __LazyModelLoader('..._common.models.container_qos_patch_v_2_54', 'ContainerQosPatch'), + 'Context': __LazyModelLoader('..._common.models.context_v_2_50', 'Context'), + 'Controller': __LazyModelLoader('..._common.models.controller_v_2_30', 'Controller'), + 'ControllerGetResponse': __LazyModelLoader('..._common.models.controller_get_response_v_2_30', 'ControllerGetResponse'), + 'DataSealingKey': __LazyModelLoader('..._common.models.data_sealing_key_v_2_55', 'DataSealingKey'), + 'DataSealingKeyGetResponse': __LazyModelLoader('..._common.models.data_sealing_key_get_response_v_2_55', 'DataSealingKeyGetResponse'), + 'DataSealingKeyPatch': __LazyModelLoader('..._common.models.data_sealing_key_patch_v_2_55', 'DataSealingKeyPatch'), + 'DataSealingKeyPost': __LazyModelLoader('..._common.models.data_sealing_key_post_v_2_55', 'DataSealingKeyPost'), + 'DataSealingKeyResponse': __LazyModelLoader('..._common.models.data_sealing_key_response_v_2_55', 'DataSealingKeyResponse'), + 'DataSealingKeyRotate': __LazyModelLoader('..._common.models.data_sealing_key_rotate_v_2_55', 'DataSealingKeyRotate'), + 'DefaultProtectionReference': __LazyModelLoader('..._common.models.default_protection_reference_v_2_49', 'DefaultProtectionReference'), + 'DestroyedPatchPost': __LazyModelLoader('..._common.models.destroyed_patch_post_v_2_0', 'DestroyedPatchPost'), + 'DirectoriesGroupsGetResponse': __LazyModelLoader('..._common.models.directories_groups_get_response_v_2_50', 'DirectoriesGroupsGetResponse'), + 'DirectoriesGroupsResponse': __LazyModelLoader('..._common.models.directories_groups_response_v_2_50', 'DirectoriesGroupsResponse'), + 'DirectoriesPerformanceByArray': __LazyModelLoader('..._common.models.directories_performance_by_array_v_2_55', 'DirectoriesPerformanceByArray'), + 'DirectoriesPerformanceByArrayGetResponse': __LazyModelLoader('..._common.models.directories_performance_by_array_get_response_v_2_55', 'DirectoriesPerformanceByArrayGetResponse'), + 'DirectoriesUsersGetResponse': __LazyModelLoader('..._common.models.directories_users_get_response_v_2_50', 'DirectoriesUsersGetResponse'), + 'DirectoriesUsersResponse': __LazyModelLoader('..._common.models.directories_users_response_v_2_50', 'DirectoriesUsersResponse'), + 'Directory': __LazyModelLoader('..._common.models.directory_v_2_55', 'Directory'), + 'DirectoryExport': __LazyModelLoader('..._common.models.directory_export_v_2_55', 'DirectoryExport'), + 'DirectoryExportGetResponse': __LazyModelLoader('..._common.models.directory_export_get_response_v_2_55', 'DirectoryExportGetResponse'), + 'DirectoryExportPatch': __LazyModelLoader('..._common.models.directory_export_patch_v_2_32', 'DirectoryExportPatch'), + 'DirectoryExportPost': __LazyModelLoader('..._common.models.directory_export_post_v_2_49', 'DirectoryExportPost'), + 'DirectoryExportResponse': __LazyModelLoader('..._common.models.directory_export_response_v_2_55', 'DirectoryExportResponse'), + 'DirectoryGetResponse': __LazyModelLoader('..._common.models.directory_get_response_v_2_55', 'DirectoryGetResponse'), + 'DirectoryGroup': __LazyModelLoader('..._common.models.directory_group_v_2_50', 'DirectoryGroup'), + 'DirectoryGroupQuota': __LazyModelLoader('..._common.models.directory_group_quota_v_2_50', 'DirectoryGroupQuota'), + 'DirectoryGroupQuotasGetResponse': __LazyModelLoader('..._common.models.directory_group_quotas_get_response_v_2_50', 'DirectoryGroupQuotasGetResponse'), + 'DirectoryGroupQuotasResponse': __LazyModelLoader('..._common.models.directory_group_quotas_response_v_2_50', 'DirectoryGroupQuotasResponse'), + 'DirectoryLockNlmReclamation': __LazyModelLoader('..._common.models.directory_lock_nlm_reclamation_v_2_50', 'DirectoryLockNlmReclamation'), + 'DirectoryLockNlmReclamationResponse': __LazyModelLoader('..._common.models.directory_lock_nlm_reclamation_response_v_2_50', 'DirectoryLockNlmReclamationResponse'), + 'DirectoryPatch': __LazyModelLoader('..._common.models.directory_patch_v_2_55', 'DirectoryPatch'), + 'DirectoryPerformance': __LazyModelLoader('..._common.models.directory_performance_v_2_55', 'DirectoryPerformance'), + 'DirectoryPerformanceGetResponse': __LazyModelLoader('..._common.models.directory_performance_get_response_v_2_55', 'DirectoryPerformanceGetResponse'), + 'DirectoryPolicyExportPost': __LazyModelLoader('..._common.models.directory_policy_export_post_v_2_49', 'DirectoryPolicyExportPost'), + 'DirectoryPolicyPost': __LazyModelLoader('..._common.models.directory_policy_post_v_2_49', 'DirectoryPolicyPost'), + 'DirectoryPost': __LazyModelLoader('..._common.models.directory_post_v_2_55', 'DirectoryPost'), + 'DirectoryQosGetResponse': __LazyModelLoader('..._common.models.directory_qos_get_response_v_2_54', 'DirectoryQosGetResponse'), + 'DirectoryQuota': __LazyModelLoader('..._common.models.directory_quota_v_2_50', 'DirectoryQuota'), + 'DirectoryQuotasGetResponse': __LazyModelLoader('..._common.models.directory_quotas_get_response_v_2_50', 'DirectoryQuotasGetResponse'), + 'DirectoryQuotasResponse': __LazyModelLoader('..._common.models.directory_quotas_response_v_2_50', 'DirectoryQuotasResponse'), + 'DirectoryResponse': __LazyModelLoader('..._common.models.directory_response_v_2_55', 'DirectoryResponse'), + 'DirectoryService': __LazyModelLoader('..._common.models.directory_service_v_2_55', 'DirectoryService'), + 'DirectoryServiceCommon': __LazyModelLoader('..._common.models.directory_service_common_v_2_50', 'DirectoryServiceCommon'), + 'DirectoryServiceGetResponse': __LazyModelLoader('..._common.models.directory_service_get_response_v_2_55', 'DirectoryServiceGetResponse'), + 'DirectoryServiceManagement': __LazyModelLoader('..._common.models.directory_service_management_v_2_32', 'DirectoryServiceManagement'), + 'DirectoryServicePatch': __LazyModelLoader('..._common.models.directory_service_patch_v_2_54', 'DirectoryServicePatch'), + 'DirectoryServicePost': __LazyModelLoader('..._common.models.directory_service_post_v_2_50', 'DirectoryServicePost'), + 'DirectoryServiceResponse': __LazyModelLoader('..._common.models.directory_service_response_v_2_55', 'DirectoryServiceResponse'), + 'DirectoryServiceRole': __LazyModelLoader('..._common.models.directory_service_role_v_2_50', 'DirectoryServiceRole'), + 'DirectoryServiceRoleGetResponse': __LazyModelLoader('..._common.models.directory_service_role_get_response_v_2_50', 'DirectoryServiceRoleGetResponse'), + 'DirectoryServiceRolePost': __LazyModelLoader('..._common.models.directory_service_role_post_v_2_54', 'DirectoryServiceRolePost'), + 'DirectoryServiceRoleResponse': __LazyModelLoader('..._common.models.directory_service_role_response_v_2_50', 'DirectoryServiceRoleResponse'), + 'DirectorySnapshot': __LazyModelLoader('..._common.models.directory_snapshot_v_2_50', 'DirectorySnapshot'), + 'DirectorySnapshotEradicationConfig': __LazyModelLoader('..._common.models.directory_snapshot_eradication_config_v_2_49', 'DirectorySnapshotEradicationConfig'), + 'DirectorySnapshotGetResponse': __LazyModelLoader('..._common.models.directory_snapshot_get_response_v_2_50', 'DirectorySnapshotGetResponse'), + 'DirectorySnapshotPatch': __LazyModelLoader('..._common.models.directory_snapshot_patch_v_2_49', 'DirectorySnapshotPatch'), + 'DirectorySnapshotPost': __LazyModelLoader('..._common.models.directory_snapshot_post_v_2_4', 'DirectorySnapshotPost'), + 'DirectorySnapshotResponse': __LazyModelLoader('..._common.models.directory_snapshot_response_v_2_50', 'DirectorySnapshotResponse'), + 'DirectoryUser': __LazyModelLoader('..._common.models.directory_user_v_2_50', 'DirectoryUser'), + 'DirectoryUserQuota': __LazyModelLoader('..._common.models.directory_user_quota_v_2_50', 'DirectoryUserQuota'), + 'DirectoryUserQuotaRule': __LazyModelLoader('..._common.models.directory_user_quota_rule_v_2_49', 'DirectoryUserQuotaRule'), + 'DirectoryUserQuotasGetResponse': __LazyModelLoader('..._common.models.directory_user_quotas_get_response_v_2_50', 'DirectoryUserQuotasGetResponse'), + 'DirectoryUserQuotasResponse': __LazyModelLoader('..._common.models.directory_user_quotas_response_v_2_50', 'DirectoryUserQuotasResponse'), + 'DirectorypolicyexportpostPolicies': __LazyModelLoader('..._common.models.directorypolicyexportpost_policies_v_2_49', 'DirectorypolicyexportpostPolicies'), + 'DirectorypolicypostPolicies': __LazyModelLoader('..._common.models.directorypolicypost_policies_v_2_49', 'DirectorypolicypostPolicies'), + 'Dns': __LazyModelLoader('..._common.models.dns_v_2_55', 'Dns'), + 'DnsGetResponse': __LazyModelLoader('..._common.models.dns_get_response_v_2_55', 'DnsGetResponse'), + 'DnsPatch': __LazyModelLoader('..._common.models.dns_patch_v_2_54', 'DnsPatch'), + 'DnsPost': __LazyModelLoader('..._common.models.dns_post_v_2_54', 'DnsPost'), + 'DnsResponse': __LazyModelLoader('..._common.models.dns_response_v_2_55', 'DnsResponse'), + 'Drive': __LazyModelLoader('..._common.models.drive_v_2_42', 'Drive'), + 'DriveGetResponse': __LazyModelLoader('..._common.models.drive_get_response_v_2_42', 'DriveGetResponse'), + 'DriveResponse': __LazyModelLoader('..._common.models.drive_response_v_2_42', 'DriveResponse'), + 'EradicationConfig': __LazyModelLoader('..._common.models.eradication_config_v_2_26', 'EradicationConfig'), + 'ErrorContextResponse': __LazyModelLoader('..._common.models.error_context_response_v_2_49', 'ErrorContextResponse'), + 'ErrorcontextresponseErrors': __LazyModelLoader('..._common.models.errorcontextresponse_errors_v_2_49', 'ErrorcontextresponseErrors'), + 'Eula': __LazyModelLoader('..._common.models.eula_v_2_30', 'Eula'), + 'EulaGetResponse': __LazyModelLoader('..._common.models.eula_get_response_v_2_30', 'EulaGetResponse'), + 'EulaResponse': __LazyModelLoader('..._common.models.eula_response_v_2_30', 'EulaResponse'), + 'EulaSignature': __LazyModelLoader('..._common.models.eula_signature_v_2_30', 'EulaSignature'), + 'ExportPolicyAttachmentMixin': __LazyModelLoader('..._common.models.export_policy_attachment_mixin_v_2_32', 'ExportPolicyAttachmentMixin'), + 'FilePost': __LazyModelLoader('..._common.models.file_post_v_2_54', 'FilePost'), + 'FileSystem': __LazyModelLoader('..._common.models.file_system_v_2_55', 'FileSystem'), + 'FileSystemGetResponse': __LazyModelLoader('..._common.models.file_system_get_response_v_2_55', 'FileSystemGetResponse'), + 'FileSystemPatch': __LazyModelLoader('..._common.models.file_system_patch_v_2_55', 'FileSystemPatch'), + 'FileSystemPost': __LazyModelLoader('..._common.models.file_system_post_v_2_55', 'FileSystemPost'), + 'FileSystemResponse': __LazyModelLoader('..._common.models.file_system_response_v_2_55', 'FileSystemResponse'), + 'FixedNameResourceNoId': __LazyModelLoader('..._common.models.fixed_name_resource_no_id_v_2_2', 'FixedNameResourceNoId'), + 'FixedReference': __LazyModelLoader('..._common.models.fixed_reference_v_2_49', 'FixedReference'), + 'FixedReferenceNoId': __LazyModelLoader('..._common.models.fixed_reference_no_id_v_2_0', 'FixedReferenceNoId'), + 'FixedReferenceWithType': __LazyModelLoader('..._common.models.fixed_reference_with_type_v_2_49', 'FixedReferenceWithType'), + 'FixedReferenceWithTypeAndLocation': __LazyModelLoader('..._common.models.fixed_reference_with_type_and_location_v_2_49', 'FixedReferenceWithTypeAndLocation'), + 'Fleet': __LazyModelLoader('..._common.models.fleet_v_2_49', 'Fleet'), + 'FleetGetResponse': __LazyModelLoader('..._common.models.fleet_get_response_v_2_49', 'FleetGetResponse'), + 'FleetKey': __LazyModelLoader('..._common.models.fleet_key_v_2_36', 'FleetKey'), + 'FleetKeyGetResponse': __LazyModelLoader('..._common.models.fleet_key_get_response_v_2_36', 'FleetKeyGetResponse'), + 'FleetKeyResponse': __LazyModelLoader('..._common.models.fleet_key_response_v_2_36', 'FleetKeyResponse'), + 'FleetMember': __LazyModelLoader('..._common.models.fleet_member_v_2_49', 'FleetMember'), + 'FleetMemberGetResponse': __LazyModelLoader('..._common.models.fleet_member_get_response_v_2_49', 'FleetMemberGetResponse'), + 'FleetMemberPost': __LazyModelLoader('..._common.models.fleet_member_post_v_2_49', 'FleetMemberPost'), + 'FleetMemberResponse': __LazyModelLoader('..._common.models.fleet_member_response_v_2_49', 'FleetMemberResponse'), + 'FleetPatch': __LazyModelLoader('..._common.models.fleet_patch_v_2_38', 'FleetPatch'), + 'FleetResponse': __LazyModelLoader('..._common.models.fleet_response_v_2_49', 'FleetResponse'), + 'FleetmemberpostMember': __LazyModelLoader('..._common.models.fleetmemberpost_member_v_2_49', 'FleetmemberpostMember'), + 'FleetmemberpostMembers': __LazyModelLoader('..._common.models.fleetmemberpost_members_v_2_49', 'FleetmemberpostMembers'), + 'Hardware': __LazyModelLoader('..._common.models.hardware_v_2_51', 'Hardware'), + 'HardwareGetResponse': __LazyModelLoader('..._common.models.hardware_get_response_v_2_51', 'HardwareGetResponse'), + 'HardwarePatch': __LazyModelLoader('..._common.models.hardware_patch_v_2_2', 'HardwarePatch'), + 'HardwareResponse': __LazyModelLoader('..._common.models.hardware_response_v_2_51', 'HardwareResponse'), + 'Host': __LazyModelLoader('..._common.models.host_v_2_52', 'Host'), + 'HostGetResponse': __LazyModelLoader('..._common.models.host_get_response_v_2_52', 'HostGetResponse'), + 'HostGroup': __LazyModelLoader('..._common.models.host_group_v_2_50', 'HostGroup'), + 'HostGroupGetResponse': __LazyModelLoader('..._common.models.host_group_get_response_v_2_50', 'HostGroupGetResponse'), + 'HostGroupPatch': __LazyModelLoader('..._common.models.host_group_patch_v_2_54', 'HostGroupPatch'), + 'HostGroupPost': __LazyModelLoader('..._common.models.host_group_post_v_2_50', 'HostGroupPost'), + 'HostGroupQosGetResponse': __LazyModelLoader('..._common.models.host_group_qos_get_response_v_2_50', 'HostGroupQosGetResponse'), + 'HostGroupResponse': __LazyModelLoader('..._common.models.host_group_response_v_2_50', 'HostGroupResponse'), + 'HostPatch': __LazyModelLoader('..._common.models.host_patch_v_2_54', 'HostPatch'), + 'HostPerformanceBalance': __LazyModelLoader('..._common.models.host_performance_balance_v_2_50', 'HostPerformanceBalance'), + 'HostPerformanceBalanceGetResponse': __LazyModelLoader('..._common.models.host_performance_balance_get_response_v_2_50', 'HostPerformanceBalanceGetResponse'), + 'HostPortConnectivity': __LazyModelLoader('..._common.models.host_port_connectivity_v_2_0', 'HostPortConnectivity'), + 'HostPost': __LazyModelLoader('..._common.models.host_post_v_2_52', 'HostPost'), + 'HostQosGetResponse': __LazyModelLoader('..._common.models.host_qos_get_response_v_2_50', 'HostQosGetResponse'), + 'HostResponse': __LazyModelLoader('..._common.models.host_response_v_2_52', 'HostResponse'), + 'Kmip': __LazyModelLoader('..._common.models.kmip_v_2_24', 'Kmip'), + 'KmipCertificate': __LazyModelLoader('..._common.models.kmip_certificate_v_2_24', 'KmipCertificate'), + 'KmipGetResponse': __LazyModelLoader('..._common.models.kmip_get_response_v_2_24', 'KmipGetResponse'), + 'KmipObject': __LazyModelLoader('..._common.models.kmip_object_v_2_24', 'KmipObject'), + 'KmipPatch': __LazyModelLoader('..._common.models.kmip_patch_v_2_2', 'KmipPatch'), + 'KmipPost': __LazyModelLoader('..._common.models.kmip_post_v_2_2', 'KmipPost'), + 'KmipResponse': __LazyModelLoader('..._common.models.kmip_response_v_2_24', 'KmipResponse'), + 'KmipTestResult': __LazyModelLoader('..._common.models.kmip_test_result_v_2_2', 'KmipTestResult'), + 'KmipTestResultGetResponse': __LazyModelLoader('..._common.models.kmip_test_result_get_response_v_2_2', 'KmipTestResultGetResponse'), + 'LifecycleRule': __LazyModelLoader('..._common.models.lifecycle_rule_v_2_51', 'LifecycleRule'), + 'LifecycleRuleBase': __LazyModelLoader('..._common.models.lifecycle_rule_base_v_2_51', 'LifecycleRuleBase'), + 'LifecycleRuleConfigBase': __LazyModelLoader('..._common.models.lifecycle_rule_config_base_v_2_51', 'LifecycleRuleConfigBase'), + 'LifecycleRuleGetResponse': __LazyModelLoader('..._common.models.lifecycle_rule_get_response_v_2_51', 'LifecycleRuleGetResponse'), + 'LifecycleRulePatchBase': __LazyModelLoader('..._common.models.lifecycle_rule_patch_base_v_2_51', 'LifecycleRulePatchBase'), + 'LifecycleRulePostBase': __LazyModelLoader('..._common.models.lifecycle_rule_post_base_v_2_54', 'LifecycleRulePostBase'), + 'LifecycleRuleResponse': __LazyModelLoader('..._common.models.lifecycle_rule_response_v_2_51', 'LifecycleRuleResponse'), + 'LimitedBy': __LazyModelLoader('..._common.models.limited_by_v_2_49', 'LimitedBy'), + 'LocalDirectoryService': __LazyModelLoader('..._common.models.local_directory_service_v_2_55', 'LocalDirectoryService'), + 'LocalDirectoryServiceGetResponse': __LazyModelLoader('..._common.models.local_directory_service_get_response_v_2_55', 'LocalDirectoryServiceGetResponse'), + 'LocalDirectoryServicePost': __LazyModelLoader('..._common.models.local_directory_service_post_v_2_44', 'LocalDirectoryServicePost'), + 'LocalDirectoryServiceReference': __LazyModelLoader('..._common.models.local_directory_service_reference_v_2_49', 'LocalDirectoryServiceReference'), + 'LocalDirectoryServiceResponse': __LazyModelLoader('..._common.models.local_directory_service_response_v_2_55', 'LocalDirectoryServiceResponse'), + 'LocalGroup': __LazyModelLoader('..._common.models.local_group_v_2_55', 'LocalGroup'), + 'LocalGroupGetResponse': __LazyModelLoader('..._common.models.local_group_get_response_v_2_55', 'LocalGroupGetResponse'), + 'LocalGroupMembershipPost': __LazyModelLoader('..._common.models.local_group_membership_post_v_2_54', 'LocalGroupMembershipPost'), + 'LocalGroupPatch': __LazyModelLoader('..._common.models.local_group_patch_v_2_50', 'LocalGroupPatch'), + 'LocalGroupPost': __LazyModelLoader('..._common.models.local_group_post_v_2_21', 'LocalGroupPost'), + 'LocalGroupResponse': __LazyModelLoader('..._common.models.local_group_response_v_2_55', 'LocalGroupResponse'), + 'LocalMember': __LazyModelLoader('..._common.models.local_member_v_2_55', 'LocalMember'), + 'LocalMembershipGetResponse': __LazyModelLoader('..._common.models.local_membership_get_response_v_2_55', 'LocalMembershipGetResponse'), + 'LocalMembershipResponse': __LazyModelLoader('..._common.models.local_membership_response_v_2_55', 'LocalMembershipResponse'), + 'LocalUser': __LazyModelLoader('..._common.models.local_user_v_2_55', 'LocalUser'), + 'LocalUserGetResponse': __LazyModelLoader('..._common.models.local_user_get_response_v_2_55', 'LocalUserGetResponse'), + 'LocalUserMembershipPost': __LazyModelLoader('..._common.models.local_user_membership_post_v_2_54', 'LocalUserMembershipPost'), + 'LocalUserPatch': __LazyModelLoader('..._common.models.local_user_patch_v_2_54', 'LocalUserPatch'), + 'LocalUserPost': __LazyModelLoader('..._common.models.local_user_post_v_2_54', 'LocalUserPost'), + 'LocalUserResponse': __LazyModelLoader('..._common.models.local_user_response_v_2_55', 'LocalUserResponse'), + 'LocalgroupmembershippostMembers': __LazyModelLoader('..._common.models.localgroupmembershippost_members_v_2_54', 'LocalgroupmembershippostMembers'), + 'LocalusermembershippostGroups': __LazyModelLoader('..._common.models.localusermembershippost_groups_v_2_54', 'LocalusermembershippostGroups'), + 'LogTarget': __LazyModelLoader('..._common.models.log_target_v_2_50', 'LogTarget'), + 'LogTargetFile': __LazyModelLoader('..._common.models.log_target_file_v_2_54', 'LogTargetFile'), + 'LogTargetFileGetResponse': __LazyModelLoader('..._common.models.log_target_file_get_response_v_2_54', 'LogTargetFileGetResponse'), + 'LogTargetFileResponse': __LazyModelLoader('..._common.models.log_target_file_response_v_2_54', 'LogTargetFileResponse'), + 'LogTargetsGetResponse': __LazyModelLoader('..._common.models.log_targets_get_response_v_2_50', 'LogTargetsGetResponse'), + 'LogTargetsResponse': __LazyModelLoader('..._common.models.log_targets_response_v_2_50', 'LogTargetsResponse'), + 'LoginPost': __LazyModelLoader('..._common.models.login_post_v_2_47', 'LoginPost'), + 'MaintenanceWindow': __LazyModelLoader('..._common.models.maintenance_window_v_2_2', 'MaintenanceWindow'), + 'MaintenanceWindowPost': __LazyModelLoader('..._common.models.maintenance_window_post_v_2_2', 'MaintenanceWindowPost'), + 'MaintenanceWindowsGetResponse': __LazyModelLoader('..._common.models.maintenance_windows_get_response_v_2_2', 'MaintenanceWindowsGetResponse'), + 'MaintenanceWindowsResponse': __LazyModelLoader('..._common.models.maintenance_windows_response_v_2_2', 'MaintenanceWindowsResponse'), + 'MappingPolicy': __LazyModelLoader('..._common.models.mapping_policy_v_2_54', 'MappingPolicy'), + 'MappingPolicyPatch': __LazyModelLoader('..._common.models.mapping_policy_patch_v_2_32', 'MappingPolicyPatch'), + 'Member': __LazyModelLoader('..._common.models.member_v_2_50', 'Member'), + 'MemberGetResponse': __LazyModelLoader('..._common.models.member_get_response_v_2_50', 'MemberGetResponse'), + 'MemberNoIdAll': __LazyModelLoader('..._common.models.member_no_id_all_v_2_50', 'MemberNoIdAll'), + 'MemberNoIdAllGetResponse': __LazyModelLoader('..._common.models.member_no_id_all_get_response_v_2_50', 'MemberNoIdAllGetResponse'), + 'MemberNoIdAllResponse': __LazyModelLoader('..._common.models.member_no_id_all_response_v_2_50', 'MemberNoIdAllResponse'), + 'MemberNoIdMember': __LazyModelLoader('..._common.models.member_no_id_member_v_2_50', 'MemberNoIdMember'), + 'MemberNoIdMemberGetResponse': __LazyModelLoader('..._common.models.member_no_id_member_get_response_v_2_50', 'MemberNoIdMemberGetResponse'), + 'MemberNoIdMemberResponse': __LazyModelLoader('..._common.models.member_no_id_member_response_v_2_50', 'MemberNoIdMemberResponse'), + 'MemberResponse': __LazyModelLoader('..._common.models.member_response_v_2_50', 'MemberResponse'), + 'MemberWithType': __LazyModelLoader('..._common.models.member_with_type_v_2_54', 'MemberWithType'), + 'NamingPattern': __LazyModelLoader('..._common.models.naming_pattern_v_2_51', 'NamingPattern'), + 'NetworkInterface': __LazyModelLoader('..._common.models.network_interface_v_2_55', 'NetworkInterface'), + 'NetworkInterfaceEth': __LazyModelLoader('..._common.models.network_interface_eth_v_2_55', 'NetworkInterfaceEth'), + 'NetworkInterfaceFc': __LazyModelLoader('..._common.models.network_interface_fc_v_2_4', 'NetworkInterfaceFc'), + 'NetworkInterfaceGetResponse': __LazyModelLoader('..._common.models.network_interface_get_response_v_2_55', 'NetworkInterfaceGetResponse'), + 'NetworkInterfaceNeighbor': __LazyModelLoader('..._common.models.network_interface_neighbor_v_2_22', 'NetworkInterfaceNeighbor'), + 'NetworkInterfaceNeighborCapability': __LazyModelLoader('..._common.models.network_interface_neighbor_capability_v_2_22', 'NetworkInterfaceNeighborCapability'), + 'NetworkInterfaceNeighborGetResponse': __LazyModelLoader('..._common.models.network_interface_neighbor_get_response_v_2_22', 'NetworkInterfaceNeighborGetResponse'), + 'NetworkInterfaceNeighborNeighborChassis': __LazyModelLoader('..._common.models.network_interface_neighbor_neighbor_chassis_v_2_22', 'NetworkInterfaceNeighborNeighborChassis'), + 'NetworkInterfaceNeighborNeighborChassisId': __LazyModelLoader('..._common.models.network_interface_neighbor_neighbor_chassis_id_v_2_22', 'NetworkInterfaceNeighborNeighborChassisId'), + 'NetworkInterfaceNeighborNeighborPort': __LazyModelLoader('..._common.models.network_interface_neighbor_neighbor_port_v_2_22', 'NetworkInterfaceNeighborNeighborPort'), + 'NetworkInterfaceNeighborNeighborPortId': __LazyModelLoader('..._common.models.network_interface_neighbor_neighbor_port_id_v_2_22', 'NetworkInterfaceNeighborNeighborPortId'), + 'NetworkInterfaceNeighborResponse': __LazyModelLoader('..._common.models.network_interface_neighbor_response_v_2_22', 'NetworkInterfaceNeighborResponse'), + 'NetworkInterfacePatch': __LazyModelLoader('..._common.models.network_interface_patch_v_2_55', 'NetworkInterfacePatch'), + 'NetworkInterfacePerformance': __LazyModelLoader('..._common.models.network_interface_performance_v_2_36', 'NetworkInterfacePerformance'), + 'NetworkInterfacePerformanceEth': __LazyModelLoader('..._common.models.network_interface_performance_eth_v_2_36', 'NetworkInterfacePerformanceEth'), + 'NetworkInterfacePerformanceFc': __LazyModelLoader('..._common.models.network_interface_performance_fc_v_2_4', 'NetworkInterfacePerformanceFc'), + 'NetworkInterfacePerformanceGetResponse': __LazyModelLoader('..._common.models.network_interface_performance_get_response_v_2_36', 'NetworkInterfacePerformanceGetResponse'), + 'NetworkInterfacePortDetailsRxLos': __LazyModelLoader('..._common.models.network_interface_port_details_rx_los_v_2_16', 'NetworkInterfacePortDetailsRxLos'), + 'NetworkInterfacePortDetailsRxPower': __LazyModelLoader('..._common.models.network_interface_port_details_rx_power_v_2_16', 'NetworkInterfacePortDetailsRxPower'), + 'NetworkInterfacePortDetailsStatic': __LazyModelLoader('..._common.models.network_interface_port_details_static_v_2_16', 'NetworkInterfacePortDetailsStatic'), + 'NetworkInterfacePortDetailsStaticRxPowerThresholds': __LazyModelLoader('..._common.models.network_interface_port_details_static_rx_power_thresholds_v_2_16', 'NetworkInterfacePortDetailsStaticRxPowerThresholds'), + 'NetworkInterfacePortDetailsStaticTemperatureThresholds': __LazyModelLoader('..._common.models.network_interface_port_details_static_temperature_thresholds_v_2_16', 'NetworkInterfacePortDetailsStaticTemperatureThresholds'), + 'NetworkInterfacePortDetailsStaticTxBiasThresholds': __LazyModelLoader('..._common.models.network_interface_port_details_static_tx_bias_thresholds_v_2_16', 'NetworkInterfacePortDetailsStaticTxBiasThresholds'), + 'NetworkInterfacePortDetailsStaticTxPowerThresholds': __LazyModelLoader('..._common.models.network_interface_port_details_static_tx_power_thresholds_v_2_16', 'NetworkInterfacePortDetailsStaticTxPowerThresholds'), + 'NetworkInterfacePortDetailsStaticVoltageThresholds': __LazyModelLoader('..._common.models.network_interface_port_details_static_voltage_thresholds_v_2_16', 'NetworkInterfacePortDetailsStaticVoltageThresholds'), + 'NetworkInterfacePortDetailsTemperature': __LazyModelLoader('..._common.models.network_interface_port_details_temperature_v_2_16', 'NetworkInterfacePortDetailsTemperature'), + 'NetworkInterfacePortDetailsTxBias': __LazyModelLoader('..._common.models.network_interface_port_details_tx_bias_v_2_16', 'NetworkInterfacePortDetailsTxBias'), + 'NetworkInterfacePortDetailsTxFault': __LazyModelLoader('..._common.models.network_interface_port_details_tx_fault_v_2_16', 'NetworkInterfacePortDetailsTxFault'), + 'NetworkInterfacePortDetailsTxPower': __LazyModelLoader('..._common.models.network_interface_port_details_tx_power_v_2_16', 'NetworkInterfacePortDetailsTxPower'), + 'NetworkInterfacePortDetailsVoltage': __LazyModelLoader('..._common.models.network_interface_port_details_voltage_v_2_16', 'NetworkInterfacePortDetailsVoltage'), + 'NetworkInterfacePost': __LazyModelLoader('..._common.models.network_interface_post_v_2_55', 'NetworkInterfacePost'), + 'NetworkInterfaceResponse': __LazyModelLoader('..._common.models.network_interface_response_v_2_55', 'NetworkInterfaceResponse'), + 'NetworkInterfacesPortDetails': __LazyModelLoader('..._common.models.network_interfaces_port_details_v_2_16', 'NetworkInterfacesPortDetails'), + 'NetworkInterfacesPortDetailsGetResponse': __LazyModelLoader('..._common.models.network_interfaces_port_details_get_response_v_2_16', 'NetworkInterfacesPortDetailsGetResponse'), + 'NetworkInterfacesPortDetailsResponse': __LazyModelLoader('..._common.models.network_interfaces_port_details_response_v_2_16', 'NetworkInterfacesPortDetailsResponse'), + 'NetworkinterfacepatchEth': __LazyModelLoader('..._common.models.networkinterfacepatch_eth_v_2_55', 'NetworkinterfacepatchEth'), + 'NetworkinterfacepostEth': __LazyModelLoader('..._common.models.networkinterfacepost_eth_v_2_55', 'NetworkinterfacepostEth'), + 'NewFqname': __LazyModelLoader('..._common.models.new_fqname_v_2_44', 'NewFqname'), + 'NewName': __LazyModelLoader('..._common.models.new_name_v_2_0', 'NewName'), + 'NonCopyableTag': __LazyModelLoader('..._common.models.non_copyable_tag_v_2_49', 'NonCopyableTag'), + 'NonCopyableTagBatch': __LazyModelLoader('..._common.models.non_copyable_tag_batch_v_2_49', 'NonCopyableTagBatch'), + 'Oauth210TokenPost400Response': __LazyModelLoader('..._common.models.oauth210_token_post400_response_v_2_0', 'Oauth210TokenPost400Response'), + 'Oauth210TokenPost401Response': __LazyModelLoader('..._common.models.oauth210_token_post401_response_v_2_0', 'Oauth210TokenPost401Response'), + 'OauthTokenResponse': __LazyModelLoader('..._common.models.oauth_token_response_v_2_0', 'OauthTokenResponse'), + 'ObjectStoreAccessKey': __LazyModelLoader('..._common.models.object_store_access_key_v_2_51', 'ObjectStoreAccessKey'), + 'ObjectStoreAccessKeyBase': __LazyModelLoader('..._common.models.object_store_access_key_base_v_2_51', 'ObjectStoreAccessKeyBase'), + 'ObjectStoreAccessKeyGetResponse': __LazyModelLoader('..._common.models.object_store_access_key_get_response_v_2_51', 'ObjectStoreAccessKeyGetResponse'), + 'ObjectStoreAccessKeyPostBase': __LazyModelLoader('..._common.models.object_store_access_key_post_base_v_2_55', 'ObjectStoreAccessKeyPostBase'), + 'ObjectStoreAccessKeyResponse': __LazyModelLoader('..._common.models.object_store_access_key_response_v_2_51', 'ObjectStoreAccessKeyResponse'), + 'ObjectStoreAccessPolicy': __LazyModelLoader('..._common.models.object_store_access_policy_v_2_54', 'ObjectStoreAccessPolicy'), + 'ObjectStoreAccessPolicyGetResponse': __LazyModelLoader('..._common.models.object_store_access_policy_get_response_v_2_54', 'ObjectStoreAccessPolicyGetResponse'), + 'ObjectStoreAccessPolicyResponse': __LazyModelLoader('..._common.models.object_store_access_policy_response_v_2_54', 'ObjectStoreAccessPolicyResponse'), + 'ObjectStoreAccessPolicyRuleGetResponse': __LazyModelLoader('..._common.models.object_store_access_policy_rule_get_response_v_2_54', 'ObjectStoreAccessPolicyRuleGetResponse'), + 'ObjectStoreAccessPolicyRuleResponse': __LazyModelLoader('..._common.models.object_store_access_policy_rule_response_v_2_54', 'ObjectStoreAccessPolicyRuleResponse'), + 'ObjectStoreAccount': __LazyModelLoader('..._common.models.object_store_account_v_2_51', 'ObjectStoreAccount'), + 'ObjectStoreAccountBase': __LazyModelLoader('..._common.models.object_store_account_base_v_2_51', 'ObjectStoreAccountBase'), + 'ObjectStoreAccountGetResponse': __LazyModelLoader('..._common.models.object_store_account_get_response_v_2_51', 'ObjectStoreAccountGetResponse'), + 'ObjectStoreAccountResponse': __LazyModelLoader('..._common.models.object_store_account_response_v_2_51', 'ObjectStoreAccountResponse'), + 'ObjectStoreUser': __LazyModelLoader('..._common.models.object_store_user_v_2_51', 'ObjectStoreUser'), + 'ObjectStoreUserBase': __LazyModelLoader('..._common.models.object_store_user_base_v_2_51', 'ObjectStoreUserBase'), + 'ObjectStoreUserGetResponse': __LazyModelLoader('..._common.models.object_store_user_get_response_v_2_51', 'ObjectStoreUserGetResponse'), + 'ObjectStoreUserResponse': __LazyModelLoader('..._common.models.object_store_user_response_v_2_51', 'ObjectStoreUserResponse'), + 'ObjectStoreVirtualHost': __LazyModelLoader('..._common.models.object_store_virtual_host_v_2_51', 'ObjectStoreVirtualHost'), + 'ObjectStoreVirtualHostGetResponse': __LazyModelLoader('..._common.models.object_store_virtual_host_get_response_v_2_51', 'ObjectStoreVirtualHostGetResponse'), + 'ObjectStoreVirtualHostResponse': __LazyModelLoader('..._common.models.object_store_virtual_host_response_v_2_51', 'ObjectStoreVirtualHostResponse'), + 'Offload': __LazyModelLoader('..._common.models.offload_v_2_50', 'Offload'), + 'OffloadAzure': __LazyModelLoader('..._common.models.offload_azure_v_2_50', 'OffloadAzure'), + 'OffloadAzurePatch': __LazyModelLoader('..._common.models.offload_azure_patch_v_2_50', 'OffloadAzurePatch'), + 'OffloadGetResponse': __LazyModelLoader('..._common.models.offload_get_response_v_2_50', 'OffloadGetResponse'), + 'OffloadGoogleCloud': __LazyModelLoader('..._common.models.offload_google_cloud_v_2_25', 'OffloadGoogleCloud'), + 'OffloadNfs': __LazyModelLoader('..._common.models.offload_nfs_v_2_25', 'OffloadNfs'), + 'OffloadPatch': __LazyModelLoader('..._common.models.offload_patch_v_2_50', 'OffloadPatch'), + 'OffloadPost': __LazyModelLoader('..._common.models.offload_post_v_2_50', 'OffloadPost'), + 'OffloadResponse': __LazyModelLoader('..._common.models.offload_response_v_2_50', 'OffloadResponse'), + 'OffloadS3': __LazyModelLoader('..._common.models.offload_s3_v_2_25', 'OffloadS3'), + 'OverrideCheck': __LazyModelLoader('..._common.models.override_check_v_2_4', 'OverrideCheck'), + 'PageInfo': __LazyModelLoader('..._common.models.page_info_v_2_1', 'PageInfo'), + 'PageInfoWithoutTotalItemCountResponse': __LazyModelLoader('..._common.models.page_info_without_total_item_count_response_v_2_40', 'PageInfoWithoutTotalItemCountResponse'), + 'Performance': __LazyModelLoader('..._common.models.performance_v_2_51', 'Performance'), + 'PerformanceOthers': __LazyModelLoader('..._common.models.performance_others_v_2_52', 'PerformanceOthers'), + 'Pod': __LazyModelLoader('..._common.models.pod_v_2_55', 'Pod'), + 'PodArrayAndMember': __LazyModelLoader('..._common.models.pod_array_and_member_v_2_54', 'PodArrayAndMember'), + 'PodArrayStatus': __LazyModelLoader('..._common.models.pod_array_status_v_2_54', 'PodArrayStatus'), + 'PodGetResponse': __LazyModelLoader('..._common.models.pod_get_response_v_2_55', 'PodGetResponse'), + 'PodMember': __LazyModelLoader('..._common.models.pod_member_v_2_54', 'PodMember'), + 'PodMemberGetResponse': __LazyModelLoader('..._common.models.pod_member_get_response_v_2_54', 'PodMemberGetResponse'), + 'PodMemberResponse': __LazyModelLoader('..._common.models.pod_member_response_v_2_54', 'PodMemberResponse'), + 'PodPatch': __LazyModelLoader('..._common.models.pod_patch_v_2_55', 'PodPatch'), + 'PodPerformance': __LazyModelLoader('..._common.models.pod_performance_v_2_52', 'PodPerformance'), + 'PodPerformanceByArray': __LazyModelLoader('..._common.models.pod_performance_by_array_v_2_52', 'PodPerformanceByArray'), + 'PodPerformanceByArrayGetResponse': __LazyModelLoader('..._common.models.pod_performance_by_array_get_response_v_2_52', 'PodPerformanceByArrayGetResponse'), + 'PodPerformanceReplication': __LazyModelLoader('..._common.models.pod_performance_replication_v_2_55', 'PodPerformanceReplication'), + 'PodPerformanceReplicationByArray': __LazyModelLoader('..._common.models.pod_performance_replication_by_array_v_2_55', 'PodPerformanceReplicationByArray'), + 'PodPerformanceReplicationByArrayGetResponse': __LazyModelLoader('..._common.models.pod_performance_replication_by_array_get_response_v_2_55', 'PodPerformanceReplicationByArrayGetResponse'), + 'PodPerformanceReplicationByArrayResponse': __LazyModelLoader('..._common.models.pod_performance_replication_by_array_response_v_2_55', 'PodPerformanceReplicationByArrayResponse'), + 'PodPerformanceReplicationGetResponse': __LazyModelLoader('..._common.models.pod_performance_replication_get_response_v_2_55', 'PodPerformanceReplicationGetResponse'), + 'PodPerformanceReplicationResponse': __LazyModelLoader('..._common.models.pod_performance_replication_response_v_2_55', 'PodPerformanceReplicationResponse'), + 'PodPost': __LazyModelLoader('..._common.models.pod_post_v_2_55', 'PodPost'), + 'PodRemoteArrayStatus': __LazyModelLoader('..._common.models.pod_remote_array_status_v_2_54', 'PodRemoteArrayStatus'), + 'PodReplicaLink': __LazyModelLoader('..._common.models.pod_replica_link_v_2_52', 'PodReplicaLink'), + 'PodReplicaLinkGetResponse': __LazyModelLoader('..._common.models.pod_replica_link_get_response_v_2_52', 'PodReplicaLinkGetResponse'), + 'PodReplicaLinkLag': __LazyModelLoader('..._common.models.pod_replica_link_lag_v_2_52', 'PodReplicaLinkLag'), + 'PodReplicaLinkLagGetResponse': __LazyModelLoader('..._common.models.pod_replica_link_lag_get_response_v_2_52', 'PodReplicaLinkLagGetResponse'), + 'PodReplicaLinkLagResponse': __LazyModelLoader('..._common.models.pod_replica_link_lag_response_v_2_52', 'PodReplicaLinkLagResponse'), + 'PodReplicaLinkMappingPolicyGetResponse': __LazyModelLoader('..._common.models.pod_replica_link_mapping_policy_get_response_v_2_54', 'PodReplicaLinkMappingPolicyGetResponse'), + 'PodReplicaLinkMappingPolicyResponse': __LazyModelLoader('..._common.models.pod_replica_link_mapping_policy_response_v_2_54', 'PodReplicaLinkMappingPolicyResponse'), + 'PodReplicaLinkPatch': __LazyModelLoader('..._common.models.pod_replica_link_patch_v_2_2', 'PodReplicaLinkPatch'), + 'PodReplicaLinkPerformanceReplication': __LazyModelLoader('..._common.models.pod_replica_link_performance_replication_v_2_52', 'PodReplicaLinkPerformanceReplication'), + 'PodReplicaLinkPerformanceReplicationArray': __LazyModelLoader('..._common.models.pod_replica_link_performance_replication_array_v_2_54', 'PodReplicaLinkPerformanceReplicationArray'), + 'PodReplicaLinkPerformanceReplicationArrayGetResponse': __LazyModelLoader('..._common.models.pod_replica_link_performance_replication_array_get_response_v_2_54', 'PodReplicaLinkPerformanceReplicationArrayGetResponse'), + 'PodReplicaLinkPerformanceReplicationArrayResponse': __LazyModelLoader('..._common.models.pod_replica_link_performance_replication_array_response_v_2_54', 'PodReplicaLinkPerformanceReplicationArrayResponse'), + 'PodReplicaLinkPerformanceReplicationGetResponse': __LazyModelLoader('..._common.models.pod_replica_link_performance_replication_get_response_v_2_52', 'PodReplicaLinkPerformanceReplicationGetResponse'), + 'PodReplicaLinkPerformanceReplicationResponse': __LazyModelLoader('..._common.models.pod_replica_link_performance_replication_response_v_2_52', 'PodReplicaLinkPerformanceReplicationResponse'), + 'PodReplicaLinkReference': __LazyModelLoader('..._common.models.pod_replica_link_reference_v_2_52', 'PodReplicaLinkReference'), + 'PodReplicaLinkResponse': __LazyModelLoader('..._common.models.pod_replica_link_response_v_2_52', 'PodReplicaLinkResponse'), + 'PodResponse': __LazyModelLoader('..._common.models.pod_response_v_2_55', 'PodResponse'), + 'PodSpace': __LazyModelLoader('..._common.models.pod_space_v_2_50', 'PodSpace'), + 'Policy': __LazyModelLoader('..._common.models.policy_v_2_55', 'Policy'), + 'PolicyAssignmentPost': __LazyModelLoader('..._common.models.policy_assignment_post_v_2_49', 'PolicyAssignmentPost'), + 'PolicyAssignmentPostPolicy': __LazyModelLoader('..._common.models.policy_assignment_post_policy_v_2_49', 'PolicyAssignmentPostPolicy'), + 'PolicyAuditFile': __LazyModelLoader('..._common.models.policy_audit_file_v_2_55', 'PolicyAuditFile'), + 'PolicyAuditFileGetResponse': __LazyModelLoader('..._common.models.policy_audit_file_get_response_v_2_55', 'PolicyAuditFileGetResponse'), + 'PolicyAuditFilePatch': __LazyModelLoader('..._common.models.policy_audit_file_patch_v_2_55', 'PolicyAuditFilePatch'), + 'PolicyAuditFilePost': __LazyModelLoader('..._common.models.policy_audit_file_post_v_2_55', 'PolicyAuditFilePost'), + 'PolicyAuditFileResponse': __LazyModelLoader('..._common.models.policy_audit_file_response_v_2_55', 'PolicyAuditFileResponse'), + 'PolicyBase': __LazyModelLoader('..._common.models.policy_base_v_2_52', 'PolicyBase'), + 'PolicyGetResponse': __LazyModelLoader('..._common.models.policy_get_response_v_2_55', 'PolicyGetResponse'), + 'PolicyLockable': __LazyModelLoader('..._common.models.policy_lockable_v_2_55', 'PolicyLockable'), + 'PolicyLockableEradicationConfig': __LazyModelLoader('..._common.models.policy_lockable_eradication_config_v_2_49', 'PolicyLockableEradicationConfig'), + 'PolicyLockableGetResponse': __LazyModelLoader('..._common.models.policy_lockable_get_response_v_2_55', 'PolicyLockableGetResponse'), + 'PolicyLockablePatch': __LazyModelLoader('..._common.models.policy_lockable_patch_v_2_49', 'PolicyLockablePatch'), + 'PolicyLockableResponse': __LazyModelLoader('..._common.models.policy_lockable_response_v_2_55', 'PolicyLockableResponse'), + 'PolicyManagementAccess': __LazyModelLoader('..._common.models.policy_management_access_v_2_54', 'PolicyManagementAccess'), + 'PolicyManagementAccessGetResponse': __LazyModelLoader('..._common.models.policy_management_access_get_response_v_2_54', 'PolicyManagementAccessGetResponse'), + 'PolicyManagementAccessPatch': __LazyModelLoader('..._common.models.policy_management_access_patch_v_2_54', 'PolicyManagementAccessPatch'), + 'PolicyManagementAccessPost': __LazyModelLoader('..._common.models.policy_management_access_post_v_2_54', 'PolicyManagementAccessPost'), + 'PolicyManagementAccessResponse': __LazyModelLoader('..._common.models.policy_management_access_response_v_2_54', 'PolicyManagementAccessResponse'), + 'PolicyMember': __LazyModelLoader('..._common.models.policy_member_v_2_51', 'PolicyMember'), + 'PolicyMemberBase': __LazyModelLoader('..._common.models.policy_member_base_v_2_51', 'PolicyMemberBase'), + 'PolicyMemberClean': __LazyModelLoader('..._common.models.policy_member_clean_v_2_50', 'PolicyMemberClean'), + 'PolicyMemberCleanGetResponse': __LazyModelLoader('..._common.models.policy_member_clean_get_response_v_2_50', 'PolicyMemberCleanGetResponse'), + 'PolicyMemberCleanResponse': __LazyModelLoader('..._common.models.policy_member_clean_response_v_2_50', 'PolicyMemberCleanResponse'), + 'PolicyMemberExport': __LazyModelLoader('..._common.models.policy_member_export_v_2_55', 'PolicyMemberExport'), + 'PolicyMemberExportGetResponse': __LazyModelLoader('..._common.models.policy_member_export_get_response_v_2_55', 'PolicyMemberExportGetResponse'), + 'PolicyMemberExportPost': __LazyModelLoader('..._common.models.policy_member_export_post_v_2_54', 'PolicyMemberExportPost'), + 'PolicyMemberExportResponse': __LazyModelLoader('..._common.models.policy_member_export_response_v_2_55', 'PolicyMemberExportResponse'), + 'PolicyMemberGetResponse': __LazyModelLoader('..._common.models.policy_member_get_response_v_2_51', 'PolicyMemberGetResponse'), + 'PolicyMemberObjectStoreAccessGetResponse': __LazyModelLoader('..._common.models.policy_member_object_store_access_get_response_v_2_51', 'PolicyMemberObjectStoreAccessGetResponse'), + 'PolicyMemberObjectStoreAccessResponse': __LazyModelLoader('..._common.models.policy_member_object_store_access_response_v_2_51', 'PolicyMemberObjectStoreAccessResponse'), + 'PolicyMemberPost': __LazyModelLoader('..._common.models.policy_member_post_v_2_54', 'PolicyMemberPost'), + 'PolicyMemberResponse': __LazyModelLoader('..._common.models.policy_member_response_v_2_51', 'PolicyMemberResponse'), + 'PolicyNfs': __LazyModelLoader('..._common.models.policy_nfs_v_2_55', 'PolicyNfs'), + 'PolicyNfsGetResponse': __LazyModelLoader('..._common.models.policy_nfs_get_response_v_2_55', 'PolicyNfsGetResponse'), + 'PolicyNfsPatch': __LazyModelLoader('..._common.models.policy_nfs_patch_v_2_29', 'PolicyNfsPatch'), + 'PolicyNfsPolicyMapping': __LazyModelLoader('..._common.models.policy_nfs_policy_mapping_v_2_32', 'PolicyNfsPolicyMapping'), + 'PolicyNfsPost': __LazyModelLoader('..._common.models.policy_nfs_post_v_2_32', 'PolicyNfsPost'), + 'PolicyNfsResponse': __LazyModelLoader('..._common.models.policy_nfs_response_v_2_55', 'PolicyNfsResponse'), + 'PolicyPassword': __LazyModelLoader('..._common.models.policy_password_v_2_50', 'PolicyPassword'), + 'PolicyPasswordGetResponse': __LazyModelLoader('..._common.models.policy_password_get_response_v_2_50', 'PolicyPasswordGetResponse'), + 'PolicyPasswordResponse': __LazyModelLoader('..._common.models.policy_password_response_v_2_50', 'PolicyPasswordResponse'), + 'PolicyPatch': __LazyModelLoader('..._common.models.policy_patch_v_2_3', 'PolicyPatch'), + 'PolicyPost': __LazyModelLoader('..._common.models.policy_post_v_2_3', 'PolicyPost'), + 'PolicyQos': __LazyModelLoader('..._common.models.policy_qos_v_2_55', 'PolicyQos'), + 'PolicyQosGetResponse': __LazyModelLoader('..._common.models.policy_qos_get_response_v_2_55', 'PolicyQosGetResponse'), + 'PolicyQosPatch': __LazyModelLoader('..._common.models.policy_qos_patch_v_2_54', 'PolicyQosPatch'), + 'PolicyQosPost': __LazyModelLoader('..._common.models.policy_qos_post_v_2_54', 'PolicyQosPost'), + 'PolicyQosResponse': __LazyModelLoader('..._common.models.policy_qos_response_v_2_55', 'PolicyQosResponse'), + 'PolicyQuota': __LazyModelLoader('..._common.models.policy_quota_v_2_55', 'PolicyQuota'), + 'PolicyQuotaGetResponse': __LazyModelLoader('..._common.models.policy_quota_get_response_v_2_55', 'PolicyQuotaGetResponse'), + 'PolicyQuotaPatch': __LazyModelLoader('..._common.models.policy_quota_patch_v_2_51', 'PolicyQuotaPatch'), + 'PolicyQuotaResponse': __LazyModelLoader('..._common.models.policy_quota_response_v_2_55', 'PolicyQuotaResponse'), + 'PolicyResponse': __LazyModelLoader('..._common.models.policy_response_v_2_55', 'PolicyResponse'), + 'PolicyRuleAlertWatcher': __LazyModelLoader('..._common.models.policy_rule_alert_watcher_v_2_52', 'PolicyRuleAlertWatcher'), + 'PolicyRuleAlertWatcherGetResponse': __LazyModelLoader('..._common.models.policy_rule_alert_watcher_get_response_v_2_52', 'PolicyRuleAlertWatcherGetResponse'), + 'PolicyRuleAlertWatcherPatch': __LazyModelLoader('..._common.models.policy_rule_alert_watcher_patch_v_2_52', 'PolicyRuleAlertWatcherPatch'), + 'PolicyRuleAlertWatcherPost': __LazyModelLoader('..._common.models.policy_rule_alert_watcher_post_v_2_52', 'PolicyRuleAlertWatcherPost'), + 'PolicyRuleAlertWatcherResponse': __LazyModelLoader('..._common.models.policy_rule_alert_watcher_response_v_2_52', 'PolicyRuleAlertWatcherResponse'), + 'PolicyRuleNetworkAccess': __LazyModelLoader('..._common.models.policy_rule_network_access_v_2_52', 'PolicyRuleNetworkAccess'), + 'PolicyRuleNetworkAccessGetResponse': __LazyModelLoader('..._common.models.policy_rule_network_access_get_response_v_2_52', 'PolicyRuleNetworkAccessGetResponse'), + 'PolicyRuleNetworkAccessPatch': __LazyModelLoader('..._common.models.policy_rule_network_access_patch_v_2_52', 'PolicyRuleNetworkAccessPatch'), + 'PolicyRuleNetworkAccessPost': __LazyModelLoader('..._common.models.policy_rule_network_access_post_v_2_52', 'PolicyRuleNetworkAccessPost'), + 'PolicyRuleNetworkAccessResponse': __LazyModelLoader('..._common.models.policy_rule_network_access_response_v_2_52', 'PolicyRuleNetworkAccessResponse'), + 'PolicyRuleNfsClient': __LazyModelLoader('..._common.models.policy_rule_nfs_client_v_2_50', 'PolicyRuleNfsClient'), + 'PolicyRuleNfsClientGetResponse': __LazyModelLoader('..._common.models.policy_rule_nfs_client_get_response_v_2_50', 'PolicyRuleNfsClientGetResponse'), + 'PolicyRuleNfsClientPatch': __LazyModelLoader('..._common.models.policy_rule_nfs_client_patch_v_2_51', 'PolicyRuleNfsClientPatch'), + 'PolicyRuleNfsClientPost': __LazyModelLoader('..._common.models.policy_rule_nfs_client_post_v_2_29', 'PolicyRuleNfsClientPost'), + 'PolicyRuleNfsClientResponse': __LazyModelLoader('..._common.models.policy_rule_nfs_client_response_v_2_50', 'PolicyRuleNfsClientResponse'), + 'PolicyRuleObjectStoreAccess': __LazyModelLoader('..._common.models.policy_rule_object_store_access_v_2_54', 'PolicyRuleObjectStoreAccess'), + 'PolicyRuleObjectStoreAccessBase': __LazyModelLoader('..._common.models.policy_rule_object_store_access_base_v_2_54', 'PolicyRuleObjectStoreAccessBase'), + 'PolicyRuleQuota': __LazyModelLoader('..._common.models.policy_rule_quota_v_2_50', 'PolicyRuleQuota'), + 'PolicyRuleQuotaGetResponse': __LazyModelLoader('..._common.models.policy_rule_quota_get_response_v_2_50', 'PolicyRuleQuotaGetResponse'), + 'PolicyRuleQuotaPatch': __LazyModelLoader('..._common.models.policy_rule_quota_patch_v_2_52', 'PolicyRuleQuotaPatch'), + 'PolicyRuleQuotaPost': __LazyModelLoader('..._common.models.policy_rule_quota_post_v_2_21', 'PolicyRuleQuotaPost'), + 'PolicyRuleQuotaResponse': __LazyModelLoader('..._common.models.policy_rule_quota_response_v_2_50', 'PolicyRuleQuotaResponse'), + 'PolicyRuleSmbClient': __LazyModelLoader('..._common.models.policy_rule_smb_client_v_2_50', 'PolicyRuleSmbClient'), + 'PolicyRuleSmbClientGetResponse': __LazyModelLoader('..._common.models.policy_rule_smb_client_get_response_v_2_50', 'PolicyRuleSmbClientGetResponse'), + 'PolicyRuleSmbClientPost': __LazyModelLoader('..._common.models.policy_rule_smb_client_post_v_2_3', 'PolicyRuleSmbClientPost'), + 'PolicyRuleSmbClientResponse': __LazyModelLoader('..._common.models.policy_rule_smb_client_response_v_2_50', 'PolicyRuleSmbClientResponse'), + 'PolicyRuleSnapshot': __LazyModelLoader('..._common.models.policy_rule_snapshot_v_2_50', 'PolicyRuleSnapshot'), + 'PolicyRuleSnapshotGetResponse': __LazyModelLoader('..._common.models.policy_rule_snapshot_get_response_v_2_50', 'PolicyRuleSnapshotGetResponse'), + 'PolicyRuleSnapshotPatch': __LazyModelLoader('..._common.models.policy_rule_snapshot_patch_v_2_49', 'PolicyRuleSnapshotPatch'), + 'PolicyRuleSnapshotPost': __LazyModelLoader('..._common.models.policy_rule_snapshot_post_v_2_21', 'PolicyRuleSnapshotPost'), + 'PolicyRuleSnapshotResponse': __LazyModelLoader('..._common.models.policy_rule_snapshot_response_v_2_50', 'PolicyRuleSnapshotResponse'), + 'PolicyRuleUserGroupQuota': __LazyModelLoader('..._common.models.policy_rule_user_group_quota_v_2_50', 'PolicyRuleUserGroupQuota'), + 'PolicyRuleUserGroupQuotaGetResponse': __LazyModelLoader('..._common.models.policy_rule_user_group_quota_get_response_v_2_50', 'PolicyRuleUserGroupQuotaGetResponse'), + 'PolicyRuleUserGroupQuotaLimitPatch': __LazyModelLoader('..._common.models.policy_rule_user_group_quota_limit_patch_v_2_52', 'PolicyRuleUserGroupQuotaLimitPatch'), + 'PolicyRuleUserGroupQuotaPatch': __LazyModelLoader('..._common.models.policy_rule_user_group_quota_patch_v_2_52', 'PolicyRuleUserGroupQuotaPatch'), + 'PolicyRuleUserGroupQuotaPost': __LazyModelLoader('..._common.models.policy_rule_user_group_quota_post_v_2_44', 'PolicyRuleUserGroupQuotaPost'), + 'PolicyRuleUserGroupQuotaResponse': __LazyModelLoader('..._common.models.policy_rule_user_group_quota_response_v_2_50', 'PolicyRuleUserGroupQuotaResponse'), + 'PolicyRuleUserGroupQuotaSubject': __LazyModelLoader('..._common.models.policy_rule_user_group_quota_subject_v_2_44', 'PolicyRuleUserGroupQuotaSubject'), + 'PolicySmb': __LazyModelLoader('..._common.models.policy_smb_v_2_55', 'PolicySmb'), + 'PolicySmbGetResponse': __LazyModelLoader('..._common.models.policy_smb_get_response_v_2_55', 'PolicySmbGetResponse'), + 'PolicySmbPatch': __LazyModelLoader('..._common.models.policy_smb_patch_v_2_43', 'PolicySmbPatch'), + 'PolicySmbPost': __LazyModelLoader('..._common.models.policy_smb_post_v_2_43', 'PolicySmbPost'), + 'PolicySmbResponse': __LazyModelLoader('..._common.models.policy_smb_response_v_2_55', 'PolicySmbResponse'), + 'PolicyTls': __LazyModelLoader('..._common.models.policy_tls_v_2_55', 'PolicyTls'), + 'PolicyTlsBase': __LazyModelLoader('..._common.models.policy_tls_base_v_2_54', 'PolicyTlsBase'), + 'PolicyTlsGetResponse': __LazyModelLoader('..._common.models.policy_tls_get_response_v_2_55', 'PolicyTlsGetResponse'), + 'PolicyTlsPatch': __LazyModelLoader('..._common.models.policy_tls_patch_v_2_54', 'PolicyTlsPatch'), + 'PolicyTlsPost': __LazyModelLoader('..._common.models.policy_tls_post_v_2_54', 'PolicyTlsPost'), + 'PolicyTlsResponse': __LazyModelLoader('..._common.models.policy_tls_response_v_2_55', 'PolicyTlsResponse'), + 'PolicymemberexportpostMembers': __LazyModelLoader('..._common.models.policymemberexportpost_members_v_2_54', 'PolicymemberexportpostMembers'), + 'PolicymemberpostMembers': __LazyModelLoader('..._common.models.policymemberpost_members_v_2_54', 'PolicymemberpostMembers'), + 'PolicynfspostPolicyMapping': __LazyModelLoader('..._common.models.policynfspost_policy_mapping_v_2_32', 'PolicynfspostPolicyMapping'), + 'PolicyqosRatelimit': __LazyModelLoader('..._common.models.policyqos_ratelimit_v_2_54', 'PolicyqosRatelimit'), + 'PolicyrulealertwatcherpatchRules': __LazyModelLoader('..._common.models.policyrulealertwatcherpatch_rules_v_2_52', 'PolicyrulealertwatcherpatchRules'), + 'PolicyrulealertwatcherpostRules': __LazyModelLoader('..._common.models.policyrulealertwatcherpost_rules_v_2_52', 'PolicyrulealertwatcherpostRules'), + 'PolicyrulemanagementaccessRules': __LazyModelLoader('..._common.models.policyrulemanagementaccess_rules_v_2_54', 'PolicyrulemanagementaccessRules'), + 'PolicyrulenetworkaccesspatchRules': __LazyModelLoader('..._common.models.policyrulenetworkaccesspatch_rules_v_2_52', 'PolicyrulenetworkaccesspatchRules'), + 'PolicyrulenetworkaccesspostRules': __LazyModelLoader('..._common.models.policyrulenetworkaccesspost_rules_v_2_52', 'PolicyrulenetworkaccesspostRules'), + 'PolicyrulenfsclientpatchRules': __LazyModelLoader('..._common.models.policyrulenfsclientpatch_rules_v_2_51', 'PolicyrulenfsclientpatchRules'), + 'PolicyrulenfsclientpostRules': __LazyModelLoader('..._common.models.policyrulenfsclientpost_rules_v_2_29', 'PolicyrulenfsclientpostRules'), + 'PolicyrulequotapatchRules': __LazyModelLoader('..._common.models.policyrulequotapatch_rules_v_2_52', 'PolicyrulequotapatchRules'), + 'PolicyrulequotapostRules': __LazyModelLoader('..._common.models.policyrulequotapost_rules_v_2_21', 'PolicyrulequotapostRules'), + 'PolicyrulesmbclientpostRules': __LazyModelLoader('..._common.models.policyrulesmbclientpost_rules_v_2_3', 'PolicyrulesmbclientpostRules'), + 'PolicyrulesnapshotpatchRules': __LazyModelLoader('..._common.models.policyrulesnapshotpatch_rules_v_2_49', 'PolicyrulesnapshotpatchRules'), + 'PolicyrulesnapshotpostRules': __LazyModelLoader('..._common.models.policyrulesnapshotpost_rules_v_2_21', 'PolicyrulesnapshotpostRules'), + 'PolicyruleusergroupquotaSubject': __LazyModelLoader('..._common.models.policyruleusergroupquota_subject_v_2_44', 'PolicyruleusergroupquotaSubject'), + 'PolicyruleusergroupquotapatchRules': __LazyModelLoader('..._common.models.policyruleusergroupquotapatch_rules_v_2_52', 'PolicyruleusergroupquotapatchRules'), + 'PolicyruleusergroupquotapostRules': __LazyModelLoader('..._common.models.policyruleusergroupquotapost_rules_v_2_44', 'PolicyruleusergroupquotapostRules'), + 'Port': __LazyModelLoader('..._common.models.port_v_2_50', 'Port'), + 'PortCommon': __LazyModelLoader('..._common.models.port_common_v_2_2', 'PortCommon'), + 'PortGetResponse': __LazyModelLoader('..._common.models.port_get_response_v_2_50', 'PortGetResponse'), + 'PortInitiator': __LazyModelLoader('..._common.models.port_initiator_v_2_50', 'PortInitiator'), + 'PortInitiatorEncryption': __LazyModelLoader('..._common.models.port_initiator_encryption_v_2_49', 'PortInitiatorEncryption'), + 'PortInitiatorTarget': __LazyModelLoader('..._common.models.port_initiator_target_v_2_38', 'PortInitiatorTarget'), + 'PortInitiatorsGetResponse': __LazyModelLoader('..._common.models.port_initiators_get_response_v_2_50', 'PortInitiatorsGetResponse'), + 'PresetWorkload': __LazyModelLoader('..._common.models.preset_workload_v_2_54', 'PresetWorkload'), + 'PresetWorkloadBase': __LazyModelLoader('..._common.models.preset_workload_base_v_2_54', 'PresetWorkloadBase'), + 'PresetWorkloadConstraints': __LazyModelLoader('..._common.models.preset_workload_constraints_v_2_54', 'PresetWorkloadConstraints'), + 'PresetWorkloadConstraintsBoolean': __LazyModelLoader('..._common.models.preset_workload_constraints_boolean_v_2_40', 'PresetWorkloadConstraintsBoolean'), + 'PresetWorkloadConstraintsInteger': __LazyModelLoader('..._common.models.preset_workload_constraints_integer_v_2_40', 'PresetWorkloadConstraintsInteger'), + 'PresetWorkloadConstraintsResourceReference': __LazyModelLoader('..._common.models.preset_workload_constraints_resource_reference_v_2_54', 'PresetWorkloadConstraintsResourceReference'), + 'PresetWorkloadConstraintsResourceReferenceAllowedValues': __LazyModelLoader('..._common.models.preset_workload_constraints_resource_reference_allowed_values_v_2_51', 'PresetWorkloadConstraintsResourceReferenceAllowedValues'), + 'PresetWorkloadConstraintsString': __LazyModelLoader('..._common.models.preset_workload_constraints_string_v_2_40', 'PresetWorkloadConstraintsString'), + 'PresetWorkloadDirectoryConfiguration': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_v_2_51', 'PresetWorkloadDirectoryConfiguration'), + 'PresetWorkloadDirectoryConfigurationExportConfigurations': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_export_configurations_v_2_51', 'PresetWorkloadDirectoryConfigurationExportConfigurations'), + 'PresetWorkloadDirectoryConfigurationExports': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_exports_v_2_51', 'PresetWorkloadDirectoryConfigurationExports'), + 'PresetWorkloadDirectoryConfigurationMultiProtocol': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_multi_protocol_v_2_51', 'PresetWorkloadDirectoryConfigurationMultiProtocol'), + 'PresetWorkloadDirectoryConfigurationName': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_name_v_2_51', 'PresetWorkloadDirectoryConfigurationName'), + 'PresetWorkloadDirectoryConfigurationParent': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_parent_v_2_51', 'PresetWorkloadDirectoryConfigurationParent'), + 'PresetWorkloadDirectoryConfigurationPath': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_path_v_2_51', 'PresetWorkloadDirectoryConfigurationPath'), + 'PresetWorkloadDirectoryConfigurationSpecialDirectories': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_special_directories_v_2_51', 'PresetWorkloadDirectoryConfigurationSpecialDirectories'), + 'PresetWorkloadExportConfigurationNfs': __LazyModelLoader('..._common.models.preset_workload_export_configuration_nfs_v_2_51', 'PresetWorkloadExportConfigurationNfs'), + 'PresetWorkloadExportConfigurationNfsPolicy': __LazyModelLoader('..._common.models.preset_workload_export_configuration_nfs_policy_v_2_51', 'PresetWorkloadExportConfigurationNfsPolicy'), + 'PresetWorkloadExportConfigurationNfsRule': __LazyModelLoader('..._common.models.preset_workload_export_configuration_nfs_rule_v_2_51', 'PresetWorkloadExportConfigurationNfsRule'), + 'PresetWorkloadExportConfigurationSmb': __LazyModelLoader('..._common.models.preset_workload_export_configuration_smb_v_2_51', 'PresetWorkloadExportConfigurationSmb'), + 'PresetWorkloadExportConfigurationSmbPolicy': __LazyModelLoader('..._common.models.preset_workload_export_configuration_smb_policy_v_2_51', 'PresetWorkloadExportConfigurationSmbPolicy'), + 'PresetWorkloadExportConfigurationSmbRule': __LazyModelLoader('..._common.models.preset_workload_export_configuration_smb_rule_v_2_51', 'PresetWorkloadExportConfigurationSmbRule'), + 'PresetWorkloadExportConfigurationSmbShare': __LazyModelLoader('..._common.models.preset_workload_export_configuration_smb_share_v_2_51', 'PresetWorkloadExportConfigurationSmbShare'), + 'PresetWorkloadExportConfigurationSmbSharePolicy': __LazyModelLoader('..._common.models.preset_workload_export_configuration_smb_share_policy_v_2_51', 'PresetWorkloadExportConfigurationSmbSharePolicy'), + 'PresetWorkloadExportConfigurationSmbShareRule': __LazyModelLoader('..._common.models.preset_workload_export_configuration_smb_share_rule_v_2_51', 'PresetWorkloadExportConfigurationSmbShareRule'), + 'PresetWorkloadExportConfigurations': __LazyModelLoader('..._common.models.preset_workload_export_configurations_v_2_51', 'PresetWorkloadExportConfigurations'), + 'PresetWorkloadGetResponse': __LazyModelLoader('..._common.models.preset_workload_get_response_v_2_54', 'PresetWorkloadGetResponse'), + 'PresetWorkloadMetadata': __LazyModelLoader('..._common.models.preset_workload_metadata_v_2_40', 'PresetWorkloadMetadata'), + 'PresetWorkloadParameter': __LazyModelLoader('..._common.models.preset_workload_parameter_v_2_54', 'PresetWorkloadParameter'), + 'PresetWorkloadPatch': __LazyModelLoader('..._common.models.preset_workload_patch_v_2_40', 'PresetWorkloadPatch'), + 'PresetWorkloadPeriodicReplicationConfiguration': __LazyModelLoader('..._common.models.preset_workload_periodic_replication_configuration_v_2_54', 'PresetWorkloadPeriodicReplicationConfiguration'), + 'PresetWorkloadPlacementConfiguration': __LazyModelLoader('..._common.models.preset_workload_placement_configuration_v_2_54', 'PresetWorkloadPlacementConfiguration'), + 'PresetWorkloadPolicyAction': __LazyModelLoader('..._common.models.preset_workload_policy_action_v_2_51', 'PresetWorkloadPolicyAction'), + 'PresetWorkloadPost': __LazyModelLoader('..._common.models.preset_workload_post_v_2_54', 'PresetWorkloadPost'), + 'PresetWorkloadQosConfiguration': __LazyModelLoader('..._common.models.preset_workload_qos_configuration_v_2_51', 'PresetWorkloadQosConfiguration'), + 'PresetWorkloadQuotaConfiguration': __LazyModelLoader('..._common.models.preset_workload_quota_configuration_v_2_51', 'PresetWorkloadQuotaConfiguration'), + 'PresetWorkloadQuotaRule': __LazyModelLoader('..._common.models.preset_workload_quota_rule_v_2_51', 'PresetWorkloadQuotaRule'), + 'PresetWorkloadResponse': __LazyModelLoader('..._common.models.preset_workload_response_v_2_54', 'PresetWorkloadResponse'), + 'PresetWorkloadSnapshotConfiguration': __LazyModelLoader('..._common.models.preset_workload_snapshot_configuration_v_2_51', 'PresetWorkloadSnapshotConfiguration'), + 'PresetWorkloadSnapshotRule': __LazyModelLoader('..._common.models.preset_workload_snapshot_rule_v_2_51', 'PresetWorkloadSnapshotRule'), + 'PresetWorkloadVolumeConfiguration': __LazyModelLoader('..._common.models.preset_workload_volume_configuration_v_2_51', 'PresetWorkloadVolumeConfiguration'), + 'PresetWorkloadWorkloadTag': __LazyModelLoader('..._common.models.preset_workload_workload_tag_v_2_40', 'PresetWorkloadWorkloadTag'), + 'PriorityAdjustment': __LazyModelLoader('..._common.models.priority_adjustment_v_2_10', 'PriorityAdjustment'), + 'ProtectionGroup': __LazyModelLoader('..._common.models.protection_group_v_2_51', 'ProtectionGroup'), + 'ProtectionGroupEradicationConfig': __LazyModelLoader('..._common.models.protection_group_eradication_config_v_2_13', 'ProtectionGroupEradicationConfig'), + 'ProtectionGroupGetResponse': __LazyModelLoader('..._common.models.protection_group_get_response_v_2_51', 'ProtectionGroupGetResponse'), + 'ProtectionGroupPerformance': __LazyModelLoader('..._common.models.protection_group_performance_v_2_50', 'ProtectionGroupPerformance'), + 'ProtectionGroupPerformanceArray': __LazyModelLoader('..._common.models.protection_group_performance_array_v_2_50', 'ProtectionGroupPerformanceArray'), + 'ProtectionGroupPerformanceArrayResponse': __LazyModelLoader('..._common.models.protection_group_performance_array_response_v_2_50', 'ProtectionGroupPerformanceArrayResponse'), + 'ProtectionGroupPerformanceResponse': __LazyModelLoader('..._common.models.protection_group_performance_response_v_2_50', 'ProtectionGroupPerformanceResponse'), + 'ProtectionGroupPost': __LazyModelLoader('..._common.models.protection_group_post_v_2_50', 'ProtectionGroupPost'), + 'ProtectionGroupResponse': __LazyModelLoader('..._common.models.protection_group_response_v_2_51', 'ProtectionGroupResponse'), + 'ProtectionGroupSnapshot': __LazyModelLoader('..._common.models.protection_group_snapshot_v_2_50', 'ProtectionGroupSnapshot'), + 'ProtectionGroupSnapshotGetResponse': __LazyModelLoader('..._common.models.protection_group_snapshot_get_response_v_2_50', 'ProtectionGroupSnapshotGetResponse'), + 'ProtectionGroupSnapshotPatch': __LazyModelLoader('..._common.models.protection_group_snapshot_patch_v_2_50', 'ProtectionGroupSnapshotPatch'), + 'ProtectionGroupSnapshotPost': __LazyModelLoader('..._common.models.protection_group_snapshot_post_v_2_50', 'ProtectionGroupSnapshotPost'), + 'ProtectionGroupSnapshotReplica': __LazyModelLoader('..._common.models.protection_group_snapshot_replica_v_2_50', 'ProtectionGroupSnapshotReplica'), + 'ProtectionGroupSnapshotReplicaResponse': __LazyModelLoader('..._common.models.protection_group_snapshot_replica_response_v_2_50', 'ProtectionGroupSnapshotReplicaResponse'), + 'ProtectionGroupSnapshotResponse': __LazyModelLoader('..._common.models.protection_group_snapshot_response_v_2_50', 'ProtectionGroupSnapshotResponse'), + 'ProtectionGroupSnapshotTransfer': __LazyModelLoader('..._common.models.protection_group_snapshot_transfer_v_2_50', 'ProtectionGroupSnapshotTransfer'), + 'ProtectionGroupSnapshotTransferGetResponse': __LazyModelLoader('..._common.models.protection_group_snapshot_transfer_get_response_v_2_50', 'ProtectionGroupSnapshotTransferGetResponse'), + 'ProtectionGroupSnapshotTransferResponse': __LazyModelLoader('..._common.models.protection_group_snapshot_transfer_response_v_2_50', 'ProtectionGroupSnapshotTransferResponse'), + 'ProtectionGroupTargetGetResponse': __LazyModelLoader('..._common.models.protection_group_target_get_response_v_2_54', 'ProtectionGroupTargetGetResponse'), + 'ProtectionGroupTargetResponse': __LazyModelLoader('..._common.models.protection_group_target_response_v_2_54', 'ProtectionGroupTargetResponse'), + 'ProtectionGroupsVolumes': __LazyModelLoader('..._common.models.protection_groups_volumes_v_2_50', 'ProtectionGroupsVolumes'), + 'ProtectionGroupsVolumesGetResponse': __LazyModelLoader('..._common.models.protection_groups_volumes_get_response_v_2_50', 'ProtectionGroupsVolumesGetResponse'), + 'ProtectionGroupsVolumesMember': __LazyModelLoader('..._common.models.protection_groups_volumes_member_v_2_49', 'ProtectionGroupsVolumesMember'), + 'ProtectionGroupsVolumesResponse': __LazyModelLoader('..._common.models.protection_groups_volumes_response_v_2_50', 'ProtectionGroupsVolumesResponse'), + 'ProtocolEndpoint': __LazyModelLoader('..._common.models.protocol_endpoint_v_2_33', 'ProtocolEndpoint'), + 'Qos': __LazyModelLoader('..._common.models.qos_v_2_0', 'Qos'), + 'QosBandwidthLimitPatch': __LazyModelLoader('..._common.models.qos_bandwidth_limit_patch_v_2_52', 'QosBandwidthLimitPatch'), + 'QosIopsLimitPatch': __LazyModelLoader('..._common.models.qos_iops_limit_patch_v_2_52', 'QosIopsLimitPatch'), + 'QosMetrics': __LazyModelLoader('..._common.models.qos_metrics_v_2_50', 'QosMetrics'), + 'QosMetricsCeilings': __LazyModelLoader('..._common.models.qos_metrics_ceilings_v_2_50', 'QosMetricsCeilings'), + 'QosMetricsFileCeilings': __LazyModelLoader('..._common.models.qos_metrics_file_ceilings_v_2_54', 'QosMetricsFileCeilings'), + 'QosPatch': __LazyModelLoader('..._common.models.qos_patch_v_2_52', 'QosPatch'), + 'QuotaLimitPatch': __LazyModelLoader('..._common.models.quota_limit_patch_v_2_52', 'QuotaLimitPatch'), + 'Realm': __LazyModelLoader('..._common.models.realm_v_2_55', 'Realm'), + 'RealmArrayStatus': __LazyModelLoader('..._common.models.realm_array_status_v_2_55', 'RealmArrayStatus'), + 'RealmConnection': __LazyModelLoader('..._common.models.realm_connection_v_2_54', 'RealmConnection'), + 'RealmConnectionKey': __LazyModelLoader('..._common.models.realm_connection_key_v_2_54', 'RealmConnectionKey'), + 'RealmConnectionKeyGetResponse': __LazyModelLoader('..._common.models.realm_connection_key_get_response_v_2_54', 'RealmConnectionKeyGetResponse'), + 'RealmConnectionKeyPost': __LazyModelLoader('..._common.models.realm_connection_key_post_v_2_50', 'RealmConnectionKeyPost'), + 'RealmConnectionKeyPostResponse': __LazyModelLoader('..._common.models.realm_connection_key_post_response_v_2_54', 'RealmConnectionKeyPostResponse'), + 'RealmConnectionKeyResponse': __LazyModelLoader('..._common.models.realm_connection_key_response_v_2_54', 'RealmConnectionKeyResponse'), + 'RealmConnectionWithKey': __LazyModelLoader('..._common.models.realm_connection_with_key_v_2_54', 'RealmConnectionWithKey'), + 'RealmConnectionsGetResponse': __LazyModelLoader('..._common.models.realm_connections_get_response_v_2_54', 'RealmConnectionsGetResponse'), + 'RealmConnectionsResponse': __LazyModelLoader('..._common.models.realm_connections_response_v_2_54', 'RealmConnectionsResponse'), + 'RealmGetResponse': __LazyModelLoader('..._common.models.realm_get_response_v_2_55', 'RealmGetResponse'), + 'RealmMember': __LazyModelLoader('..._common.models.realm_member_v_2_55', 'RealmMember'), + 'RealmMemberGetResponse': __LazyModelLoader('..._common.models.realm_member_get_response_v_2_55', 'RealmMemberGetResponse'), + 'RealmMemberResponse': __LazyModelLoader('..._common.models.realm_member_response_v_2_55', 'RealmMemberResponse'), + 'RealmPatch': __LazyModelLoader('..._common.models.realm_patch_v_2_55', 'RealmPatch'), + 'RealmPost': __LazyModelLoader('..._common.models.realm_post_v_2_55', 'RealmPost'), + 'RealmQosGetResponse': __LazyModelLoader('..._common.models.realm_qos_get_response_v_2_50', 'RealmQosGetResponse'), + 'RealmRemoteArrayStatus': __LazyModelLoader('..._common.models.realm_remote_array_status_v_2_55', 'RealmRemoteArrayStatus'), + 'RealmResponse': __LazyModelLoader('..._common.models.realm_response_v_2_55', 'RealmResponse'), + 'RealmSpaceGetResponse': __LazyModelLoader('..._common.models.realm_space_get_response_v_2_50', 'RealmSpaceGetResponse'), + 'RealmsReference': __LazyModelLoader('..._common.models.realms_reference_v_2_52', 'RealmsReference'), + 'Reference': __LazyModelLoader('..._common.models.reference_v_2_49', 'Reference'), + 'ReferenceNoId': __LazyModelLoader('..._common.models.reference_no_id_v_2_0', 'ReferenceNoId'), + 'ReferenceNoIdWithType': __LazyModelLoader('..._common.models.reference_no_id_with_type_v_2_55', 'ReferenceNoIdWithType'), + 'ReferenceWithFixedType': __LazyModelLoader('..._common.models.reference_with_fixed_type_v_2_55', 'ReferenceWithFixedType'), + 'ReferenceWithType': __LazyModelLoader('..._common.models.reference_with_type_v_2_54', 'ReferenceWithType'), + 'ReferenceWithoutTypeWithIsLocal': __LazyModelLoader('..._common.models.reference_without_type_with_is_local_v_2_49', 'ReferenceWithoutTypeWithIsLocal'), + 'RemoteArray': __LazyModelLoader('..._common.models.remote_array_v_2_54', 'RemoteArray'), + 'RemoteArrayFleet': __LazyModelLoader('..._common.models.remote_array_fleet_v_2_49', 'RemoteArrayFleet'), + 'RemoteArrayResponse': __LazyModelLoader('..._common.models.remote_array_response_v_2_54', 'RemoteArrayResponse'), + 'RemoteArraysResponse': __LazyModelLoader('..._common.models.remote_arrays_response_v_2_54', 'RemoteArraysResponse'), + 'RemotePod': __LazyModelLoader('..._common.models.remote_pod_v_2_54', 'RemotePod'), + 'RemotePodTagGetResponse': __LazyModelLoader('..._common.models.remote_pod_tag_get_response_v_2_50', 'RemotePodTagGetResponse'), + 'RemotePodsResponse': __LazyModelLoader('..._common.models.remote_pods_response_v_2_54', 'RemotePodsResponse'), + 'RemoteProtectionGroup': __LazyModelLoader('..._common.models.remote_protection_group_v_2_50', 'RemoteProtectionGroup'), + 'RemoteProtectionGroupGetResponse': __LazyModelLoader('..._common.models.remote_protection_group_get_response_v_2_50', 'RemoteProtectionGroupGetResponse'), + 'RemoteProtectionGroupResponse': __LazyModelLoader('..._common.models.remote_protection_group_response_v_2_50', 'RemoteProtectionGroupResponse'), + 'RemoteProtectionGroupSnapshot': __LazyModelLoader('..._common.models.remote_protection_group_snapshot_v_2_50', 'RemoteProtectionGroupSnapshot'), + 'RemoteProtectionGroupSnapshotGetResponse': __LazyModelLoader('..._common.models.remote_protection_group_snapshot_get_response_v_2_50', 'RemoteProtectionGroupSnapshotGetResponse'), + 'RemoteProtectionGroupSnapshotPost': __LazyModelLoader('..._common.models.remote_protection_group_snapshot_post_v_2_50', 'RemoteProtectionGroupSnapshotPost'), + 'RemoteProtectionGroupSnapshotResponse': __LazyModelLoader('..._common.models.remote_protection_group_snapshot_response_v_2_50', 'RemoteProtectionGroupSnapshotResponse'), + 'RemoteProtectionGroupSnapshotTransfer': __LazyModelLoader('..._common.models.remote_protection_group_snapshot_transfer_v_2_50', 'RemoteProtectionGroupSnapshotTransfer'), + 'RemoteProtectionGroupSnapshotTransferGetResponse': __LazyModelLoader('..._common.models.remote_protection_group_snapshot_transfer_get_response_v_2_50', 'RemoteProtectionGroupSnapshotTransferGetResponse'), + 'RemoteProtectionGroupSnapshotTransferResponse': __LazyModelLoader('..._common.models.remote_protection_group_snapshot_transfer_response_v_2_50', 'RemoteProtectionGroupSnapshotTransferResponse'), + 'RemoteRealm': __LazyModelLoader('..._common.models.remote_realm_v_2_55', 'RemoteRealm'), + 'RemoteRealmTagGetResponse': __LazyModelLoader('..._common.models.remote_realm_tag_get_response_v_2_50', 'RemoteRealmTagGetResponse'), + 'RemoteRealmsResponse': __LazyModelLoader('..._common.models.remote_realms_response_v_2_55', 'RemoteRealmsResponse'), + 'RemoteVolumeSnapshot': __LazyModelLoader('..._common.models.remote_volume_snapshot_v_2_50', 'RemoteVolumeSnapshot'), + 'RemoteVolumeSnapshotGetResponse': __LazyModelLoader('..._common.models.remote_volume_snapshot_get_response_v_2_50', 'RemoteVolumeSnapshotGetResponse'), + 'RemoteVolumeSnapshotPost': __LazyModelLoader('..._common.models.remote_volume_snapshot_post_v_2_28', 'RemoteVolumeSnapshotPost'), + 'RemoteVolumeSnapshotResponse': __LazyModelLoader('..._common.models.remote_volume_snapshot_response_v_2_50', 'RemoteVolumeSnapshotResponse'), + 'RemoteVolumeSnapshotTransfer': __LazyModelLoader('..._common.models.remote_volume_snapshot_transfer_v_2_50', 'RemoteVolumeSnapshotTransfer'), + 'RemoteVolumeSnapshotTransferGetResponse': __LazyModelLoader('..._common.models.remote_volume_snapshot_transfer_get_response_v_2_50', 'RemoteVolumeSnapshotTransferGetResponse'), + 'RemoteVolumeSnapshotTransferResponse': __LazyModelLoader('..._common.models.remote_volume_snapshot_transfer_response_v_2_50', 'RemoteVolumeSnapshotTransferResponse'), + 'ReplicaLinkLag': __LazyModelLoader('..._common.models.replica_link_lag_v_2_2', 'ReplicaLinkLag'), + 'ReplicaLinkPerformanceReplication': __LazyModelLoader('..._common.models.replica_link_performance_replication_v_2_52', 'ReplicaLinkPerformanceReplication'), + 'ReplicaLinkPerformanceReplicationArray': __LazyModelLoader('..._common.models.replica_link_performance_replication_array_v_2_54', 'ReplicaLinkPerformanceReplicationArray'), + 'ReplicaLinkPerformanceReplicationBase': __LazyModelLoader('..._common.models.replica_link_performance_replication_base_v_2_52', 'ReplicaLinkPerformanceReplicationBase'), + 'ReplicationPerformanceWithTotal': __LazyModelLoader('..._common.models.replication_performance_with_total_v_2_2', 'ReplicationPerformanceWithTotal'), + 'ReplicationSchedule': __LazyModelLoader('..._common.models.replication_schedule_v_2_1', 'ReplicationSchedule'), + 'Resource': __LazyModelLoader('..._common.models.resource_v_2_49', 'Resource'), + 'ResourceAccess': __LazyModelLoader('..._common.models.resource_access_v_2_54', 'ResourceAccess'), + 'ResourceAccessStatus': __LazyModelLoader('..._common.models.resource_access_status_v_2_54', 'ResourceAccessStatus'), + 'ResourceAccessStatusCreatedBy': __LazyModelLoader('..._common.models.resource_access_status_created_by_v_2_40', 'ResourceAccessStatusCreatedBy'), + 'ResourceAccessesGetResponse': __LazyModelLoader('..._common.models.resource_accesses_get_response_v_2_54', 'ResourceAccessesGetResponse'), + 'ResourceAccessesResponse': __LazyModelLoader('..._common.models.resource_accesses_response_v_2_54', 'ResourceAccessesResponse'), + 'ResourceAccessesStatusGetResponse': __LazyModelLoader('..._common.models.resource_accesses_status_get_response_v_2_54', 'ResourceAccessesStatusGetResponse'), + 'ResourceAccessesStatusResponse': __LazyModelLoader('..._common.models.resource_accesses_status_response_v_2_54', 'ResourceAccessesStatusResponse'), + 'ResourceBucketSpace': __LazyModelLoader('..._common.models.resource_bucket_space_v_2_52', 'ResourceBucketSpace'), + 'ResourceBucketSpaceGetResponse': __LazyModelLoader('..._common.models.resource_bucket_space_get_response_v_2_52', 'ResourceBucketSpaceGetResponse'), + 'ResourceDirectorySpace': __LazyModelLoader('..._common.models.resource_directory_space_v_2_50', 'ResourceDirectorySpace'), + 'ResourceDirectorySpaceGetResponse': __LazyModelLoader('..._common.models.resource_directory_space_get_response_v_2_50', 'ResourceDirectorySpaceGetResponse'), + 'ResourceFixedNonUniqueName': __LazyModelLoader('..._common.models.resource_fixed_non_unique_name_v_2_2', 'ResourceFixedNonUniqueName'), + 'ResourceNoId': __LazyModelLoader('..._common.models.resource_no_id_v_2_0', 'ResourceNoId'), + 'ResourceObjectStoreAccountSpace': __LazyModelLoader('..._common.models.resource_object_store_account_space_v_2_52', 'ResourceObjectStoreAccountSpace'), + 'ResourceObjectStoreAccountSpaceGetResponse': __LazyModelLoader('..._common.models.resource_object_store_account_space_get_response_v_2_52', 'ResourceObjectStoreAccountSpaceGetResponse'), + 'ResourcePerformance': __LazyModelLoader('..._common.models.resource_performance_v_2_52', 'ResourcePerformance'), + 'ResourcePerformanceByArray': __LazyModelLoader('..._common.models.resource_performance_by_array_v_2_52', 'ResourcePerformanceByArray'), + 'ResourcePerformanceByArrayGetResponse': __LazyModelLoader('..._common.models.resource_performance_by_array_get_response_v_2_52', 'ResourcePerformanceByArrayGetResponse'), + 'ResourcePerformanceGetResponse': __LazyModelLoader('..._common.models.resource_performance_get_response_v_2_52', 'ResourcePerformanceGetResponse'), + 'ResourcePerformanceNoId': __LazyModelLoader('..._common.models.resource_performance_no_id_v_2_52', 'ResourcePerformanceNoId'), + 'ResourcePerformanceNoIdByArray': __LazyModelLoader('..._common.models.resource_performance_no_id_by_array_v_2_52', 'ResourcePerformanceNoIdByArray'), + 'ResourcePerformanceNoIdByArrayGetResponse': __LazyModelLoader('..._common.models.resource_performance_no_id_by_array_get_response_v_2_52', 'ResourcePerformanceNoIdByArrayGetResponse'), + 'ResourcePerformanceNoIdGetResponse': __LazyModelLoader('..._common.models.resource_performance_no_id_get_response_v_2_52', 'ResourcePerformanceNoIdGetResponse'), + 'ResourcePodSpace': __LazyModelLoader('..._common.models.resource_pod_space_v_2_50', 'ResourcePodSpace'), + 'ResourcePodSpaceGetResponse': __LazyModelLoader('..._common.models.resource_pod_space_get_response_v_2_50', 'ResourcePodSpaceGetResponse'), + 'ResourceRealmSpace': __LazyModelLoader('..._common.models.resource_realm_space_v_2_50', 'ResourceRealmSpace'), + 'ResourceSpace': __LazyModelLoader('..._common.models.resource_space_v_2_50', 'ResourceSpace'), + 'ResourceSpaceGetResponse': __LazyModelLoader('..._common.models.resource_space_get_response_v_2_50', 'ResourceSpaceGetResponse'), + 'ResourceSpaceNoId': __LazyModelLoader('..._common.models.resource_space_no_id_v_2_50', 'ResourceSpaceNoId'), + 'ResourceSpaceNoIdGetResponse': __LazyModelLoader('..._common.models.resource_space_no_id_get_response_v_2_50', 'ResourceSpaceNoIdGetResponse'), + 'RetentionPolicy': __LazyModelLoader('..._common.models.retention_policy_v_2_47', 'RetentionPolicy'), + 'Saml2Sso': __LazyModelLoader('..._common.models.saml2_sso_v_2_52', 'Saml2Sso'), + 'Saml2SsoGetResponse': __LazyModelLoader('..._common.models.saml2_sso_get_response_v_2_52', 'Saml2SsoGetResponse'), + 'Saml2SsoIdp': __LazyModelLoader('..._common.models.saml2_sso_idp_v_2_11', 'Saml2SsoIdp'), + 'Saml2SsoManagement': __LazyModelLoader('..._common.models.saml2_sso_management_v_2_52', 'Saml2SsoManagement'), + 'Saml2SsoPatch': __LazyModelLoader('..._common.models.saml2_sso_patch_v_2_52', 'Saml2SsoPatch'), + 'Saml2SsoPost': __LazyModelLoader('..._common.models.saml2_sso_post_v_2_52', 'Saml2SsoPost'), + 'Saml2SsoResponse': __LazyModelLoader('..._common.models.saml2_sso_response_v_2_52', 'Saml2SsoResponse'), + 'Saml2SsoSp': __LazyModelLoader('..._common.models.saml2_sso_sp_v_2_52', 'Saml2SsoSp'), + 'Saml2SsoSpCredential': __LazyModelLoader('..._common.models.saml2_sso_sp_credential_v_2_52', 'Saml2SsoSpCredential'), + 'Server': __LazyModelLoader('..._common.models.server_v_2_55', 'Server'), + 'ServerGetResponse': __LazyModelLoader('..._common.models.server_get_response_v_2_55', 'ServerGetResponse'), + 'ServerPatch': __LazyModelLoader('..._common.models.server_patch_v_2_49', 'ServerPatch'), + 'ServerPost': __LazyModelLoader('..._common.models.server_post_v_2_49', 'ServerPost'), + 'ServerReference': __LazyModelLoader('..._common.models.server_reference_v_2_50', 'ServerReference'), + 'ServerResponse': __LazyModelLoader('..._common.models.server_response_v_2_55', 'ServerResponse'), + 'Session': __LazyModelLoader('..._common.models.session_v_2_4', 'Session'), + 'SessionGetResponse': __LazyModelLoader('..._common.models.session_get_response_v_2_4', 'SessionGetResponse'), + 'Smis': __LazyModelLoader('..._common.models.smis_v_2_2', 'Smis'), + 'SmisGetResponse': __LazyModelLoader('..._common.models.smis_get_response_v_2_2', 'SmisGetResponse'), + 'SmisResponse': __LazyModelLoader('..._common.models.smis_response_v_2_2', 'SmisResponse'), + 'SmtpServer': __LazyModelLoader('..._common.models.smtp_server_v_2_33', 'SmtpServer'), + 'SmtpServerGetResponse': __LazyModelLoader('..._common.models.smtp_server_get_response_v_2_33', 'SmtpServerGetResponse'), + 'SmtpServerResponse': __LazyModelLoader('..._common.models.smtp_server_response_v_2_33', 'SmtpServerResponse'), + 'Snapshot': __LazyModelLoader('..._common.models.snapshot_v_2_49', 'Snapshot'), + 'SnapshotSchedule': __LazyModelLoader('..._common.models.snapshot_schedule_v_2_1', 'SnapshotSchedule'), + 'SnapshotSpace': __LazyModelLoader('..._common.models.snapshot_space_v_2_50', 'SnapshotSpace'), + 'SnmpAgent': __LazyModelLoader('..._common.models.snmp_agent_v_2_4', 'SnmpAgent'), + 'SnmpAgentGetResponse': __LazyModelLoader('..._common.models.snmp_agent_get_response_v_2_4', 'SnmpAgentGetResponse'), + 'SnmpAgentMib': __LazyModelLoader('..._common.models.snmp_agent_mib_v_2_4', 'SnmpAgentMib'), + 'SnmpAgentMibGetResponse': __LazyModelLoader('..._common.models.snmp_agent_mib_get_response_v_2_4', 'SnmpAgentMibGetResponse'), + 'SnmpAgentMibResponse': __LazyModelLoader('..._common.models.snmp_agent_mib_response_v_2_4', 'SnmpAgentMibResponse'), + 'SnmpAgentPatch': __LazyModelLoader('..._common.models.snmp_agent_patch_v_2_4', 'SnmpAgentPatch'), + 'SnmpAgentResponse': __LazyModelLoader('..._common.models.snmp_agent_response_v_2_4', 'SnmpAgentResponse'), + 'SnmpManager': __LazyModelLoader('..._common.models.snmp_manager_v_2_4', 'SnmpManager'), + 'SnmpManagerGetResponse': __LazyModelLoader('..._common.models.snmp_manager_get_response_v_2_4', 'SnmpManagerGetResponse'), + 'SnmpManagerPatch': __LazyModelLoader('..._common.models.snmp_manager_patch_v_2_4', 'SnmpManagerPatch'), + 'SnmpManagerPost': __LazyModelLoader('..._common.models.snmp_manager_post_v_2_4', 'SnmpManagerPost'), + 'SnmpManagerResponse': __LazyModelLoader('..._common.models.snmp_manager_response_v_2_4', 'SnmpManagerResponse'), + 'SnmpV2c': __LazyModelLoader('..._common.models.snmp_v2c_v_2_4', 'SnmpV2c'), + 'SnmpV3': __LazyModelLoader('..._common.models.snmp_v3_v_2_4', 'SnmpV3'), + 'SnmpV3Patch': __LazyModelLoader('..._common.models.snmp_v3_patch_v_2_4', 'SnmpV3Patch'), + 'SnmpV3Post': __LazyModelLoader('..._common.models.snmp_v3_post_v_2_4', 'SnmpV3Post'), + 'Software': __LazyModelLoader('..._common.models.software_v_2_9', 'Software'), + 'SoftwareBundle': __LazyModelLoader('..._common.models.software_bundle_v_2_51', 'SoftwareBundle'), + 'SoftwareBundleGetResponse': __LazyModelLoader('..._common.models.software_bundle_get_response_v_2_51', 'SoftwareBundleGetResponse'), + 'SoftwareBundlePost': __LazyModelLoader('..._common.models.software_bundle_post_v_2_5', 'SoftwareBundlePost'), + 'SoftwareBundleResponse': __LazyModelLoader('..._common.models.software_bundle_response_v_2_51', 'SoftwareBundleResponse'), + 'SoftwareCheck': __LazyModelLoader('..._common.models.software_check_v_2_9', 'SoftwareCheck'), + 'SoftwareChecksChecks': __LazyModelLoader('..._common.models.software_checks_checks_v_2_9', 'SoftwareChecksChecks'), + 'SoftwareChecksGetResponse': __LazyModelLoader('..._common.models.software_checks_get_response_v_2_9', 'SoftwareChecksGetResponse'), + 'SoftwareChecksResponse': __LazyModelLoader('..._common.models.software_checks_response_v_2_9', 'SoftwareChecksResponse'), + 'SoftwareGetResponse': __LazyModelLoader('..._common.models.software_get_response_v_2_9', 'SoftwareGetResponse'), + 'SoftwareInstallation': __LazyModelLoader('..._common.models.software_installation_v_2_49', 'SoftwareInstallation'), + 'SoftwareInstallationPatch': __LazyModelLoader('..._common.models.software_installation_patch_v_2_4', 'SoftwareInstallationPatch'), + 'SoftwareInstallationPost': __LazyModelLoader('..._common.models.software_installation_post_v_2_37', 'SoftwareInstallationPost'), + 'SoftwareInstallationStep': __LazyModelLoader('..._common.models.software_installation_step_v_2_49', 'SoftwareInstallationStep'), + 'SoftwareInstallationStepsChecks': __LazyModelLoader('..._common.models.software_installation_steps_checks_v_2_2', 'SoftwareInstallationStepsChecks'), + 'SoftwareInstallationStepsGetResponse': __LazyModelLoader('..._common.models.software_installation_steps_get_response_v_2_49', 'SoftwareInstallationStepsGetResponse'), + 'SoftwareInstallationStepsResponse': __LazyModelLoader('..._common.models.software_installation_steps_response_v_2_49', 'SoftwareInstallationStepsResponse'), + 'SoftwareInstallationsGetResponse': __LazyModelLoader('..._common.models.software_installations_get_response_v_2_49', 'SoftwareInstallationsGetResponse'), + 'SoftwareInstallationsResponse': __LazyModelLoader('..._common.models.software_installations_response_v_2_49', 'SoftwareInstallationsResponse'), + 'SoftwarePatch': __LazyModelLoader('..._common.models.software_patch_v_2_29', 'SoftwarePatch'), + 'SoftwarePatchesGetResponse': __LazyModelLoader('..._common.models.software_patches_get_response_v_2_29', 'SoftwarePatchesGetResponse'), + 'SoftwarePatchesResponse': __LazyModelLoader('..._common.models.software_patches_response_v_2_29', 'SoftwarePatchesResponse'), + 'SoftwarePost': __LazyModelLoader('..._common.models.software_post_v_2_9', 'SoftwarePost'), + 'SoftwareResponse': __LazyModelLoader('..._common.models.software_response_v_2_9', 'SoftwareResponse'), + 'SoftwareUpgradePlan': __LazyModelLoader('..._common.models.software_upgrade_plan_v_2_4', 'SoftwareUpgradePlan'), + 'SoftwareVersion': __LazyModelLoader('..._common.models.software_version_v_2_9', 'SoftwareVersion'), + 'SoftwareVersionsGetResponse': __LazyModelLoader('..._common.models.software_versions_get_response_v_2_9', 'SoftwareVersionsGetResponse'), + 'SoftwareVersionsResponse': __LazyModelLoader('..._common.models.software_versions_response_v_2_9', 'SoftwareVersionsResponse'), + 'Space': __LazyModelLoader('..._common.models.space_v_2_50', 'Space'), + 'SpaceNoDeprecatedPhysicalOrEffective': __LazyModelLoader('..._common.models.space_no_deprecated_physical_or_effective_v_2_50', 'SpaceNoDeprecatedPhysicalOrEffective'), + 'StartEndTime': __LazyModelLoader('..._common.models.start_end_time_v_2_2', 'StartEndTime'), + 'StretchedTagPod': __LazyModelLoader('..._common.models.stretched_tag_pod_v_2_50', 'StretchedTagPod'), + 'StretchedTagRealm': __LazyModelLoader('..._common.models.stretched_tag_realm_v_2_50', 'StretchedTagRealm'), + 'StretchedTagRemoteArrayStatus': __LazyModelLoader('..._common.models.stretched_tag_remote_array_status_v_2_50', 'StretchedTagRemoteArrayStatus'), + 'Subnet': __LazyModelLoader('..._common.models.subnet_v_2_55', 'Subnet'), + 'SubnetGetResponse': __LazyModelLoader('..._common.models.subnet_get_response_v_2_55', 'SubnetGetResponse'), + 'SubnetPatch': __LazyModelLoader('..._common.models.subnet_patch_v_2_2', 'SubnetPatch'), + 'SubnetPost': __LazyModelLoader('..._common.models.subnet_post_v_2_2', 'SubnetPost'), + 'SubnetResponse': __LazyModelLoader('..._common.models.subnet_response_v_2_55', 'SubnetResponse'), + 'Subscription': __LazyModelLoader('..._common.models.subscription_v_2_26', 'Subscription'), + 'SubscriptionAsset': __LazyModelLoader('..._common.models.subscription_asset_v_2_49', 'SubscriptionAsset'), + 'SubscriptionAssetGetResponse': __LazyModelLoader('..._common.models.subscription_asset_get_response_v_2_49', 'SubscriptionAssetGetResponse'), + 'SubscriptionAssetResponse': __LazyModelLoader('..._common.models.subscription_asset_response_v_2_49', 'SubscriptionAssetResponse'), + 'SubscriptionAssetSubscription': __LazyModelLoader('..._common.models.subscription_asset_subscription_v_2_26', 'SubscriptionAssetSubscription'), + 'SubscriptionGetResponse': __LazyModelLoader('..._common.models.subscription_get_response_v_2_26', 'SubscriptionGetResponse'), + 'SubscriptionResponse': __LazyModelLoader('..._common.models.subscription_response_v_2_26', 'SubscriptionResponse'), + 'Support': __LazyModelLoader('..._common.models.support_v_2_47', 'Support'), + 'SupportDiagnosticsDetails': __LazyModelLoader('..._common.models.support_diagnostics_details_v_2_41', 'SupportDiagnosticsDetails'), + 'SupportDiagnosticsDetailsGetResponse': __LazyModelLoader('..._common.models.support_diagnostics_details_get_response_v_2_41', 'SupportDiagnosticsDetailsGetResponse'), + 'SupportDiagnosticsDetailsResponse': __LazyModelLoader('..._common.models.support_diagnostics_details_response_v_2_41', 'SupportDiagnosticsDetailsResponse'), + 'SupportDiagnosticsGetResponse': __LazyModelLoader('..._common.models.support_diagnostics_get_response_v_2_36', 'SupportDiagnosticsGetResponse'), + 'SupportDiagnosticsResponse': __LazyModelLoader('..._common.models.support_diagnostics_response_v_2_36', 'SupportDiagnosticsResponse'), + 'SupportDiagnosticsSettings': __LazyModelLoader('..._common.models.support_diagnostics_settings_v_2_36', 'SupportDiagnosticsSettings'), + 'SupportGetResponse': __LazyModelLoader('..._common.models.support_get_response_v_2_47', 'SupportGetResponse'), + 'SupportPatch': __LazyModelLoader('..._common.models.support_patch_v_2_47', 'SupportPatch'), + 'SupportRemoteAssistPaths': __LazyModelLoader('..._common.models.support_remote_assist_paths_v_2_2', 'SupportRemoteAssistPaths'), + 'SupportRemoteAssistSessions': __LazyModelLoader('..._common.models.support_remote_assist_sessions_v_2_41', 'SupportRemoteAssistSessions'), + 'SupportRemoteAssistSessionsGetResponse': __LazyModelLoader('..._common.models.support_remote_assist_sessions_get_response_v_2_41', 'SupportRemoteAssistSessionsGetResponse'), + 'SupportRemoteAssistSessionsPatch': __LazyModelLoader('..._common.models.support_remote_assist_sessions_patch_v_2_41', 'SupportRemoteAssistSessionsPatch'), + 'SupportRemoteAssistSessionsPaths': __LazyModelLoader('..._common.models.support_remote_assist_sessions_paths_v_2_41', 'SupportRemoteAssistSessionsPaths'), + 'SupportRemoteAssistSessionsResponse': __LazyModelLoader('..._common.models.support_remote_assist_sessions_response_v_2_41', 'SupportRemoteAssistSessionsResponse'), + 'SupportRemoteAssistSessionsSettings': __LazyModelLoader('..._common.models.support_remote_assist_sessions_settings_v_2_41', 'SupportRemoteAssistSessionsSettings'), + 'SupportRemoteAssistSessionsSettingsGetResponse': __LazyModelLoader('..._common.models.support_remote_assist_sessions_settings_get_response_v_2_41', 'SupportRemoteAssistSessionsSettingsGetResponse'), + 'SupportRemoteAssistSessionsSettingsResponse': __LazyModelLoader('..._common.models.support_remote_assist_sessions_settings_response_v_2_41', 'SupportRemoteAssistSessionsSettingsResponse'), + 'SupportResponse': __LazyModelLoader('..._common.models.support_response_v_2_47', 'SupportResponse'), + 'SupportSystemManifest': __LazyModelLoader('..._common.models.support_system_manifest_v_2_51', 'SupportSystemManifest'), + 'SupportSystemManifestResponse': __LazyModelLoader('..._common.models.support_system_manifest_response_v_2_51', 'SupportSystemManifestResponse'), + 'SyslogServer': __LazyModelLoader('..._common.models.syslog_server_v_2_50', 'SyslogServer'), + 'SyslogServerGetResponse': __LazyModelLoader('..._common.models.syslog_server_get_response_v_2_50', 'SyslogServerGetResponse'), + 'SyslogServerResponse': __LazyModelLoader('..._common.models.syslog_server_response_v_2_50', 'SyslogServerResponse'), + 'SyslogServerSettings': __LazyModelLoader('..._common.models.syslog_server_settings_v_2_50', 'SyslogServerSettings'), + 'SyslogServerSettingsGetResponse': __LazyModelLoader('..._common.models.syslog_server_settings_get_response_v_2_50', 'SyslogServerSettingsGetResponse'), + 'SyslogServerSettingsResponse': __LazyModelLoader('..._common.models.syslog_server_settings_response_v_2_50', 'SyslogServerSettingsResponse'), + 'Tag': __LazyModelLoader('..._common.models.tag_v_2_50', 'Tag'), + 'TagBatch': __LazyModelLoader('..._common.models.tag_batch_v_2_49', 'TagBatch'), + 'TagGetResponse': __LazyModelLoader('..._common.models.tag_get_response_v_2_50', 'TagGetResponse'), + 'TagResponse': __LazyModelLoader('..._common.models.tag_response_v_2_50', 'TagResponse'), + 'TargetProtectionGroup': __LazyModelLoader('..._common.models.target_protection_group_v_2_54', 'TargetProtectionGroup'), + 'TargetProtectionGroupPostPatch': __LazyModelLoader('..._common.models.target_protection_group_post_patch_v_2_49', 'TargetProtectionGroupPostPatch'), + 'TestGetResultWithResourceErrorContextMultiserverAwareResponse': __LazyModelLoader('..._common.models.test_get_result_with_resource_error_context_multiserver_aware_response_v_2_52', 'TestGetResultWithResourceErrorContextMultiserverAwareResponse'), + 'TestPatchResultWithResourceMultiserverAwareResponse': __LazyModelLoader('..._common.models.test_patch_result_with_resource_multiserver_aware_response_v_2_52', 'TestPatchResultWithResourceMultiserverAwareResponse'), + 'TestResult': __LazyModelLoader('..._common.models.test_result_v_2_2', 'TestResult'), + 'TestResultGetResponse': __LazyModelLoader('..._common.models.test_result_get_response_v_2_2', 'TestResultGetResponse'), + 'TestResultResponse': __LazyModelLoader('..._common.models.test_result_response_v_2_2', 'TestResultResponse'), + 'TestResultWithNoIdResourceMultiserverAware': __LazyModelLoader('..._common.models.test_result_with_no_id_resource_multiserver_aware_v_2_52', 'TestResultWithNoIdResourceMultiserverAware'), + 'TestResultWithResource': __LazyModelLoader('..._common.models.test_result_with_resource_v_2_50', 'TestResultWithResource'), + 'TestResultWithResourceAndErrorContextPartialResourceResponse': __LazyModelLoader('..._common.models.test_result_with_resource_and_error_context_partial_resource_response_v_2_52', 'TestResultWithResourceAndErrorContextPartialResourceResponse'), + 'TestResultWithResourceGetResponse': __LazyModelLoader('..._common.models.test_result_with_resource_get_response_v_2_50', 'TestResultWithResourceGetResponse'), + 'TestResultWithResourcePatchResponse': __LazyModelLoader('..._common.models.test_result_with_resource_patch_response_v_2_50', 'TestResultWithResourcePatchResponse'), + 'TestResultWithResourcePostResponse': __LazyModelLoader('..._common.models.test_result_with_resource_post_response_v_2_50', 'TestResultWithResourcePostResponse'), + 'TestResultWithResourceResponse': __LazyModelLoader('..._common.models.test_result_with_resource_response_v_2_50', 'TestResultWithResourceResponse'), + 'TestResultWithResourceWithId': __LazyModelLoader('..._common.models.test_result_with_resource_with_id_v_2_50', 'TestResultWithResourceWithId'), + 'TestResultWithResourceWithIdPostResponse': __LazyModelLoader('..._common.models.test_result_with_resource_with_id_post_response_v_2_50', 'TestResultWithResourceWithIdPostResponse'), + 'Tgroup': __LazyModelLoader('..._common.models.tgroup_v_2_54', 'Tgroup'), + 'TgroupGetResponse': __LazyModelLoader('..._common.models.tgroup_get_response_v_2_54', 'TgroupGetResponse'), + 'TgroupMember': __LazyModelLoader('..._common.models.tgroup_member_v_2_54', 'TgroupMember'), + 'TgroupMemberGetResponse': __LazyModelLoader('..._common.models.tgroup_member_get_response_v_2_54', 'TgroupMemberGetResponse'), + 'TgroupMemberResponse': __LazyModelLoader('..._common.models.tgroup_member_response_v_2_54', 'TgroupMemberResponse'), + 'TgroupMembersPost': __LazyModelLoader('..._common.models.tgroup_members_post_v_2_54', 'TgroupMembersPost'), + 'TgroupMembersPostMember': __LazyModelLoader('..._common.models.tgroup_members_post_member_v_2_54', 'TgroupMembersPostMember'), + 'TgroupPatch': __LazyModelLoader('..._common.models.tgroup_patch_v_2_54', 'TgroupPatch'), + 'TgroupResponse': __LazyModelLoader('..._common.models.tgroup_response_v_2_54', 'TgroupResponse'), + 'Throttle': __LazyModelLoader('..._common.models.throttle_v_2_4', 'Throttle'), + 'ThrottleDeprecated': __LazyModelLoader('..._common.models.throttle_deprecated_v_2_33', 'ThrottleDeprecated'), + 'TimeWindow': __LazyModelLoader('..._common.models.time_window_v_2_1', 'TimeWindow'), + 'TotalItemCountResponse': __LazyModelLoader('..._common.models.total_item_count_response_v_2_4', 'TotalItemCountResponse'), + 'Transfer': __LazyModelLoader('..._common.models.transfer_v_2_1', 'Transfer'), + 'UpgradeParameters': __LazyModelLoader('..._common.models.upgrade_parameters_v_2_37', 'UpgradeParameters'), + 'UserGroup': __LazyModelLoader('..._common.models.user_group_v_2_44', 'UserGroup'), + 'UserGroupQuotaLimitedBy': __LazyModelLoader('..._common.models.user_group_quota_limited_by_v_2_49', 'UserGroupQuotaLimitedBy'), + 'UserGroupSpace': __LazyModelLoader('..._common.models.user_group_space_v_2_44', 'UserGroupSpace'), + 'Username': __LazyModelLoader('..._common.models.username_v_2_0', 'Username'), + 'UsernameResponse': __LazyModelLoader('..._common.models.username_response_v_2_0', 'UsernameResponse'), + 'Vchost': __LazyModelLoader('..._common.models.vchost_v_2_49', 'Vchost'), + 'VchostCertificate': __LazyModelLoader('..._common.models.vchost_certificate_v_2_55', 'VchostCertificate'), + 'VchostCertificateGetResponse': __LazyModelLoader('..._common.models.vchost_certificate_get_response_v_2_55', 'VchostCertificateGetResponse'), + 'VchostCertificatePatch': __LazyModelLoader('..._common.models.vchost_certificate_patch_v_2_26', 'VchostCertificatePatch'), + 'VchostCertificatePost': __LazyModelLoader('..._common.models.vchost_certificate_post_v_2_55', 'VchostCertificatePost'), + 'VchostCertificateResponse': __LazyModelLoader('..._common.models.vchost_certificate_response_v_2_55', 'VchostCertificateResponse'), + 'VchostConnection': __LazyModelLoader('..._common.models.vchost_connection_v_2_49', 'VchostConnection'), + 'VchostConnectionGetResponse': __LazyModelLoader('..._common.models.vchost_connection_get_response_v_2_49', 'VchostConnectionGetResponse'), + 'VchostConnectionResponse': __LazyModelLoader('..._common.models.vchost_connection_response_v_2_49', 'VchostConnectionResponse'), + 'VchostEndpoint': __LazyModelLoader('..._common.models.vchost_endpoint_v_2_55', 'VchostEndpoint'), + 'VchostEndpointGetResponse': __LazyModelLoader('..._common.models.vchost_endpoint_get_response_v_2_55', 'VchostEndpointGetResponse'), + 'VchostEndpointPatch': __LazyModelLoader('..._common.models.vchost_endpoint_patch_v_2_55', 'VchostEndpointPatch'), + 'VchostEndpointPost': __LazyModelLoader('..._common.models.vchost_endpoint_post_v_2_55', 'VchostEndpointPost'), + 'VchostEndpointResponse': __LazyModelLoader('..._common.models.vchost_endpoint_response_v_2_55', 'VchostEndpointResponse'), + 'VchostGetResponse': __LazyModelLoader('..._common.models.vchost_get_response_v_2_49', 'VchostGetResponse'), + 'VchostPatch': __LazyModelLoader('..._common.models.vchost_patch_v_2_26', 'VchostPatch'), + 'VchostPost': __LazyModelLoader('..._common.models.vchost_post_v_2_26', 'VchostPost'), + 'VchostResponse': __LazyModelLoader('..._common.models.vchost_response_v_2_49', 'VchostResponse'), + 'VirtualMachine': __LazyModelLoader('..._common.models.virtual_machine_v_2_49', 'VirtualMachine'), + 'VirtualMachineGetResponse': __LazyModelLoader('..._common.models.virtual_machine_get_response_v_2_49', 'VirtualMachineGetResponse'), + 'VirtualMachinePost': __LazyModelLoader('..._common.models.virtual_machine_post_v_2_49', 'VirtualMachinePost'), + 'VirtualMachineResponse': __LazyModelLoader('..._common.models.virtual_machine_response_v_2_49', 'VirtualMachineResponse'), + 'VirtualMachineVolumeSnapshot': __LazyModelLoader('..._common.models.virtual_machine_volume_snapshot_v_2_49', 'VirtualMachineVolumeSnapshot'), + 'VirtualMachineVolumeSnapshotResponse': __LazyModelLoader('..._common.models.virtual_machine_volume_snapshot_response_v_2_49', 'VirtualMachineVolumeSnapshotResponse'), + 'Volume': __LazyModelLoader('..._common.models.volume_v_2_55', 'Volume'), + 'VolumeBatchPost': __LazyModelLoader('..._common.models.volume_batch_post_v_2_50', 'VolumeBatchPost'), + 'VolumeCommon': __LazyModelLoader('..._common.models.volume_common_v_2_50', 'VolumeCommon'), + 'VolumeDiff': __LazyModelLoader('..._common.models.volume_diff_v_2_50', 'VolumeDiff'), + 'VolumeGetResponse': __LazyModelLoader('..._common.models.volume_get_response_v_2_55', 'VolumeGetResponse'), + 'VolumeGroup': __LazyModelLoader('..._common.models.volume_group_v_2_51', 'VolumeGroup'), + 'VolumeGroupGetResponse': __LazyModelLoader('..._common.models.volume_group_get_response_v_2_51', 'VolumeGroupGetResponse'), + 'VolumeGroupPatch': __LazyModelLoader('..._common.models.volume_group_patch_v_2_52', 'VolumeGroupPatch'), + 'VolumeGroupPost': __LazyModelLoader('..._common.models.volume_group_post_v_2_50', 'VolumeGroupPost'), + 'VolumeGroupQosGetResponse': __LazyModelLoader('..._common.models.volume_group_qos_get_response_v_2_50', 'VolumeGroupQosGetResponse'), + 'VolumeGroupResponse': __LazyModelLoader('..._common.models.volume_group_response_v_2_51', 'VolumeGroupResponse'), + 'VolumePatch': __LazyModelLoader('..._common.models.volume_patch_v_2_55', 'VolumePatch'), + 'VolumePost': __LazyModelLoader('..._common.models.volume_post_v_2_55', 'VolumePost'), + 'VolumePostBase': __LazyModelLoader('..._common.models.volume_post_base_v_2_50', 'VolumePostBase'), + 'VolumeQosGetResponse': __LazyModelLoader('..._common.models.volume_qos_get_response_v_2_50', 'VolumeQosGetResponse'), + 'VolumeResponse': __LazyModelLoader('..._common.models.volume_response_v_2_55', 'VolumeResponse'), + 'VolumeSnapshot': __LazyModelLoader('..._common.models.volume_snapshot_v_2_50', 'VolumeSnapshot'), + 'VolumeSnapshotBatchPost': __LazyModelLoader('..._common.models.volume_snapshot_batch_post_v_2_50', 'VolumeSnapshotBatchPost'), + 'VolumeSnapshotBatchResponse': __LazyModelLoader('..._common.models.volume_snapshot_batch_response_v_2_50', 'VolumeSnapshotBatchResponse'), + 'VolumeSnapshotGetResponse': __LazyModelLoader('..._common.models.volume_snapshot_get_response_v_2_50', 'VolumeSnapshotGetResponse'), + 'VolumeSnapshotPatch': __LazyModelLoader('..._common.models.volume_snapshot_patch_v_2_0', 'VolumeSnapshotPatch'), + 'VolumeSnapshotPost': __LazyModelLoader('..._common.models.volume_snapshot_post_v_2_50', 'VolumeSnapshotPost'), + 'VolumeSnapshotResponse': __LazyModelLoader('..._common.models.volume_snapshot_response_v_2_50', 'VolumeSnapshotResponse'), + 'VolumeSnapshotTransfer': __LazyModelLoader('..._common.models.volume_snapshot_transfer_v_2_50', 'VolumeSnapshotTransfer'), + 'VolumeSnapshotTransferGetResponse': __LazyModelLoader('..._common.models.volume_snapshot_transfer_get_response_v_2_50', 'VolumeSnapshotTransferGetResponse'), + 'VolumeSnapshotTransferResponse': __LazyModelLoader('..._common.models.volume_snapshot_transfer_response_v_2_50', 'VolumeSnapshotTransferResponse'), + 'VolumeSpace': __LazyModelLoader('..._common.models.volume_space_v_2_50', 'VolumeSpace'), + 'VolumeSpaceCommon': __LazyModelLoader('..._common.models.volume_space_common_v_2_50', 'VolumeSpaceCommon'), + 'VolumeSpaceGetResponse': __LazyModelLoader('..._common.models.volume_space_get_response_v_2_50', 'VolumeSpaceGetResponse'), + 'VolumesBatchResponse': __LazyModelLoader('..._common.models.volumes_batch_response_v_2_55', 'VolumesBatchResponse'), + 'VolumesDiffGetResponse': __LazyModelLoader('..._common.models.volumes_diff_get_response_v_2_50', 'VolumesDiffGetResponse'), + 'VolumesDiffResponse': __LazyModelLoader('..._common.models.volumes_diff_response_v_2_50', 'VolumesDiffResponse'), + 'Workload': __LazyModelLoader('..._common.models.workload_v_2_50', 'Workload'), + 'WorkloadConfigurationFixedReference': __LazyModelLoader('..._common.models.workload_configuration_fixed_reference_v_2_51', 'WorkloadConfigurationFixedReference'), + 'WorkloadConfigurationReference': __LazyModelLoader('..._common.models.workload_configuration_reference_v_2_55', 'WorkloadConfigurationReference'), + 'WorkloadConfigurationReferencePatch': __LazyModelLoader('..._common.models.workload_configuration_reference_patch_v_2_55', 'WorkloadConfigurationReferencePatch'), + 'WorkloadConfigurationReferencePost': __LazyModelLoader('..._common.models.workload_configuration_reference_post_v_2_55', 'WorkloadConfigurationReferencePost'), + 'WorkloadGetResponse': __LazyModelLoader('..._common.models.workload_get_response_v_2_50', 'WorkloadGetResponse'), + 'WorkloadParameter': __LazyModelLoader('..._common.models.workload_parameter_v_2_40', 'WorkloadParameter'), + 'WorkloadParameterValue': __LazyModelLoader('..._common.models.workload_parameter_value_v_2_40', 'WorkloadParameterValue'), + 'WorkloadParameterValueResourceReference': __LazyModelLoader('..._common.models.workload_parameter_value_resource_reference_v_2_40', 'WorkloadParameterValueResourceReference'), + 'WorkloadPatch': __LazyModelLoader('..._common.models.workload_patch_v_2_40', 'WorkloadPatch'), + 'WorkloadPlacementRecommendation': __LazyModelLoader('..._common.models.workload_placement_recommendation_v_2_54', 'WorkloadPlacementRecommendation'), + 'WorkloadPlacementRecommendationAdditionalConstraints': __LazyModelLoader('..._common.models.workload_placement_recommendation_additional_constraints_v_2_54', 'WorkloadPlacementRecommendationAdditionalConstraints'), + 'WorkloadPlacementRecommendationGenericTarget': __LazyModelLoader('..._common.models.workload_placement_recommendation_generic_target_v_2_54', 'WorkloadPlacementRecommendationGenericTarget'), + 'WorkloadPlacementRecommendationGetResponse': __LazyModelLoader('..._common.models.workload_placement_recommendation_get_response_v_2_55', 'WorkloadPlacementRecommendationGetResponse'), + 'WorkloadPlacementRecommendationParameter': __LazyModelLoader('..._common.models.workload_placement_recommendation_parameter_v_2_51', 'WorkloadPlacementRecommendationParameter'), + 'WorkloadPlacementRecommendationParameterConstraints': __LazyModelLoader('..._common.models.workload_placement_recommendation_parameter_constraints_v_2_51', 'WorkloadPlacementRecommendationParameterConstraints'), + 'WorkloadPlacementRecommendationParameterResourceReference': __LazyModelLoader('..._common.models.workload_placement_recommendation_parameter_resource_reference_v_2_51', 'WorkloadPlacementRecommendationParameterResourceReference'), + 'WorkloadPlacementRecommendationPlacement': __LazyModelLoader('..._common.models.workload_placement_recommendation_placement_v_2_54', 'WorkloadPlacementRecommendationPlacement'), + 'WorkloadPlacementRecommendationProjection': __LazyModelLoader('..._common.models.workload_placement_recommendation_projection_v_2_40', 'WorkloadPlacementRecommendationProjection'), + 'WorkloadPlacementRecommendationResourceReference': __LazyModelLoader('..._common.models.workload_placement_recommendation_resource_reference_v_2_54', 'WorkloadPlacementRecommendationResourceReference'), + 'WorkloadPlacementRecommendationResponse': __LazyModelLoader('..._common.models.workload_placement_recommendation_response_v_2_54', 'WorkloadPlacementRecommendationResponse'), + 'WorkloadPlacementRecommendationResult': __LazyModelLoader('..._common.models.workload_placement_recommendation_result_v_2_54', 'WorkloadPlacementRecommendationResult'), + 'WorkloadPlacementRecommendationTarget': __LazyModelLoader('..._common.models.workload_placement_recommendation_target_v_2_54', 'WorkloadPlacementRecommendationTarget'), + 'WorkloadPlacementRecommendationTargetCapacityUsedProjections': __LazyModelLoader('..._common.models.workload_placement_recommendation_target_capacity_used_projections_v_2_47', 'WorkloadPlacementRecommendationTargetCapacityUsedProjections'), + 'WorkloadPlacementRecommendationTargetLoadProjections': __LazyModelLoader('..._common.models.workload_placement_recommendation_target_load_projections_v_2_47', 'WorkloadPlacementRecommendationTargetLoadProjections'), + 'WorkloadPlacementRecommendationWarning': __LazyModelLoader('..._common.models.workload_placement_recommendation_warning_v_2_40', 'WorkloadPlacementRecommendationWarning'), + 'WorkloadPost': __LazyModelLoader('..._common.models.workload_post_v_2_40', 'WorkloadPost'), + 'WorkloadPreset': __LazyModelLoader('..._common.models.workload_preset_v_2_49', 'WorkloadPreset'), + 'WorkloadResponse': __LazyModelLoader('..._common.models.workload_response_v_2_50', 'WorkloadResponse'), +} + +def __getattr__(name, default=None): + if '_models_list' == name: + return __class_model_dict.keys() + if name not in __class_model_dict: + return None + return __class_model_dict[name].load() + +__all__ = ['ActiveDirectory', 'ActiveDirectoryGetResponse', 'ActiveDirectoryPatch', 'ActiveDirectoryPost', 'ActiveDirectoryResponse', 'Admin', 'AdminApiToken', 'AdminApiTokenGetResponse', 'AdminApiTokenResponse', 'AdminCache', 'AdminCacheGetResponse', 'AdminCacheResponse', 'AdminGetResponse', 'AdminPatch', 'AdminPost', 'AdminResponse', 'AdminRole', 'AdminSettings', 'AdminSettingsGetResponse', 'AdminSettingsRequiredAuthenticationMethods', 'AdminSettingsResponse', 'AggregateReplicationPerformance', 'Alert', 'AlertEvent', 'AlertEventGetResponse', 'AlertEventResponse', 'AlertGetResponse', 'AlertResponse', 'AlertRules', 'AlertRulesCatalog', 'AlertRulesCatalogGetResponse', 'AlertRulesCatalogResponse', 'AlertRulesGetResponse', 'AlertRulesResponse', 'AlertWatcher', 'AlertWatcherGetResponse', 'AlertWatcherPatch', 'AlertWatcherPost', 'AlertWatcherResponse', 'ApiClient', 'ApiClientGetResponse', 'ApiClientPatch', 'ApiClientPost', 'ApiClientResponse', 'ApiToken', 'ApiVersionResponse', 'App', 'AppGetResponse', 'AppNode', 'AppNodeGetResponse', 'AppNodeResponse', 'AppResponse', 'ArrayAvailability', 'ArrayConnection', 'ArrayConnectionGetResponse', 'ArrayConnectionKey', 'ArrayConnectionKeyGetResponse', 'ArrayConnectionPatch', 'ArrayConnectionPath', 'ArrayConnectionPathGetResponse', 'ArrayConnectionPathResponse', 'ArrayConnectionPost', 'ArrayConnectionResponse', 'ArrayEncryption', 'ArrayErasure', 'ArrayErasureGetResponse', 'ArrayErasurePatch', 'ArrayErasureResponse', 'ArrayFactoryResetToken', 'ArrayFactoryResetTokenGetResponse', 'ArrayFactoryResetTokenResponse', 'ArrayGetResponse', 'ArrayPerformance', 'ArrayPerformanceByLink', 'ArrayPerformanceByLinkGetResponse', 'ArrayPerformanceByLinkResponse', 'ArrayPerformanceGetResponse', 'ArrayResponse', 'ArraySpace', 'ArraySpaceGetResponse', 'ArrayencryptionDataAtRest', 'Arrays', 'Audit', 'AuditGetResponse', 'AuditResponse', 'BasePort', 'Bucket', 'BucketBase', 'BucketGetResponse', 'BucketPatchBase', 'BucketPerformance', 'BucketPerformanceBase', 'BucketPerformanceGetResponse', 'BucketPostBase', 'BucketResponse', 'BuiltIn', 'BuiltInRelationship', 'BuiltInResourceNoId', 'Cache', 'CacheGetResponse', 'CacheSpace', 'Certificate', 'CertificateBase', 'CertificateCertificateGroupGetResponse', 'CertificateCertificateGroupResponse', 'CertificateGetResponse', 'CertificateGroup', 'CertificateGroupCertificateGetResponse', 'CertificateGroupCertificateResponse', 'CertificateGroupGetResponse', 'CertificateGroupResponse', 'CertificateGroupUse', 'CertificateGroupUseGetResponse', 'CertificatePost', 'CertificateResponse', 'CertificateSigningRequest', 'CertificateSigningRequestPost', 'CertificateSigningRequestResponse', 'CertificateUse', 'CertificateUseGetResponse', 'Chap', 'CloudCapacityGetResponse', 'CloudCapacityPatchResponse', 'CloudCapacityStatus', 'CloudCapacityStep', 'CloudCapacityStepsGetResponse', 'CloudConfig', 'CloudConfigAutomaticCapacityUpgrade', 'CloudConfigAutomaticCapacityUpgradePatch', 'CloudConfigGetResponse', 'CloudConfigModel', 'CloudConfigModelPatch', 'CloudConfigPatch', 'CloudConfigPatchResponse', 'CloudConfigSupported', 'CloudConfigSupportedConfigsGetResponse', 'CloudProviderTag', 'CloudProviderTagGetResponse', 'CloudProviderTagResponse', 'Connection', 'ConnectionGetResponse', 'ConnectionPost', 'ConnectionResponse', 'ContainerDefaultProtection', 'ContainerDefaultProtectionGetResponse', 'ContainerDefaultProtectionResponse', 'ContainerEradicationConfig', 'ContainerPerformance', 'ContainerPerformanceGetResponse', 'ContainerPerformanceReplication', 'ContainerQos', 'ContainerQosBandwidthLimitPatch', 'ContainerQosCeilings', 'ContainerQosCeilingsBandwidthLimitPatch', 'ContainerQosCeilingsIopsLimitPatch', 'ContainerQosCeilingsPatch', 'ContainerQosFileCeilings', 'ContainerQosIopsLimitPatch', 'ContainerQosPatch', 'Context', 'Controller', 'ControllerGetResponse', 'DataSealingKey', 'DataSealingKeyGetResponse', 'DataSealingKeyPatch', 'DataSealingKeyPost', 'DataSealingKeyResponse', 'DataSealingKeyRotate', 'DefaultProtectionReference', 'DestroyedPatchPost', 'DirectoriesGroupsGetResponse', 'DirectoriesGroupsResponse', 'DirectoriesPerformanceByArray', 'DirectoriesPerformanceByArrayGetResponse', 'DirectoriesUsersGetResponse', 'DirectoriesUsersResponse', 'Directory', 'DirectoryExport', 'DirectoryExportGetResponse', 'DirectoryExportPatch', 'DirectoryExportPost', 'DirectoryExportResponse', 'DirectoryGetResponse', 'DirectoryGroup', 'DirectoryGroupQuota', 'DirectoryGroupQuotasGetResponse', 'DirectoryGroupQuotasResponse', 'DirectoryLockNlmReclamation', 'DirectoryLockNlmReclamationResponse', 'DirectoryPatch', 'DirectoryPerformance', 'DirectoryPerformanceGetResponse', 'DirectoryPolicyExportPost', 'DirectoryPolicyPost', 'DirectoryPost', 'DirectoryQosGetResponse', 'DirectoryQuota', 'DirectoryQuotasGetResponse', 'DirectoryQuotasResponse', 'DirectoryResponse', 'DirectoryService', 'DirectoryServiceCommon', 'DirectoryServiceGetResponse', 'DirectoryServiceManagement', 'DirectoryServicePatch', 'DirectoryServicePost', 'DirectoryServiceResponse', 'DirectoryServiceRole', 'DirectoryServiceRoleGetResponse', 'DirectoryServiceRolePost', 'DirectoryServiceRoleResponse', 'DirectorySnapshot', 'DirectorySnapshotEradicationConfig', 'DirectorySnapshotGetResponse', 'DirectorySnapshotPatch', 'DirectorySnapshotPost', 'DirectorySnapshotResponse', 'DirectoryUser', 'DirectoryUserQuota', 'DirectoryUserQuotaRule', 'DirectoryUserQuotasGetResponse', 'DirectoryUserQuotasResponse', 'DirectorypolicyexportpostPolicies', 'DirectorypolicypostPolicies', 'Dns', 'DnsGetResponse', 'DnsPatch', 'DnsPost', 'DnsResponse', 'Drive', 'DriveGetResponse', 'DriveResponse', 'EradicationConfig', 'ErrorContextResponse', 'ErrorcontextresponseErrors', 'Eula', 'EulaGetResponse', 'EulaResponse', 'EulaSignature', 'ExportPolicyAttachmentMixin', 'FilePost', 'FileSystem', 'FileSystemGetResponse', 'FileSystemPatch', 'FileSystemPost', 'FileSystemResponse', 'FixedNameResourceNoId', 'FixedReference', 'FixedReferenceNoId', 'FixedReferenceWithType', 'FixedReferenceWithTypeAndLocation', 'Fleet', 'FleetGetResponse', 'FleetKey', 'FleetKeyGetResponse', 'FleetKeyResponse', 'FleetMember', 'FleetMemberGetResponse', 'FleetMemberPost', 'FleetMemberResponse', 'FleetPatch', 'FleetResponse', 'FleetmemberpostMember', 'FleetmemberpostMembers', 'Hardware', 'HardwareGetResponse', 'HardwarePatch', 'HardwareResponse', 'Host', 'HostGetResponse', 'HostGroup', 'HostGroupGetResponse', 'HostGroupPatch', 'HostGroupPost', 'HostGroupQosGetResponse', 'HostGroupResponse', 'HostPatch', 'HostPerformanceBalance', 'HostPerformanceBalanceGetResponse', 'HostPortConnectivity', 'HostPost', 'HostQosGetResponse', 'HostResponse', 'Kmip', 'KmipCertificate', 'KmipGetResponse', 'KmipObject', 'KmipPatch', 'KmipPost', 'KmipResponse', 'KmipTestResult', 'KmipTestResultGetResponse', 'LifecycleRule', 'LifecycleRuleBase', 'LifecycleRuleConfigBase', 'LifecycleRuleGetResponse', 'LifecycleRulePatchBase', 'LifecycleRulePostBase', 'LifecycleRuleResponse', 'LimitedBy', 'LocalDirectoryService', 'LocalDirectoryServiceGetResponse', 'LocalDirectoryServicePost', 'LocalDirectoryServiceReference', 'LocalDirectoryServiceResponse', 'LocalGroup', 'LocalGroupGetResponse', 'LocalGroupMembershipPost', 'LocalGroupPatch', 'LocalGroupPost', 'LocalGroupResponse', 'LocalMember', 'LocalMembershipGetResponse', 'LocalMembershipResponse', 'LocalUser', 'LocalUserGetResponse', 'LocalUserMembershipPost', 'LocalUserPatch', 'LocalUserPost', 'LocalUserResponse', 'LocalgroupmembershippostMembers', 'LocalusermembershippostGroups', 'LogTarget', 'LogTargetFile', 'LogTargetFileGetResponse', 'LogTargetFileResponse', 'LogTargetsGetResponse', 'LogTargetsResponse', 'LoginPost', 'MaintenanceWindow', 'MaintenanceWindowPost', 'MaintenanceWindowsGetResponse', 'MaintenanceWindowsResponse', 'MappingPolicy', 'MappingPolicyPatch', 'Member', 'MemberGetResponse', 'MemberNoIdAll', 'MemberNoIdAllGetResponse', 'MemberNoIdAllResponse', 'MemberNoIdMember', 'MemberNoIdMemberGetResponse', 'MemberNoIdMemberResponse', 'MemberResponse', 'MemberWithType', 'NamingPattern', 'NetworkInterface', 'NetworkInterfaceEth', 'NetworkInterfaceFc', 'NetworkInterfaceGetResponse', 'NetworkInterfaceNeighbor', 'NetworkInterfaceNeighborCapability', 'NetworkInterfaceNeighborGetResponse', 'NetworkInterfaceNeighborNeighborChassis', 'NetworkInterfaceNeighborNeighborChassisId', 'NetworkInterfaceNeighborNeighborPort', 'NetworkInterfaceNeighborNeighborPortId', 'NetworkInterfaceNeighborResponse', 'NetworkInterfacePatch', 'NetworkInterfacePerformance', 'NetworkInterfacePerformanceEth', 'NetworkInterfacePerformanceFc', 'NetworkInterfacePerformanceGetResponse', 'NetworkInterfacePortDetailsRxLos', 'NetworkInterfacePortDetailsRxPower', 'NetworkInterfacePortDetailsStatic', 'NetworkInterfacePortDetailsStaticRxPowerThresholds', 'NetworkInterfacePortDetailsStaticTemperatureThresholds', 'NetworkInterfacePortDetailsStaticTxBiasThresholds', 'NetworkInterfacePortDetailsStaticTxPowerThresholds', 'NetworkInterfacePortDetailsStaticVoltageThresholds', 'NetworkInterfacePortDetailsTemperature', 'NetworkInterfacePortDetailsTxBias', 'NetworkInterfacePortDetailsTxFault', 'NetworkInterfacePortDetailsTxPower', 'NetworkInterfacePortDetailsVoltage', 'NetworkInterfacePost', 'NetworkInterfaceResponse', 'NetworkInterfacesPortDetails', 'NetworkInterfacesPortDetailsGetResponse', 'NetworkInterfacesPortDetailsResponse', 'NetworkinterfacepatchEth', 'NetworkinterfacepostEth', 'NewFqname', 'NewName', 'NonCopyableTag', 'NonCopyableTagBatch', 'Oauth210TokenPost400Response', 'Oauth210TokenPost401Response', 'OauthTokenResponse', 'ObjectStoreAccessKey', 'ObjectStoreAccessKeyBase', 'ObjectStoreAccessKeyGetResponse', 'ObjectStoreAccessKeyPostBase', 'ObjectStoreAccessKeyResponse', 'ObjectStoreAccessPolicy', 'ObjectStoreAccessPolicyGetResponse', 'ObjectStoreAccessPolicyResponse', 'ObjectStoreAccessPolicyRuleGetResponse', 'ObjectStoreAccessPolicyRuleResponse', 'ObjectStoreAccount', 'ObjectStoreAccountBase', 'ObjectStoreAccountGetResponse', 'ObjectStoreAccountResponse', 'ObjectStoreUser', 'ObjectStoreUserBase', 'ObjectStoreUserGetResponse', 'ObjectStoreUserResponse', 'ObjectStoreVirtualHost', 'ObjectStoreVirtualHostGetResponse', 'ObjectStoreVirtualHostResponse', 'Offload', 'OffloadAzure', 'OffloadAzurePatch', 'OffloadGetResponse', 'OffloadGoogleCloud', 'OffloadNfs', 'OffloadPatch', 'OffloadPost', 'OffloadResponse', 'OffloadS3', 'OverrideCheck', 'PageInfo', 'PageInfoWithoutTotalItemCountResponse', 'Performance', 'PerformanceOthers', 'Pod', 'PodArrayAndMember', 'PodArrayStatus', 'PodGetResponse', 'PodMember', 'PodMemberGetResponse', 'PodMemberResponse', 'PodPatch', 'PodPerformance', 'PodPerformanceByArray', 'PodPerformanceByArrayGetResponse', 'PodPerformanceReplication', 'PodPerformanceReplicationByArray', 'PodPerformanceReplicationByArrayGetResponse', 'PodPerformanceReplicationByArrayResponse', 'PodPerformanceReplicationGetResponse', 'PodPerformanceReplicationResponse', 'PodPost', 'PodRemoteArrayStatus', 'PodReplicaLink', 'PodReplicaLinkGetResponse', 'PodReplicaLinkLag', 'PodReplicaLinkLagGetResponse', 'PodReplicaLinkLagResponse', 'PodReplicaLinkMappingPolicyGetResponse', 'PodReplicaLinkMappingPolicyResponse', 'PodReplicaLinkPatch', 'PodReplicaLinkPerformanceReplication', 'PodReplicaLinkPerformanceReplicationArray', 'PodReplicaLinkPerformanceReplicationArrayGetResponse', 'PodReplicaLinkPerformanceReplicationArrayResponse', 'PodReplicaLinkPerformanceReplicationGetResponse', 'PodReplicaLinkPerformanceReplicationResponse', 'PodReplicaLinkReference', 'PodReplicaLinkResponse', 'PodResponse', 'PodSpace', 'Policy', 'PolicyAssignmentPost', 'PolicyAssignmentPostPolicy', 'PolicyAuditFile', 'PolicyAuditFileGetResponse', 'PolicyAuditFilePatch', 'PolicyAuditFilePost', 'PolicyAuditFileResponse', 'PolicyBase', 'PolicyGetResponse', 'PolicyLockable', 'PolicyLockableEradicationConfig', 'PolicyLockableGetResponse', 'PolicyLockablePatch', 'PolicyLockableResponse', 'PolicyManagementAccess', 'PolicyManagementAccessGetResponse', 'PolicyManagementAccessPatch', 'PolicyManagementAccessPost', 'PolicyManagementAccessResponse', 'PolicyMember', 'PolicyMemberBase', 'PolicyMemberClean', 'PolicyMemberCleanGetResponse', 'PolicyMemberCleanResponse', 'PolicyMemberExport', 'PolicyMemberExportGetResponse', 'PolicyMemberExportPost', 'PolicyMemberExportResponse', 'PolicyMemberGetResponse', 'PolicyMemberObjectStoreAccessGetResponse', 'PolicyMemberObjectStoreAccessResponse', 'PolicyMemberPost', 'PolicyMemberResponse', 'PolicyNfs', 'PolicyNfsGetResponse', 'PolicyNfsPatch', 'PolicyNfsPolicyMapping', 'PolicyNfsPost', 'PolicyNfsResponse', 'PolicyPassword', 'PolicyPasswordGetResponse', 'PolicyPasswordResponse', 'PolicyPatch', 'PolicyPost', 'PolicyQos', 'PolicyQosGetResponse', 'PolicyQosPatch', 'PolicyQosPost', 'PolicyQosResponse', 'PolicyQuota', 'PolicyQuotaGetResponse', 'PolicyQuotaPatch', 'PolicyQuotaResponse', 'PolicyResponse', 'PolicyRuleAlertWatcher', 'PolicyRuleAlertWatcherGetResponse', 'PolicyRuleAlertWatcherPatch', 'PolicyRuleAlertWatcherPost', 'PolicyRuleAlertWatcherResponse', 'PolicyRuleNetworkAccess', 'PolicyRuleNetworkAccessGetResponse', 'PolicyRuleNetworkAccessPatch', 'PolicyRuleNetworkAccessPost', 'PolicyRuleNetworkAccessResponse', 'PolicyRuleNfsClient', 'PolicyRuleNfsClientGetResponse', 'PolicyRuleNfsClientPatch', 'PolicyRuleNfsClientPost', 'PolicyRuleNfsClientResponse', 'PolicyRuleObjectStoreAccess', 'PolicyRuleObjectStoreAccessBase', 'PolicyRuleQuota', 'PolicyRuleQuotaGetResponse', 'PolicyRuleQuotaPatch', 'PolicyRuleQuotaPost', 'PolicyRuleQuotaResponse', 'PolicyRuleSmbClient', 'PolicyRuleSmbClientGetResponse', 'PolicyRuleSmbClientPost', 'PolicyRuleSmbClientResponse', 'PolicyRuleSnapshot', 'PolicyRuleSnapshotGetResponse', 'PolicyRuleSnapshotPatch', 'PolicyRuleSnapshotPost', 'PolicyRuleSnapshotResponse', 'PolicyRuleUserGroupQuota', 'PolicyRuleUserGroupQuotaGetResponse', 'PolicyRuleUserGroupQuotaLimitPatch', 'PolicyRuleUserGroupQuotaPatch', 'PolicyRuleUserGroupQuotaPost', 'PolicyRuleUserGroupQuotaResponse', 'PolicyRuleUserGroupQuotaSubject', 'PolicySmb', 'PolicySmbGetResponse', 'PolicySmbPatch', 'PolicySmbPost', 'PolicySmbResponse', 'PolicyTls', 'PolicyTlsBase', 'PolicyTlsGetResponse', 'PolicyTlsPatch', 'PolicyTlsPost', 'PolicyTlsResponse', 'PolicymemberexportpostMembers', 'PolicymemberpostMembers', 'PolicynfspostPolicyMapping', 'PolicyqosRatelimit', 'PolicyrulealertwatcherpatchRules', 'PolicyrulealertwatcherpostRules', 'PolicyrulemanagementaccessRules', 'PolicyrulenetworkaccesspatchRules', 'PolicyrulenetworkaccesspostRules', 'PolicyrulenfsclientpatchRules', 'PolicyrulenfsclientpostRules', 'PolicyrulequotapatchRules', 'PolicyrulequotapostRules', 'PolicyrulesmbclientpostRules', 'PolicyrulesnapshotpatchRules', 'PolicyrulesnapshotpostRules', 'PolicyruleusergroupquotaSubject', 'PolicyruleusergroupquotapatchRules', 'PolicyruleusergroupquotapostRules', 'Port', 'PortCommon', 'PortGetResponse', 'PortInitiator', 'PortInitiatorEncryption', 'PortInitiatorTarget', 'PortInitiatorsGetResponse', 'PresetWorkload', 'PresetWorkloadBase', 'PresetWorkloadConstraints', 'PresetWorkloadConstraintsBoolean', 'PresetWorkloadConstraintsInteger', 'PresetWorkloadConstraintsResourceReference', 'PresetWorkloadConstraintsResourceReferenceAllowedValues', 'PresetWorkloadConstraintsString', 'PresetWorkloadDirectoryConfiguration', 'PresetWorkloadDirectoryConfigurationExportConfigurations', 'PresetWorkloadDirectoryConfigurationExports', 'PresetWorkloadDirectoryConfigurationMultiProtocol', 'PresetWorkloadDirectoryConfigurationName', 'PresetWorkloadDirectoryConfigurationParent', 'PresetWorkloadDirectoryConfigurationPath', 'PresetWorkloadDirectoryConfigurationSpecialDirectories', 'PresetWorkloadExportConfigurationNfs', 'PresetWorkloadExportConfigurationNfsPolicy', 'PresetWorkloadExportConfigurationNfsRule', 'PresetWorkloadExportConfigurationSmb', 'PresetWorkloadExportConfigurationSmbPolicy', 'PresetWorkloadExportConfigurationSmbRule', 'PresetWorkloadExportConfigurationSmbShare', 'PresetWorkloadExportConfigurationSmbSharePolicy', 'PresetWorkloadExportConfigurationSmbShareRule', 'PresetWorkloadExportConfigurations', 'PresetWorkloadGetResponse', 'PresetWorkloadMetadata', 'PresetWorkloadParameter', 'PresetWorkloadPatch', 'PresetWorkloadPeriodicReplicationConfiguration', 'PresetWorkloadPlacementConfiguration', 'PresetWorkloadPolicyAction', 'PresetWorkloadPost', 'PresetWorkloadQosConfiguration', 'PresetWorkloadQuotaConfiguration', 'PresetWorkloadQuotaRule', 'PresetWorkloadResponse', 'PresetWorkloadSnapshotConfiguration', 'PresetWorkloadSnapshotRule', 'PresetWorkloadVolumeConfiguration', 'PresetWorkloadWorkloadTag', 'PriorityAdjustment', 'ProtectionGroup', 'ProtectionGroupEradicationConfig', 'ProtectionGroupGetResponse', 'ProtectionGroupPerformance', 'ProtectionGroupPerformanceArray', 'ProtectionGroupPerformanceArrayResponse', 'ProtectionGroupPerformanceResponse', 'ProtectionGroupPost', 'ProtectionGroupResponse', 'ProtectionGroupSnapshot', 'ProtectionGroupSnapshotGetResponse', 'ProtectionGroupSnapshotPatch', 'ProtectionGroupSnapshotPost', 'ProtectionGroupSnapshotReplica', 'ProtectionGroupSnapshotReplicaResponse', 'ProtectionGroupSnapshotResponse', 'ProtectionGroupSnapshotTransfer', 'ProtectionGroupSnapshotTransferGetResponse', 'ProtectionGroupSnapshotTransferResponse', 'ProtectionGroupTargetGetResponse', 'ProtectionGroupTargetResponse', 'ProtectionGroupsVolumes', 'ProtectionGroupsVolumesGetResponse', 'ProtectionGroupsVolumesMember', 'ProtectionGroupsVolumesResponse', 'ProtocolEndpoint', 'Qos', 'QosBandwidthLimitPatch', 'QosIopsLimitPatch', 'QosMetrics', 'QosMetricsCeilings', 'QosMetricsFileCeilings', 'QosPatch', 'QuotaLimitPatch', 'Realm', 'RealmArrayStatus', 'RealmConnection', 'RealmConnectionKey', 'RealmConnectionKeyGetResponse', 'RealmConnectionKeyPost', 'RealmConnectionKeyPostResponse', 'RealmConnectionKeyResponse', 'RealmConnectionWithKey', 'RealmConnectionsGetResponse', 'RealmConnectionsResponse', 'RealmGetResponse', 'RealmMember', 'RealmMemberGetResponse', 'RealmMemberResponse', 'RealmPatch', 'RealmPost', 'RealmQosGetResponse', 'RealmRemoteArrayStatus', 'RealmResponse', 'RealmSpaceGetResponse', 'RealmsReference', 'Reference', 'ReferenceNoId', 'ReferenceNoIdWithType', 'ReferenceWithFixedType', 'ReferenceWithType', 'ReferenceWithoutTypeWithIsLocal', 'RemoteArray', 'RemoteArrayFleet', 'RemoteArrayResponse', 'RemoteArraysResponse', 'RemotePod', 'RemotePodTagGetResponse', 'RemotePodsResponse', 'RemoteProtectionGroup', 'RemoteProtectionGroupGetResponse', 'RemoteProtectionGroupResponse', 'RemoteProtectionGroupSnapshot', 'RemoteProtectionGroupSnapshotGetResponse', 'RemoteProtectionGroupSnapshotPost', 'RemoteProtectionGroupSnapshotResponse', 'RemoteProtectionGroupSnapshotTransfer', 'RemoteProtectionGroupSnapshotTransferGetResponse', 'RemoteProtectionGroupSnapshotTransferResponse', 'RemoteRealm', 'RemoteRealmTagGetResponse', 'RemoteRealmsResponse', 'RemoteVolumeSnapshot', 'RemoteVolumeSnapshotGetResponse', 'RemoteVolumeSnapshotPost', 'RemoteVolumeSnapshotResponse', 'RemoteVolumeSnapshotTransfer', 'RemoteVolumeSnapshotTransferGetResponse', 'RemoteVolumeSnapshotTransferResponse', 'ReplicaLinkLag', 'ReplicaLinkPerformanceReplication', 'ReplicaLinkPerformanceReplicationArray', 'ReplicaLinkPerformanceReplicationBase', 'ReplicationPerformanceWithTotal', 'ReplicationSchedule', 'Resource', 'ResourceAccess', 'ResourceAccessStatus', 'ResourceAccessStatusCreatedBy', 'ResourceAccessesGetResponse', 'ResourceAccessesResponse', 'ResourceAccessesStatusGetResponse', 'ResourceAccessesStatusResponse', 'ResourceBucketSpace', 'ResourceBucketSpaceGetResponse', 'ResourceDirectorySpace', 'ResourceDirectorySpaceGetResponse', 'ResourceFixedNonUniqueName', 'ResourceNoId', 'ResourceObjectStoreAccountSpace', 'ResourceObjectStoreAccountSpaceGetResponse', 'ResourcePerformance', 'ResourcePerformanceByArray', 'ResourcePerformanceByArrayGetResponse', 'ResourcePerformanceGetResponse', 'ResourcePerformanceNoId', 'ResourcePerformanceNoIdByArray', 'ResourcePerformanceNoIdByArrayGetResponse', 'ResourcePerformanceNoIdGetResponse', 'ResourcePodSpace', 'ResourcePodSpaceGetResponse', 'ResourceRealmSpace', 'ResourceSpace', 'ResourceSpaceGetResponse', 'ResourceSpaceNoId', 'ResourceSpaceNoIdGetResponse', 'RetentionPolicy', 'Saml2Sso', 'Saml2SsoGetResponse', 'Saml2SsoIdp', 'Saml2SsoManagement', 'Saml2SsoPatch', 'Saml2SsoPost', 'Saml2SsoResponse', 'Saml2SsoSp', 'Saml2SsoSpCredential', 'Server', 'ServerGetResponse', 'ServerPatch', 'ServerPost', 'ServerReference', 'ServerResponse', 'Session', 'SessionGetResponse', 'Smis', 'SmisGetResponse', 'SmisResponse', 'SmtpServer', 'SmtpServerGetResponse', 'SmtpServerResponse', 'Snapshot', 'SnapshotSchedule', 'SnapshotSpace', 'SnmpAgent', 'SnmpAgentGetResponse', 'SnmpAgentMib', 'SnmpAgentMibGetResponse', 'SnmpAgentMibResponse', 'SnmpAgentPatch', 'SnmpAgentResponse', 'SnmpManager', 'SnmpManagerGetResponse', 'SnmpManagerPatch', 'SnmpManagerPost', 'SnmpManagerResponse', 'SnmpV2c', 'SnmpV3', 'SnmpV3Patch', 'SnmpV3Post', 'Software', 'SoftwareBundle', 'SoftwareBundleGetResponse', 'SoftwareBundlePost', 'SoftwareBundleResponse', 'SoftwareCheck', 'SoftwareChecksChecks', 'SoftwareChecksGetResponse', 'SoftwareChecksResponse', 'SoftwareGetResponse', 'SoftwareInstallation', 'SoftwareInstallationPatch', 'SoftwareInstallationPost', 'SoftwareInstallationStep', 'SoftwareInstallationStepsChecks', 'SoftwareInstallationStepsGetResponse', 'SoftwareInstallationStepsResponse', 'SoftwareInstallationsGetResponse', 'SoftwareInstallationsResponse', 'SoftwarePatch', 'SoftwarePatchesGetResponse', 'SoftwarePatchesResponse', 'SoftwarePost', 'SoftwareResponse', 'SoftwareUpgradePlan', 'SoftwareVersion', 'SoftwareVersionsGetResponse', 'SoftwareVersionsResponse', 'Space', 'SpaceNoDeprecatedPhysicalOrEffective', 'StartEndTime', 'StretchedTagPod', 'StretchedTagRealm', 'StretchedTagRemoteArrayStatus', 'Subnet', 'SubnetGetResponse', 'SubnetPatch', 'SubnetPost', 'SubnetResponse', 'Subscription', 'SubscriptionAsset', 'SubscriptionAssetGetResponse', 'SubscriptionAssetResponse', 'SubscriptionAssetSubscription', 'SubscriptionGetResponse', 'SubscriptionResponse', 'Support', 'SupportDiagnosticsDetails', 'SupportDiagnosticsDetailsGetResponse', 'SupportDiagnosticsDetailsResponse', 'SupportDiagnosticsGetResponse', 'SupportDiagnosticsResponse', 'SupportDiagnosticsSettings', 'SupportGetResponse', 'SupportPatch', 'SupportRemoteAssistPaths', 'SupportRemoteAssistSessions', 'SupportRemoteAssistSessionsGetResponse', 'SupportRemoteAssistSessionsPatch', 'SupportRemoteAssistSessionsPaths', 'SupportRemoteAssistSessionsResponse', 'SupportRemoteAssistSessionsSettings', 'SupportRemoteAssistSessionsSettingsGetResponse', 'SupportRemoteAssistSessionsSettingsResponse', 'SupportResponse', 'SupportSystemManifest', 'SupportSystemManifestResponse', 'SyslogServer', 'SyslogServerGetResponse', 'SyslogServerResponse', 'SyslogServerSettings', 'SyslogServerSettingsGetResponse', 'SyslogServerSettingsResponse', 'Tag', 'TagBatch', 'TagGetResponse', 'TagResponse', 'TargetProtectionGroup', 'TargetProtectionGroupPostPatch', 'TestGetResultWithResourceErrorContextMultiserverAwareResponse', 'TestPatchResultWithResourceMultiserverAwareResponse', 'TestResult', 'TestResultGetResponse', 'TestResultResponse', 'TestResultWithNoIdResourceMultiserverAware', 'TestResultWithResource', 'TestResultWithResourceAndErrorContextPartialResourceResponse', 'TestResultWithResourceGetResponse', 'TestResultWithResourcePatchResponse', 'TestResultWithResourcePostResponse', 'TestResultWithResourceResponse', 'TestResultWithResourceWithId', 'TestResultWithResourceWithIdPostResponse', 'Tgroup', 'TgroupGetResponse', 'TgroupMember', 'TgroupMemberGetResponse', 'TgroupMemberResponse', 'TgroupMembersPost', 'TgroupMembersPostMember', 'TgroupPatch', 'TgroupResponse', 'Throttle', 'ThrottleDeprecated', 'TimeWindow', 'TotalItemCountResponse', 'Transfer', 'UpgradeParameters', 'UserGroup', 'UserGroupQuotaLimitedBy', 'UserGroupSpace', 'Username', 'UsernameResponse', 'Vchost', 'VchostCertificate', 'VchostCertificateGetResponse', 'VchostCertificatePatch', 'VchostCertificatePost', 'VchostCertificateResponse', 'VchostConnection', 'VchostConnectionGetResponse', 'VchostConnectionResponse', 'VchostEndpoint', 'VchostEndpointGetResponse', 'VchostEndpointPatch', 'VchostEndpointPost', 'VchostEndpointResponse', 'VchostGetResponse', 'VchostPatch', 'VchostPost', 'VchostResponse', 'VirtualMachine', 'VirtualMachineGetResponse', 'VirtualMachinePost', 'VirtualMachineResponse', 'VirtualMachineVolumeSnapshot', 'VirtualMachineVolumeSnapshotResponse', 'Volume', 'VolumeBatchPost', 'VolumeCommon', 'VolumeDiff', 'VolumeGetResponse', 'VolumeGroup', 'VolumeGroupGetResponse', 'VolumeGroupPatch', 'VolumeGroupPost', 'VolumeGroupQosGetResponse', 'VolumeGroupResponse', 'VolumePatch', 'VolumePost', 'VolumePostBase', 'VolumeQosGetResponse', 'VolumeResponse', 'VolumeSnapshot', 'VolumeSnapshotBatchPost', 'VolumeSnapshotBatchResponse', 'VolumeSnapshotGetResponse', 'VolumeSnapshotPatch', 'VolumeSnapshotPost', 'VolumeSnapshotResponse', 'VolumeSnapshotTransfer', 'VolumeSnapshotTransferGetResponse', 'VolumeSnapshotTransferResponse', 'VolumeSpace', 'VolumeSpaceCommon', 'VolumeSpaceGetResponse', 'VolumesBatchResponse', 'VolumesDiffGetResponse', 'VolumesDiffResponse', 'Workload', 'WorkloadConfigurationFixedReference', 'WorkloadConfigurationReference', 'WorkloadConfigurationReferencePatch', 'WorkloadConfigurationReferencePost', 'WorkloadGetResponse', 'WorkloadParameter', 'WorkloadParameterValue', 'WorkloadParameterValueResourceReference', 'WorkloadPatch', 'WorkloadPlacementRecommendation', 'WorkloadPlacementRecommendationAdditionalConstraints', 'WorkloadPlacementRecommendationGenericTarget', 'WorkloadPlacementRecommendationGetResponse', 'WorkloadPlacementRecommendationParameter', 'WorkloadPlacementRecommendationParameterConstraints', 'WorkloadPlacementRecommendationParameterResourceReference', 'WorkloadPlacementRecommendationPlacement', 'WorkloadPlacementRecommendationProjection', 'WorkloadPlacementRecommendationResourceReference', 'WorkloadPlacementRecommendationResponse', 'WorkloadPlacementRecommendationResult', 'WorkloadPlacementRecommendationTarget', 'WorkloadPlacementRecommendationTargetCapacityUsedProjections', 'WorkloadPlacementRecommendationTargetLoadProjections', 'WorkloadPlacementRecommendationWarning', 'WorkloadPost', 'WorkloadPreset', 'WorkloadResponse'] diff --git a/pypureclient/flasharray/FA_2_56/__init__.py b/pypureclient/flasharray/FA_2_56/__init__.py new file mode 100644 index 0000000000..9913373ddb --- /dev/null +++ b/pypureclient/flasharray/FA_2_56/__init__.py @@ -0,0 +1,14 @@ +# coding: utf-8 +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.56 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from .client import Client \ No newline at end of file diff --git a/pypureclient/flasharray/FA_2_56/api/__init__.py b/pypureclient/flasharray/FA_2_56/api/__init__.py new file mode 100644 index 0000000000..bc18da089b --- /dev/null +++ b/pypureclient/flasharray/FA_2_56/api/__init__.py @@ -0,0 +1,112 @@ +""" + FlashArray REST API +""" + +from functools import partial + +class __LazyApiLoader: + def __init__(self, modname, attr, version=None): + self._modname = modname + self._attr = attr + self._version = version + self._mod = None + + def load(self): + import importlib + if self._mod is None: + self._mod = importlib.import_module(self._modname, package=__package__) + cls = getattr(self._mod, self._attr) + if self._version: + return partial(cls, version=self._version) + return cls + +__class_apis_dict = { + 'APIClientsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.api_clients_api_v_2_36', 'APIClientsApi', '2.56'), + 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flasharray._common.apis.active_directory_api_v_2_55', 'ActiveDirectoryApi', '2.56'), + 'AdministratorsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.administrators_api_v_2_54', 'AdministratorsApi', '2.56'), + 'AlertWatchersApi': __LazyApiLoader('pypureclient.flasharray._common.apis.alert_watchers_api_v_2_49', 'AlertWatchersApi', '2.56'), + 'AlertsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.alerts_api_v_2_49', 'AlertsApi', '2.56'), + 'AppsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.apps_api_v_2_36', 'AppsApi', '2.56'), + 'ArrayConnectionsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.array_connections_api_v_2_55', 'ArrayConnectionsApi', '2.56'), + 'ArraysApi': __LazyApiLoader('pypureclient.flasharray._common.apis.arrays_api_v_2_51', 'ArraysApi', '2.56'), + 'AuditsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.audits_api_v_2_49', 'AuditsApi', '2.56'), + 'AuthorizationApi': __LazyApiLoader('pypureclient.flasharray._common.apis.authorization_api_v_2_47', 'AuthorizationApi', '2.56'), + 'BucketsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.buckets_api_v_2_52', 'BucketsApi', '2.56'), + 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.certificate_groups_api_v_2_41', 'CertificateGroupsApi', '2.56'), + 'CertificatesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.certificates_api_v_2_41', 'CertificatesApi', '2.56'), + 'ConnectionsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.connections_api_v_2_49', 'ConnectionsApi', '2.56'), + 'ContainerDefaultProtectionsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.container_default_protections_api_v_2_49', 'ContainerDefaultProtectionsApi', '2.56'), + 'ControllersApi': __LazyApiLoader('pypureclient.flasharray._common.apis.controllers_api_v_2_36', 'ControllersApi', '2.56'), + 'DNSApi': __LazyApiLoader('pypureclient.flasharray._common.apis.dns_api_v_2_49', 'DNSApi', '2.56'), + 'DataSealingKeysApi': __LazyApiLoader('pypureclient.flasharray._common.apis.data_sealing_keys_api_v_2_55', 'DataSealingKeysApi', '2.56'), + 'DirectoriesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.directories_api_v_2_55', 'DirectoriesApi', '2.56'), + 'DirectoryExportsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.directory_exports_api_v_2_51', 'DirectoryExportsApi', '2.56'), + 'DirectoryQuotasApi': __LazyApiLoader('pypureclient.flasharray._common.apis.directory_quotas_api_v_2_49', 'DirectoryQuotasApi', '2.56'), + 'DirectoryServicesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.directory_services_api_v_2_55', 'DirectoryServicesApi', '2.56'), + 'DirectorySnapshotsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.directory_snapshots_api_v_2_49', 'DirectorySnapshotsApi', '2.56'), + 'DrivesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.drives_api_v_2_36', 'DrivesApi', '2.56'), + 'FileSystemsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.file_systems_api_v_2_51', 'FileSystemsApi', '2.56'), + 'FilesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.files_api_v_2_36', 'FilesApi', '2.56'), + 'FleetsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.fleets_api_v_2_39', 'FleetsApi', '2.56'), + 'HardwareApi': __LazyApiLoader('pypureclient.flasharray._common.apis.hardware_api_v_2_36', 'HardwareApi', '2.56'), + 'HostGroupsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.host_groups_api_v_2_50', 'HostGroupsApi', '2.56'), + 'HostsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.hosts_api_v_2_50', 'HostsApi', '2.56'), + 'KMIPApi': __LazyApiLoader('pypureclient.flasharray._common.apis.kmip_api_v_2_36', 'KMIPApi', '2.56'), + 'LifecycleRulesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.lifecycle_rules_api_v_2_51', 'LifecycleRulesApi', '2.56'), + 'LogTargetsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.log_targets_api_v_2_49', 'LogTargetsApi', '2.56'), + 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.maintenance_windows_api_v_2_36', 'MaintenanceWindowsApi', '2.56'), + 'NetworkInterfacesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.network_interfaces_api_v_2_55', 'NetworkInterfacesApi', '2.56'), + 'ObjectStoreAccessKeysApi': __LazyApiLoader('pypureclient.flasharray._common.apis.object_store_access_keys_api_v_2_51', 'ObjectStoreAccessKeysApi', '2.56'), + 'ObjectStoreAccountsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.object_store_accounts_api_v_2_52', 'ObjectStoreAccountsApi', '2.56'), + 'ObjectStoreUsersApi': __LazyApiLoader('pypureclient.flasharray._common.apis.object_store_users_api_v_2_51', 'ObjectStoreUsersApi', '2.56'), + 'ObjectStoreVirtualHostsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.object_store_virtual_hosts_api_v_2_51', 'ObjectStoreVirtualHostsApi', '2.56'), + 'OffloadsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.offloads_api_v_2_50', 'OffloadsApi', '2.56'), + 'PodReplicaLinksApi': __LazyApiLoader('pypureclient.flasharray._common.apis.pod_replica_links_api_v_2_52', 'PodReplicaLinksApi', '2.56'), + 'PodsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.pods_api_v_2_55', 'PodsApi', '2.56'), + 'PoliciesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.policies_api_v_2_54', 'PoliciesApi', '2.56'), + 'PortsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.ports_api_v_2_49', 'PortsApi', '2.56'), + 'PresetsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.presets_api_v_2_51', 'PresetsApi', '2.56'), + 'ProtectionGroupSnapshotsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.protection_group_snapshots_api_v_2_49', 'ProtectionGroupSnapshotsApi', '2.56'), + 'ProtectionGroupsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.protection_groups_api_v_2_49', 'ProtectionGroupsApi', '2.56'), + 'RealmConnectionsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.realm_connections_api_v_2_55', 'RealmConnectionsApi', '2.56'), + 'RealmsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.realms_api_v_2_55', 'RealmsApi', '2.56'), + 'RemoteArraysApi': __LazyApiLoader('pypureclient.flasharray._common.apis.remote_arrays_api_v_2_54', 'RemoteArraysApi', '2.56'), + 'RemotePodsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.remote_pods_api_v_2_50', 'RemotePodsApi', '2.56'), + 'RemoteProtectionGroupSnapshotsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.remote_protection_group_snapshots_api_v_2_49', 'RemoteProtectionGroupSnapshotsApi', '2.56'), + 'RemoteProtectionGroupsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.remote_protection_groups_api_v_2_49', 'RemoteProtectionGroupsApi', '2.56'), + 'RemoteRealmsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.remote_realms_api_v_2_50', 'RemoteRealmsApi', '2.56'), + 'RemoteVolumeSnapshotsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.remote_volume_snapshots_api_v_2_49', 'RemoteVolumeSnapshotsApi', '2.56'), + 'ResourceAccessesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.resource_accesses_api_v_2_40', 'ResourceAccessesApi', '2.56'), + 'SAML2SSOApi': __LazyApiLoader('pypureclient.flasharray._common.apis.saml2_sso_api_v_2_38', 'SAML2SSOApi', '2.56'), + 'SMISApi': __LazyApiLoader('pypureclient.flasharray._common.apis.smis_api_v_2_36', 'SMISApi', '2.56'), + 'SMTPApi': __LazyApiLoader('pypureclient.flasharray._common.apis.smtp_api_v_2_36', 'SMTPApi', '2.56'), + 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.snmp_agents_api_v_2_36', 'SNMPAgentsApi', '2.56'), + 'SNMPManagersApi': __LazyApiLoader('pypureclient.flasharray._common.apis.snmp_managers_api_v_2_49', 'SNMPManagersApi', '2.56'), + 'ServersApi': __LazyApiLoader('pypureclient.flasharray._common.apis.servers_api_v_2_55', 'ServersApi', '2.56'), + 'SessionsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.sessions_api_v_2_36', 'SessionsApi', '2.56'), + 'SoftwareApi': __LazyApiLoader('pypureclient.flasharray._common.apis.software_api_v_2_36', 'SoftwareApi', '2.56'), + 'StorageClassesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.storage_classes_api_v_2_56', 'StorageClassesApi', '2.56'), + 'SubnetsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.subnets_api_v_2_55', 'SubnetsApi', '2.56'), + 'SubscriptionAssetsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.subscription_assets_api_v_2_36', 'SubscriptionAssetsApi', '2.56'), + 'SubscriptionsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.subscriptions_api_v_2_36', 'SubscriptionsApi', '2.56'), + 'SupportApi': __LazyApiLoader('pypureclient.flasharray._common.apis.support_api_v_2_51', 'SupportApi', '2.56'), + 'SyslogApi': __LazyApiLoader('pypureclient.flasharray._common.apis.syslog_api_v_2_49', 'SyslogApi', '2.56'), + 'TopologyGroupsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.topology_groups_api_v_2_54', 'TopologyGroupsApi', '2.56'), + 'UserGroupQuotasApi': __LazyApiLoader('pypureclient.flasharray._common.apis.user_group_quotas_api_v_2_49', 'UserGroupQuotasApi', '2.56'), + 'VchostConnectionsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.vchost_connections_api_v_2_36', 'VchostConnectionsApi', '2.56'), + 'VchostsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.vchosts_api_v_2_36', 'VchostsApi', '2.56'), + 'VirtualMachinesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.virtual_machines_api_v_2_36', 'VirtualMachinesApi', '2.56'), + 'VolumeGroupsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.volume_groups_api_v_2_49', 'VolumeGroupsApi', '2.56'), + 'VolumeSnapshotsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.volume_snapshots_api_v_2_50', 'VolumeSnapshotsApi', '2.56'), + 'VolumesApi': __LazyApiLoader('pypureclient.flasharray._common.apis.volumes_api_v_2_49', 'VolumesApi', '2.56'), + 'WorkloadsApi': __LazyApiLoader('pypureclient.flasharray._common.apis.workloads_api_v_2_55', 'WorkloadsApi', '2.56'), +} + +__all__ = list(__class_apis_dict.keys()) + +def __getattr__(name, default=None): + if '_apis_list' == name: + return __class_apis_dict.keys() + if name not in __class_apis_dict: + raise AttributeError(f'module {__name__} has no attribute {name}') + return __class_apis_dict[name].load() diff --git a/pypureclient/flasharray/FA_2_56/client.py b/pypureclient/flasharray/FA_2_56/client.py new file mode 100644 index 0000000000..b09258929b --- /dev/null +++ b/pypureclient/flasharray/FA_2_56/client.py @@ -0,0 +1,72880 @@ +import json +import time +import urllib3 +import uuid +import warnings + +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +try: + from pydantic.v1 import Field, StrictBool, StrictFloat, StrictInt, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, conint, conlist, constr, validator + + +from pypureclient.reference_type import ReferenceType +from pypureclient.api_token_manager import APITokenManager +from pypureclient.exceptions import PureError +from pypureclient.keywords import Headers, Responses, Parameters +from pypureclient.properties import Property, Filter +from pypureclient.responses import ValidResponse, ErrorResponse, ApiError, ItemIterator, ResponseHeaders +from pypureclient.token_manager import TokenManager + +from pypureclient._helpers import create_api_client + +from pypureclient._transport.api_client import ApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.rest import ApiException +from pypureclient._transport.configuration import Configuration + +from . import api +from . import models + + +class Client(object): + + __REST_API_VERSION = '2.56' + + def __init__(self, + configuration: Configuration, + id_token: str = None, + private_key_file: str = None, + private_key_password: str = None, + username: str = None, + client_id: str = None, + key_id: str = None, + issuer: str = None, + api_token: str = None, + retries: int = None, + timeout: Union[int, Tuple[float, float]] = None, + user_agent: str = None, + auto_pagination_limit: int = None): + """ + Initialize a FlashArray Client. id_token is generated based on app ID and private + key info. Either id_token or api_token could be used for authentication. Only one + authentication option is allowed. + + :param configuration: configuration object + :type configuration: Configuration + + :param id_token: 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. + :type id_token: str, optional + + :param private_key_file: The path of the private key to use. Defaults to None. + :type private_key_file: str, optional + + :param private_key_password: The password of the private key. Defaults to None. + :type private_key_password: str, optional + + :param username: Username of the user the token should be issued for. This must + be a valid user in the system. + :type username: str, optional + + :param client_id: ID of API client that issued the identity token. + :type client_id: str, optional + + :param key_id: Key ID of API client that issued the identity token. + :type key_id: str, optional + + :param issuer: API client's trusted identity issuer on the array. + :type issuer: str, optional + + :param api_token: API token for the user. + :type api_token: str, optional + + :param retries: The number of times to retry an API call if it fails for a + non-blocking reason + :type retries: int, optional + + :param timeout: The timeout duration in seconds, either in total time or + (connect and read) times. Defaults to None. + :type timeout: int or (float, float), optional + + :param user_agent: User-Agent request header to use. + :type user_agent: str, optional + + :param auto_pagination_limit: GET requests will be executed in N batches if not None. + Controls the maximum number of items returned per single batch request. + Ignored if None, or `limit` parameter is used. + :type auto_pagination_limit: int, optional + + :raises PureError: If it could not create an ID or access token + """ + + if id_token and api_token: + raise PureError("Only one authentication option is allowed. Please use either id_token or api_token and try again!") + elif private_key_file and private_key_password and username and \ + key_id and client_id and issuer and api_token: + raise PureError("id_token is generated based on app ID and private key info. Please use either id_token or api_token and try again!") + elif api_token: + self._token_man = APITokenManager( + api_token=api_token, + version=Client.__REST_API_VERSION, + user_agent=user_agent, + timeout=timeout, + configuration=configuration, + ) + else: + headers = { + 'kid': key_id + } + payload = { + 'iss': issuer, + 'aud': client_id, + 'sub': username, + } + self._token_man = TokenManager(configuration=configuration, + id_token=id_token, + private_key_file=private_key_file, + private_key_password=private_key_password, + payload=payload, + headers=headers, + timeout=timeout, + user_agent=user_agent) + + self._api_client = create_api_client(configuration=configuration, user_agent=user_agent, _models_package=models) + self._set_auth_header() + + # Read timeout and retries + self._retries = retries + self._timeout = timeout + + self.__auto_pagination_limit = auto_pagination_limit + + self.__apis_instances = {} + + def __del__(self): + # Cleanup this REST API client resources + _api_client_attr = getattr(self, '_api_client', None) # using getattr to avoid raising exception, if we failed too early + if _api_client_attr: + _api_client_attr.close() + + def get_rest_version(self): + """Get the REST API version being used by this client. + + Returns: + str + + """ + return Client.__REST_API_VERSION + + def get_access_token(self, refresh=False): + """ + Get the last used access token. + + Args: + refresh (bool, optional): + Whether to retrieve a new access token. Defaults to False. + + Returns: + str + + Raises: + PureError: If there was an error retrieving an access token. + """ + return self._token_man.get_access_token(refresh) + + def delete_api_clients( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete an API client + + Deletes an API client. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('APIClientsApi', 'api256_api_clients_delete_with_http_info', kwargs) + + def get_api_clients( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List API clients + + Displays a list of API clients. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('APIClientsApi', 'api256_api_clients_get_with_http_info', kwargs) + + def patch_api_clients( + self, + api_clients: 'models.ApiClientPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Manage an API client + + Enables or disables an API client. The `ids` or `names` parameter is required, but they cannot be set together. + + :param api_clients: (required) + :type api_clients: ApiClientPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + api_clients=api_clients, + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('APIClientsApi', 'api256_api_clients_patch_with_http_info', kwargs) + + def post_api_clients( + self, + api_clients: 'models.ApiClientPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an API client + + Creates an API client. Newly created API clients are disabled by default. Enable an API client through the `PATCH` method. The `names`, `issuer`, and `public_key` parameters are required. The `access_policies` or `max_role` parameter is required, but they cannot be set together. + + :param api_clients: (required) + :type api_clients: ApiClientPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + api_clients=api_clients, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('APIClientsApi', 'api256_api_clients_post_with_http_info', kwargs) + + def delete_active_directory( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_only: Annotated[Optional[StrictBool], Field(description="If specified as `true`, only delete the Active Directory configuration on the local array, without deleting the computer account created in the Active Directory domain. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete Active Directory account + + Deletes one or more specified Active Directory accounts. + + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_only: If specified as `true`, only delete the Active Directory configuration on the + local array, without deleting the computer account created in the Active + Directory domain. If not specified, defaults to `false`. + :type local_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_only=local_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ActiveDirectoryApi', 'api256_active_directory_delete_with_http_info', kwargs) + + def get_active_directory( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List Active Directory accounts + + Displays configured Active Directory accounts. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('ActiveDirectoryApi', 'api256_active_directory_get_with_http_info', kwargs) + + def patch_active_directory( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")], + active_directory: 'models.ActiveDirectoryPatch', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify Active Directory account + + Modifies specified Active Directory account. + + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. (required) + :type names: List[str] + :param active_directory: (required) + :type active_directory: ActiveDirectoryPatch + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + active_directory=active_directory, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ActiveDirectoryApi', 'api256_active_directory_patch_with_http_info', kwargs) + + def post_active_directory( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")], + active_directory: 'models.ActiveDirectoryPost', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + join_existing_account: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the domain is searched for a pre-existing computer account to join to, and no new account will be created within the domain. The `user` specified when joining a pre-existing account must have permissions to 'read all properties from' and 'reset the password of' the pre-existing account. `join_ou` will be read from the pre-existing account and cannot be specified when joining to an existing account. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create Active Directory account + + Creates one or more Active Directory accounts. The `user` and `password` provided are used to join the array to the specified `domain`. + + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. (required) + :type names: List[str] + :param active_directory: (required) + :type active_directory: ActiveDirectoryPost + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param join_existing_account: If specified as `true`, the domain is searched for a pre-existing computer + account to join to, and no new account will be created within the domain. + The `user` specified when joining a pre-existing account must have + permissions to 'read all properties from' and 'reset the password of' the + pre-existing account. `join_ou` will be read from the pre-existing + account and cannot be specified when joining to an existing account. If + not specified, defaults to `false`. + :type join_existing_account: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + active_directory=active_directory, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + join_existing_account=join_existing_account, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ActiveDirectoryApi', 'api256_active_directory_post_with_http_info', kwargs) + + def get_active_directory_test( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET active-directory/test + + The diagnostic process that executes a series of validation tests on one or more `Active Directory` `accounts`. Each individual test verifies a specific aspect of the `configuration`, such as connectivity, authentication permissions, and service principal integrity, to ensure the environment is functioning properly. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names and ids keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names', 'ids'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'ids', 'sort'], kwargs) + return self._call_api('ActiveDirectoryApi', 'api256_active_directory_test_get_with_http_info', kwargs) + + def delete_admins_api_tokens( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete API tokens + + The operation that deletes the `API tokens` of the specified `administrators`. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('AdministratorsApi', 'api256_admins_api_tokens_delete_with_http_info', kwargs) + + def get_admins_api_tokens( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + expose_api_token: Annotated[Optional[StrictBool], Field(description="If `true`, exposes the API token of the current user.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List API tokens + + Displays API tokens for the specified administrators. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param expose_api_token: If `true`, exposes the API token of the current user. + :type expose_api_token: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + expose_api_token=expose_api_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('AdministratorsApi', 'api256_admins_api_tokens_get_with_http_info', kwargs) + + def post_admins_api_tokens( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + timeout: Annotated[Optional[StrictInt], Field(description="The duration of API token validity, in milliseconds.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create API tokens + + The operation that creates `API tokens` for the specified `administrators`. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param timeout: The duration of API token validity, in milliseconds. + :type timeout: int + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + timeout=timeout, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('AdministratorsApi', 'api256_admins_api_tokens_post_with_http_info', kwargs) + + def delete_admins_cache( + self, + remove_all_entries: Annotated[StrictBool, Field(..., description="If set to `true`, removes all entries from the administrator cache.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete cache entries + + The operation that deletes all `entries` from the `administrator cache`. + + :param remove_all_entries: If set to `true`, removes all entries from the administrator cache. (required) + :type remove_all_entries: bool + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + remove_all_entries=remove_all_entries, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('AdministratorsApi', 'api256_admins_cache_delete_with_http_info', kwargs) + + def get_admins_cache( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List administrator cache entries + + Displays entries in the administrator cache. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('AdministratorsApi', 'api256_admins_cache_get_with_http_info', kwargs) + + def put_admins_cache( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update or refresh entries in the administrator cache + + The operation that updates entries in the `cache` for `administrators` who currently do not have a `cache entry`; otherwise, it refreshes the existing entry. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('AdministratorsApi', 'api256_admins_cache_put_with_http_info', kwargs) + + def delete_admins( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete an administrator + + The operation that deletes the specified `administrator`. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('AdministratorsApi', 'api256_admins_delete_with_http_info', kwargs) + + def get_admins( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + expose_api_token: Annotated[Optional[StrictBool], Field(description="If `true`, exposes the API token of the current user.")] = None, + expose_public_key: Annotated[Optional[StrictBool], Field(description="If `true`, exposes the public key of the current user.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List administrators + + Displays a list of administrators. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param expose_api_token: If `true`, exposes the API token of the current user. + :type expose_api_token: bool + :param expose_public_key: If `true`, exposes the public key of the current user. + :type expose_public_key: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + expose_api_token=expose_api_token, + expose_public_key=expose_public_key, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('AdministratorsApi', 'api256_admins_get_with_http_info', kwargs) + + def patch_admins( + self, + admin: 'models.AdminPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify an administrator + + The operation that modifies `properties` for the specified `administrator`. + + :param admin: (required) + :type admin: AdminPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + admin=admin, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('AdministratorsApi', 'api256_admins_patch_with_http_info', kwargs) + + def delete_admins_policies_management_access( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between an administrator and one or more management access policies + + Deletes a membership between an administrator with one or more management access policies. One of `policy_ids` or `policy_names` is required, and one of `member_ids` or `member_names` is required. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('AdministratorsApi', 'api256_admins_policies_management_access_delete_with_http_info', kwargs) + + def get_admins_policies_management_access( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List management access policies attached to administrators + + Displays a list of management access policies that are attached to administrators. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('AdministratorsApi', 'api256_admins_policies_management_access_get_with_http_info', kwargs) + + def post_admins_policies_management_access( + self, + policies: 'models.PolicyAssignmentPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between an administrator with one or more management access policies. + + Creates a membership between an administrator with one or more management access policies. One of `member_ids` or `member_names` parameter is required. + + :param policies: (required) + :type policies: PolicyAssignmentPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('AdministratorsApi', 'api256_admins_policies_management_access_post_with_http_info', kwargs) + + def post_admins( + self, + admin: 'models.AdminPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an administrator + + The operation that creates an `administrator`. + + :param admin: (required) + :type admin: AdminPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + admin=admin, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('AdministratorsApi', 'api256_admins_post_with_http_info', kwargs) + + def get_admins_settings( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List administrator settings + + Displays the global administrator settings for the array. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('AdministratorsApi', 'api256_admins_settings_get_with_http_info', kwargs) + + def patch_admins_settings( + self, + admin_settings: 'models.AdminSettings', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify administrator settings + + Modifies the global administrator settings for the array. + + :param admin_settings: (required) + :type admin_settings: AdminSettings + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + admin_settings=admin_settings, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('AdministratorsApi', 'api256_admins_settings_patch_with_http_info', kwargs) + + def delete_alert_watchers( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete alert watcher + + Delete alert watcher email address from the list of alert watchers. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('AlertWatchersApi', 'api256_alert_watchers_delete_with_http_info', kwargs) + + def get_alert_watchers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List alert watchers + + Displays alert watcher email addressess and indicates whether they are `enabled`. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('AlertWatchersApi', 'api256_alert_watchers_get_with_http_info', kwargs) + + def patch_alert_watchers( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + alert_watcher: 'models.AlertWatcherPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify alert watcher + + Modify alert watcher email address by enabling or disabling it. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param alert_watcher: (required) + :type alert_watcher: AlertWatcherPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + alert_watcher=alert_watcher, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('AlertWatchersApi', 'api256_alert_watchers_patch_with_http_info', kwargs) + + def post_alert_watchers( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + alert_watcher: Optional['models.AlertWatcherPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create alert watcher + + Creates one or more alert watcher email addresses, adding them to the list of alert watchers. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param alert_watcher: + :type alert_watcher: AlertWatcherPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + alert_watcher=alert_watcher, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('AlertWatchersApi', 'api256_alert_watchers_post_with_http_info', kwargs) + + def get_alert_watchers_test( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List alert watcher test + + Displays alert watcher email test results. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('AlertWatchersApi', 'api256_alert_watchers_test_get_with_http_info', kwargs) + + def get_alerts_events( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + flagged: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only flagged messages. If set to `false`, lists only unflagged messages. if not specified, lists all messages.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format. The `ids` or `names` parameter is required, but they cannot be set together.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format. The `ids` or `names` parameter is required, but they cannot be set together.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List alert events + + Displays a list of alert events. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param flagged: If set to `true`, lists only flagged messages. If set to `false`, lists only + unflagged messages. if not specified, lists all messages. + :type flagged: bool + :param ids: Performs the operation on the unique resource IDs specified. Enter multiple + resource IDs in comma-separated format. The `ids` or `names` parameter is + required, but they cannot be set together. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. The `ids` or `names` + parameter is required, but they cannot be set together. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + flagged=flagged, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('AlertsApi', 'api256_alerts_events_get_with_http_info', kwargs) + + def get_alerts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + flagged: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only flagged messages. If set to `false`, lists only unflagged messages. if not specified, lists all messages.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List alerts + + Displays a list of alerts. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param flagged: If set to `true`, lists only flagged messages. If set to `false`, lists only + unflagged messages. if not specified, lists all messages. + :type flagged: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + flagged=flagged, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('AlertsApi', 'api256_alerts_get_with_http_info', kwargs) + + def patch_alerts( + self, + alert: 'models.Alert', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify flagged state + + Modifies one or more alerts and display updated information about these alerts. + + :param alert: (required) + :type alert: Alert + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + alert=alert, + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('AlertsApi', 'api256_alerts_patch_with_http_info', kwargs) + + def get_alerts_rules_catalog( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + code: Annotated[Optional[StrictInt], Field(description="The alert code to display.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List available customizable alert codes + + Displays a list of available customizable alert codes. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param code: The alert code to display. + :type code: int + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + code=code, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('AlertsApi', 'api256_alerts_rules_catalog_get_with_http_info', kwargs) + + def delete_alerts_rules( + self, + code: Annotated[StrictInt, Field(..., description="The alert code that the rule applies to. Available alert codes for customization can be found in the alert rules catalog.")], + parameter: Annotated[StrictStr, Field(..., description="The parameter of the custom alert rule to modify. Values include `info` and `warning`. Available parameter values can be found in the alert rules catalog.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a custom alert rule + + Deletes a custom alert rule. + + :param code: The alert code that the rule applies to. Available alert codes for customization + can be found in the alert rules catalog. (required) + :type code: int + :param parameter: The parameter of the custom alert rule to modify. Values include `info` and + `warning`. Available parameter values can be found in the alert rules + catalog. (required) + :type parameter: str + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + code=code, + parameter=parameter, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('AlertsApi', 'api256_alerts_rules_delete_with_http_info', kwargs) + + def get_alerts_rules( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + code: Annotated[Optional[StrictInt], Field(description="The alert code to display.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List custom alert rules + + Displays a list of custom alert rules. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param code: The alert code to display. + :type code: int + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + code=code, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('AlertsApi', 'api256_alerts_rules_get_with_http_info', kwargs) + + def patch_alerts_rules( + self, + code: Annotated[StrictInt, Field(..., description="The alert code that the rule applies to. Available alert codes for customization can be found in the alert rules catalog.")], + parameter: Annotated[StrictStr, Field(..., description="The parameter of the custom alert rule to modify. Values include `info` and `warning`. Available parameter values can be found in the alert rules catalog.")], + alert_rule: 'models.AlertRules', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a custom alert rule + + Modifies a custom alert rule to a new value. + + :param code: The alert code that the rule applies to. Available alert codes for customization + can be found in the alert rules catalog. (required) + :type code: int + :param parameter: The parameter of the custom alert rule to modify. Values include `info` and + `warning`. Available parameter values can be found in the alert rules + catalog. (required) + :type parameter: str + :param alert_rule: (required) + :type alert_rule: AlertRules + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + code=code, + parameter=parameter, + alert_rule=alert_rule, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('AlertsApi', 'api256_alerts_rules_patch_with_http_info', kwargs) + + def post_alerts_rules( + self, + code: Annotated[StrictInt, Field(..., description="The alert code that the rule applies to. Available alert codes for customization can be found in the alert rules catalog.")], + parameter: Annotated[StrictStr, Field(..., description="The parameter of the custom alert rule to modify. Values include `info` and `warning`. Available parameter values can be found in the alert rules catalog.")], + alert_rule: 'models.AlertRules', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a custom alert rule + + Creates an alert rule with a custom value. + + :param code: The alert code that the rule applies to. Available alert codes for customization + can be found in the alert rules catalog. (required) + :type code: int + :param parameter: The parameter of the custom alert rule to modify. Values include `info` and + `warning`. Available parameter values can be found in the alert rules + catalog. (required) + :type parameter: str + :param alert_rule: (required) + :type alert_rule: AlertRules + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + code=code, + parameter=parameter, + alert_rule=alert_rule, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('AlertsApi', 'api256_alerts_rules_post_with_http_info', kwargs) + + def get_apps( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List apps + + Displays a list of installed apps. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('AppsApi', 'api256_apps_get_with_http_info', kwargs) + + def get_apps_nodes( + self, + apps: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + app_names: Annotated[Optional[conlist(StrictStr)], Field(description="The name of the installed app. Enter multiple names in comma-separated format.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List app nodes + + Displays a list of installed apps and their nodes. + + :param apps: A list of apps to query for. Overrides app_names keyword argument. + :type apps: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param app_names: The name of the installed app. Enter multiple names in comma-separated format. + :type app_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + app_names=app_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(apps, ['app_names'], kwargs) + _fixup_list_type_params(['app_names', 'sort'], kwargs) + return self._call_api('AppsApi', 'api256_apps_nodes_get_with_http_info', kwargs) + + def patch_apps( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + app: 'models.App', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify app + + Modifies an installed app or modifies Virtual Network Computing (VNC) access for apps that are being patched. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param app: (required) + :type app: App + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + app=app, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('AppsApi', 'api256_apps_patch_with_http_info', kwargs) + + def get_array_connections_connection_key( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + encrypted: Annotated[Optional[StrictBool], Field(description="If `true`, the returned array connection key will encode an encryption key used to establish trust and secure replication traffic. If `false`, the returned array connection key will not encode an encryption key. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List connection key + + Displays the connection key for the array. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param encrypted: If `true`, the returned array connection key will encode an encryption key used + to establish trust and secure replication traffic. If `false`, the returned + array connection key will not encode an encryption key. If not specified, + defaults to `false`. + :type encrypted: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + encrypted=encrypted, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('ArrayConnectionsApi', 'api256_array_connections_connection_key_get_with_http_info', kwargs) + + def delete_array_connections( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete an array connection + + Deletes the connection between this array and the specified array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ArrayConnectionsApi', 'api256_array_connections_delete_with_http_info', kwargs) + + def get_array_connections( + self, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote array IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote array names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_ids` query parameter.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List the connected arrays + + Displays a list of connected arrays. + + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param remote_ids: A comma-separated list of remote array IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_names` query + parameter. + :type remote_ids: List[str] + :param remote_names: A comma-separated list of remote array names. If, after filtering, there is not + at least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_ids` query + parameter. + :type remote_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'remote_ids', 'remote_names', 'sort'], kwargs) + return self._call_api('ArrayConnectionsApi', 'api256_array_connections_get_with_http_info', kwargs) + + def patch_array_connections( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + refresh: Annotated[Optional[StrictBool], Field(description="If set to `true`, the array will attempt to communicate with the connection peer in order to update the connection attributes on both arrays with any changes that have occurred. If set to `true`, other array connection attributes may not be modified in requests. Default value is `false`.")] = None, + renew_encryption_key: Annotated[Optional[StrictBool], Field(description="If set to `true`, update array connection with a new encryption key. If set to `true`, other array connection attributes may not be modified in requests. Defaults to `false`.")] = None, + array_connection: Optional['models.ArrayConnectionPatch'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify an array connection + + Modifies attributes for an array connection. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param refresh: If set to `true`, the array will attempt to communicate with the connection peer + in order to update the connection attributes on both arrays with any changes + that have occurred. If set to `true`, other array connection attributes may + not be modified in requests. Default value is `false`. + :type refresh: bool + :param renew_encryption_key: If set to `true`, update array connection with a new encryption key. If set to + `true`, other array connection attributes may not be modified in + requests. Defaults to `false`. + :type renew_encryption_key: bool + :param array_connection: + :type array_connection: ArrayConnectionPatch + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + refresh=refresh, + renew_encryption_key=renew_encryption_key, + array_connection=array_connection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ArrayConnectionsApi', 'api256_array_connections_patch_with_http_info', kwargs) + + def get_array_connections_path( + self, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote array IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote array names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_ids` query parameter.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List connection path + + Displays the connection path from the array to which the connection was made. + + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param remote_ids: A comma-separated list of remote array IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_names` query + parameter. + :type remote_ids: List[str] + :param remote_names: A comma-separated list of remote array names. If, after filtering, there is not + at least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_ids` query + parameter. + :type remote_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'remote_ids', 'remote_names', 'sort'], kwargs) + return self._call_api('ArrayConnectionsApi', 'api256_array_connections_path_get_with_http_info', kwargs) + + def post_array_connections( + self, + array_connection: 'models.ArrayConnectionPost', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an array connection + + Creates a connection between this array and the specified array. + + :param array_connection: (required) + :type array_connection: ArrayConnectionPost + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + array_connection=array_connection, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('ArrayConnectionsApi', 'api256_array_connections_post_with_http_info', kwargs) + + def get_arrays_cache( + self, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DIMM Cache status + + The status of the DIMM cache. + + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + end_time=end_time, + resolution=resolution, + start_time=start_time, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_cache_get_with_http_info', kwargs) + + def get_arrays_cloud_capacity( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List CBS array capacity status + + Displays the capacity status of the CBS array including the progress of the capacity update. Requests for non-CBS arrays will receive an error response. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_cloud_capacity_get_with_http_info', kwargs) + + def patch_arrays_cloud_capacity( + self, + capacity: Annotated['models.CloudCapacityStatus', Field(..., description="The requested capacity of the CBS array.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify CBS array capacity + + Modifies the raw capacity of the CBS array. This should trigger a backend process that will update the CBS array capacity. The array capacity can be updated only to values defined by the capacity steps endpoint. When an existing capacity update request is in progress, any new request to update of the capacity will receive an error response. For non-CBS arrays, this feature is not supported and requests will receive an error response. + + :param capacity: The requested capacity of the CBS array. (required) + :type capacity: CloudCapacityStatus + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + capacity=capacity, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_cloud_capacity_patch_with_http_info', kwargs) + + def get_arrays_cloud_capacity_supported_steps( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List CBS array capacity steps + + Displays the list of supported raw capacity sizes in bytes the CBS array can be upgraded to. Requests for non-CBS arrays will receive an error response. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_cloud_capacity_supported_steps_get_with_http_info', kwargs) + + def get_arrays_cloud_config( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List CBS array configuration status + + Displays the configuration status of the CBS array, including the progress of the configuration upgrade. Requests for non-CBS arrays will receive an error response. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_cloud_config_get_with_http_info', kwargs) + + def patch_arrays_cloud_config( + self, + config: Annotated['models.CloudConfigPatch', Field(..., description="The requested configuration of the CBS array hardware.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify CBS array configuration + + Modifies the configuration of the CBS array. This should trigger a backend process that will upgrade the CBS array configuration. The array can be upgraded only to models defined by the supported configurations endpoint. When an existing array upgrade request is in progress, any new request to upgrade the array will receive an error response. For non-CBS arrays, this feature is not supported and requests will receive an error response. + + :param config: The requested configuration of the CBS array hardware. (required) + :type config: CloudConfigPatch + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + config=config, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_cloud_config_patch_with_http_info', kwargs) + + def get_arrays_cloud_config_supported_configs( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List CBS array supported upgrade target configs + + Displays the list of supported configurations to which the CBS array can be upgraded. Requests for non-CBS arrays will receive an error response. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_cloud_config_supported_configs_get_with_http_info', kwargs) + + def put_arrays_cloud_provider_tags_batch( + self, + tag: Annotated[conlist('models.CloudProviderTag', max_items=50, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if already existing, updated.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update user tags on the cloud. + + Updates users tags to deployed cloud resources of a CBS array. + + :param tag: A list of tags to be created or, if already existing, updated. (required) + :type tag: List[CloudProviderTag] + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['tag'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_cloud_provider_tags_batch_put_with_http_info', kwargs) + + def delete_arrays_cloud_provider_tags( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete user tags from the cloud. + + Deletes user tags from deployed cloud resources of a CBS array. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + keys=keys, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['keys'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_cloud_provider_tags_delete_with_http_info', kwargs) + + def get_arrays_cloud_provider_tags( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List user tags on the cloud. + + Displays the list of user tags on deployed cloud resources of a CBS array. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_cloud_provider_tags_get_with_http_info', kwargs) + + def delete_arrays( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + eradicate_all_data: Annotated[Optional[StrictBool], Field(description="Set to `true` to perform a factory reset.")] = None, + factory_reset_token: Annotated[Optional[StrictInt], Field(description="A token required to perform a factory reset.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete an array + + Deletes an array. For physical appliances, deleting an array restores the hardware to factory settings. This entails deleting all data, metadata, configuration, and logs. The array returns to the state it was in prior to any configuration changes being made. If the hardware is reused, it must be as a different array with a new ID. For virtual appliances, deleting an array puts it into an unusable state. Virtual resources (e.g., virtual machines) can later be freed, which deletes any remaining data, metadata, configuration, and logs. Prior to factory reset, an array must be manually prepared (e.g., all volumes and snapshots must be eradicated) and a factory reset token must be created. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param eradicate_all_data: Set to `true` to perform a factory reset. + :type eradicate_all_data: bool + :param factory_reset_token: A token required to perform a factory reset. + :type factory_reset_token: int + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + eradicate_all_data=eradicate_all_data, + factory_reset_token=factory_reset_token, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_delete_with_http_info', kwargs) + + def delete_arrays_erasures( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete factory reset + + Deletes the factory reset process when it is `failed`. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_erasures_delete_with_http_info', kwargs) + + def get_arrays_erasures( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List factory reset details + + Displays a list of factory reset processes. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_erasures_get_with_http_info', kwargs) + + def patch_arrays_erasures( + self, + delete_sanitization_certificate: Annotated[StrictBool, Field(..., description="Set to `true` to finalize factory reset and acknowledge the deletion of sanitization certificate.")], + eradicate_all_data: Annotated[StrictBool, Field(..., description="Set to `true` to perform a factory reset.")], + finalize: Annotated[StrictBool, Field(..., description="Must be `true` to finalize factory reset.")], + reinstall_image: Annotated[StrictBool, Field(..., description="Set to `true` to reinstall image, or `false` to skip reinstalling image.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + erasure_patch: Optional['models.ArrayErasurePatch'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update factory reset + + Modifies the factory reset process to finalize. + + :param delete_sanitization_certificate: Set to `true` to finalize factory reset and acknowledge the deletion of + sanitization certificate. (required) + :type delete_sanitization_certificate: bool + :param eradicate_all_data: Set to `true` to perform a factory reset. (required) + :type eradicate_all_data: bool + :param finalize: Must be `true` to finalize factory reset. (required) + :type finalize: bool + :param reinstall_image: Set to `true` to reinstall image, or `false` to skip reinstalling image. + (required) + :type reinstall_image: bool + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param erasure_patch: + :type erasure_patch: ArrayErasurePatch + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + delete_sanitization_certificate=delete_sanitization_certificate, + eradicate_all_data=eradicate_all_data, + finalize=finalize, + reinstall_image=reinstall_image, + authorization=authorization, + x_request_id=x_request_id, + erasure_patch=erasure_patch, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_erasures_patch_with_http_info', kwargs) + + def post_arrays_erasures( + self, + eradicate_all_data: Annotated[StrictBool, Field(..., description="Set to `true` to perform a factory reset.")], + preserve_configuration_data: Annotated[conlist(StrictStr), Field(..., description="A comma-separated list of configuration data types to preserve. A value of `all` will preserve all configuration data types. Valid values include `all`.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + skip_phonehome_check: Annotated[Optional[StrictBool], Field(description="A flag to skip phonehome connectivity check. If `skip_phonehome_check` is not set, the factory reset will fail if phonehome connectivity check fails. Arrays that intentionally disable phonehome or do not permit connectivity to Pure Storage's cloud servers must set this flag to `true` in order to start factory reset.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a process for factory reset + + Creates the initiation of the factory reset process + + :param eradicate_all_data: Set to `true` to perform a factory reset. (required) + :type eradicate_all_data: bool + :param preserve_configuration_data: A comma-separated list of configuration data types to preserve. A value of `all` + will preserve all configuration data types. Valid values include `all`. + (required) + :type preserve_configuration_data: List[str] + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param skip_phonehome_check: A flag to skip phonehome connectivity check. If `skip_phonehome_check` is not + set, the factory reset will fail if phonehome connectivity check fails. + Arrays that intentionally disable phonehome or do not permit connectivity + to Pure Storage's cloud servers must set this flag to `true` in order to + start factory reset. + :type skip_phonehome_check: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + eradicate_all_data=eradicate_all_data, + preserve_configuration_data=preserve_configuration_data, + authorization=authorization, + x_request_id=x_request_id, + skip_phonehome_check=skip_phonehome_check, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['preserve_configuration_data'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_erasures_post_with_http_info', kwargs) + + def get_arrays_eula( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List End User Agreement and signature + + Displays the End User Agreement and signature. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_eula_get_with_http_info', kwargs) + + def patch_arrays_eula( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + eula: Optional['models.Eula'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify signature on the End User Agreement + + Modifies the signature on the End User Agreement. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param eula: + :type eula: Eula + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + eula=eula, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_eula_patch_with_http_info', kwargs) + + def delete_arrays_factory_reset_token( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a factory reset token + + Deletes an existing token that could be used to perform a factory reset on the array. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_factory_reset_token_delete_with_http_info', kwargs) + + def get_arrays_factory_reset_token( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List factory reset tokens + + Displays a list of tokens used to perform a factory reset on the array. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_factory_reset_token_get_with_http_info', kwargs) + + def post_arrays_factory_reset_token( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a factory reset token + + Creates a token that can be used to perform a factory reset on the array. Factory reset tokens can only be created after the array has been prepared for reset (e.g., all volumes and snapshots must first be eradicated). After a token has been created, operations that would take the array out of the prepared state are disabled (e.g., creating volumes) until all tokens have been deleted. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_factory_reset_token_post_with_http_info', kwargs) + + def get_arrays( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List arrays + + Displays general array properties including the array name, login banner, idle timeout for management sessions, and NTP servers. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_get_with_http_info', kwargs) + + def get_arrays_ntp_test( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List NTP test results + + Displays test results for configured NTP servers. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_ntp_test_get_with_http_info', kwargs) + + def patch_arrays( + self, + array: 'models.Arrays', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify an array + + Modifies general array properties such as the array name, login banner, idle timeout for management sessions, and NTP servers. + + :param array: (required) + :type array: Arrays + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + array=array, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_patch_with_http_info', kwargs) + + def get_arrays_performance_by_link( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List array front-end IO performance data by link + + Displays real-time and historical front-end performance data at the array level including latency, bandwidth, IOPS, average I/O size, and queue depth. Group output is shown by link. A link represents a set of arrays that an I/O operation depends on. For local-only I/Os, this is a local array. For mirrored I/Os, this is a set of synchronous replication peer arrays. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_performance_by_link_get_with_http_info', kwargs) + + def get_arrays_performance( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`.")] = None, + protocol_group: Annotated[Optional[StrictStr], Field(description="Protocol group type. Valid values are `block`, `file`, `object-store`, and `all`.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List array front-end performance data + + Displays real-time and historical front-end performance data at the array level including latency, bandwidth, IOPS, average I/O size, and queue depth. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`. + :type protocol: str + :param protocol_group: Protocol group type. Valid values are `block`, `file`, `object-store`, and + `all`. + :type protocol_group: str + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + protocol=protocol, + protocol_group=protocol_group, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_performance_get_with_http_info', kwargs) + + def get_arrays_space( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List array space information + + Displays real-time and historical array space information including unique volume and snapshot space, shared space, data reduction, provisioned capacity, usable capacity, and parity. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_space_get_with_http_info', kwargs) + + def put_arrays_tags( + self, + tag: Annotated[conlist('models.NonCopyableTag', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if they already exist, updated.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags. + + :param tag: A list of tags to be created or, if they already exist, updated. (required) + :type tag: List[NonCopyableTag] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_tags_batch_put_with_http_info', kwargs) + + def delete_arrays_tags( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags on array objects. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_tags_delete_with_http_info', kwargs) + + def get_arrays_tags( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags on array objects. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'sort'], kwargs) + return self._call_api('ArraysApi', 'api256_arrays_tags_get_with_http_info', kwargs) + + def get_audits( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List audits + + Displays a list of audits. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('AuditsApi', 'api256_audits_get_with_http_info', kwargs) + + def delete_buckets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE buckets + + Delete object store buckets. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('BucketsApi', 'api256_buckets_delete_with_http_info', kwargs) + + def get_buckets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET buckets + + List object store bucket attributes such as creation time and space usage. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('BucketsApi', 'api256_buckets_get_with_http_info', kwargs) + + def patch_buckets( + self, + bucket: 'models.BucketPatchBase', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """PATCH buckets + + Modify object store bucket attributes such as destroyed and versioning. + + :param bucket: (required) + :type bucket: BucketPatchBase + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + bucket=bucket, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('BucketsApi', 'api256_buckets_patch_with_http_info', kwargs) + + def get_buckets_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List bucket performance data + + The monitoring interface that provides real-time and historical performance data, including `latency` and average `I/O` sizes. These metrics are available for each individual `bucket` and as an aggregate total for all buckets across the entire `array`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('BucketsApi', 'api256_buckets_performance_get_with_http_info', kwargs) + + def post_buckets( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + bucket: 'models.BucketPostBase', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST buckets + + Create a new object store bucket. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param bucket: (required) + :type bucket: BucketPostBase + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + bucket=bucket, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('BucketsApi', 'api256_buckets_post_with_http_info', kwargs) + + def get_buckets_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List bucket space information + + The monitoring interface or dataset that provides `physical storage` `consumption` data for each individual `bucket`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('BucketsApi', 'api256_buckets_space_get_with_http_info', kwargs) + + def delete_certificate_groups_certificates( + self, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificate_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If no resource matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete certificate-groups or certificates + + Deletes one or more certificate groups. + + :param certificates: A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + :type certificates: ReferenceType or List[ReferenceType], optional + :param certificate_groups: A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + :type certificate_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one + resource that matches each of the elements of `certificate_group_ids`, + then an error is returned. This cannot be provided in conjunction with + the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If no resource matches each + of the elements of `certificate_group_names`, then an error is returned. + This cannot be provided in conjunction with the `certificate_group_ids` + parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource + that matches each of the elements of `certificate_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_ids=certificate_ids, + certificate_names=certificate_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _fixup_list_type_params(['certificate_group_ids', 'certificate_group_names', 'certificate_ids', 'certificate_names'], kwargs) + return self._call_api('CertificateGroupsApi', 'api256_certificate_groups_certificates_delete_with_http_info', kwargs) + + def get_certificate_groups_certificates( + self, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificate_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If no resource matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List certificate-groups and certificates + + Lists membership associations between groups and certificates on the array. + + :param certificates: A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + :type certificates: ReferenceType or List[ReferenceType], optional + :param certificate_groups: A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + :type certificate_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one + resource that matches each of the elements of `certificate_group_ids`, + then an error is returned. This cannot be provided in conjunction with + the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If no resource matches each + of the elements of `certificate_group_names`, then an error is returned. + This cannot be provided in conjunction with the `certificate_group_ids` + parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource + that matches each of the elements of `certificate_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_ids=certificate_ids, + certificate_names=certificate_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _fixup_list_type_params(['certificate_group_ids', 'certificate_group_names', 'certificate_ids', 'certificate_names', 'sort'], kwargs) + return self._call_api('CertificateGroupsApi', 'api256_certificate_groups_certificates_get_with_http_info', kwargs) + + def post_certificate_groups_certificates( + self, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificate_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If no resource matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create certificate-groups/certificates + + Creates one or more certificates to one or more certificate groups on the array. + + :param certificates: A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + :type certificates: ReferenceType or List[ReferenceType], optional + :param certificate_groups: A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + :type certificate_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one + resource that matches each of the elements of `certificate_group_ids`, + then an error is returned. This cannot be provided in conjunction with + the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If no resource matches each + of the elements of `certificate_group_names`, then an error is returned. + This cannot be provided in conjunction with the `certificate_group_ids` + parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource + that matches each of the elements of `certificate_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_ids=certificate_ids, + certificate_names=certificate_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _fixup_list_type_params(['certificate_group_ids', 'certificate_group_names', 'certificate_ids', 'certificate_names'], kwargs) + return self._call_api('CertificateGroupsApi', 'api256_certificate_groups_certificates_post_with_http_info', kwargs) + + def delete_certificate_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete certificate-groups + + Deletes one or more certificate groups from the array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('CertificateGroupsApi', 'api256_certificate_groups_delete_with_http_info', kwargs) + + def get_certificate_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List certificate-groups + + Display all array certificate groups. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('CertificateGroupsApi', 'api256_certificate_groups_get_with_http_info', kwargs) + + def post_certificate_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create certificate-groups + + Creates one or more certificate groups on the array. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('CertificateGroupsApi', 'api256_certificate_groups_post_with_http_info', kwargs) + + def get_certificate_groups_uses( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List certificate-groups/uses + + Lists how certificate groups are being used and by what. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('CertificateGroupsApi', 'api256_certificate_groups_uses_get_with_http_info', kwargs) + + def delete_certificates_certificate_groups( + self, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificate_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If no resource matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Deletes certificates/certificate-groups + + Deletes one or more certificates from one or more certificate groups. + + :param certificates: A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + :type certificates: ReferenceType or List[ReferenceType], optional + :param certificate_groups: A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + :type certificate_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one + resource that matches each of the elements of `certificate_group_ids`, + then an error is returned. This cannot be provided in conjunction with + the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If no resource matches each + of the elements of `certificate_group_names`, then an error is returned. + This cannot be provided in conjunction with the `certificate_group_ids` + parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource + that matches each of the elements of `certificate_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_ids=certificate_ids, + certificate_names=certificate_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _fixup_list_type_params(['certificate_group_ids', 'certificate_group_names', 'certificate_ids', 'certificate_names'], kwargs) + return self._call_api('CertificatesApi', 'api256_certificates_certificate_groups_delete_with_http_info', kwargs) + + def get_certificates_certificate_groups( + self, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificate_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If no resource matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List certificates and certificate-groups + + Lists membership associations between groups and certificates. + + :param certificates: A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + :type certificates: ReferenceType or List[ReferenceType], optional + :param certificate_groups: A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + :type certificate_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one + resource that matches each of the elements of `certificate_group_ids`, + then an error is returned. This cannot be provided in conjunction with + the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If no resource matches each + of the elements of `certificate_group_names`, then an error is returned. + This cannot be provided in conjunction with the `certificate_group_ids` + parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource + that matches each of the elements of `certificate_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_ids=certificate_ids, + certificate_names=certificate_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _fixup_list_type_params(['certificate_group_ids', 'certificate_group_names', 'certificate_ids', 'certificate_names', 'sort'], kwargs) + return self._call_api('CertificatesApi', 'api256_certificates_certificate_groups_get_with_http_info', kwargs) + + def post_certificates_certificate_groups( + self, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificate_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If no resource matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create certificates orcertificate-groups + + Creates one or more certificates to one or more certificate groups. + + :param certificates: A list of certificates to query for. Overrides certificate_ids and certificate_names keyword arguments. + :type certificates: ReferenceType or List[ReferenceType], optional + :param certificate_groups: A list of certificate_groups to query for. Overrides certificate_group_ids and certificate_group_names keyword arguments. + :type certificate_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one + resource that matches each of the elements of `certificate_group_ids`, + then an error is returned. This cannot be provided in conjunction with + the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If no resource matches each + of the elements of `certificate_group_names`, then an error is returned. + This cannot be provided in conjunction with the `certificate_group_ids` + parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource + that matches each of the elements of `certificate_ids`, then an error is + returned. This cannot be provided in conjunction with the + `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_group_ids=certificate_group_ids, + certificate_group_names=certificate_group_names, + certificate_ids=certificate_ids, + certificate_names=certificate_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificate_groups, ['certificate_group_ids', 'certificate_group_names'], kwargs) + _process_references(certificates, ['certificate_ids', 'certificate_names'], kwargs) + _fixup_list_type_params(['certificate_group_ids', 'certificate_group_names', 'certificate_ids', 'certificate_names'], kwargs) + return self._call_api('CertificatesApi', 'api256_certificates_certificate_groups_post_with_http_info', kwargs) + + def post_certificates_certificate_signing_requests( + self, + certificate: 'models.CertificateSigningRequestPost', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create certificate-signing-requests + + Creates a certificate signing request using a specified certificate and parameters. + + :param certificate: (required) + :type certificate: CertificateSigningRequestPost + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + certificate=certificate, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('CertificatesApi', 'api256_certificates_certificate_signing_requests_post_with_http_info', kwargs) + + def delete_certificates( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete certificate + + Deletes a specific certificate object. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('CertificatesApi', 'api256_certificates_delete_with_http_info', kwargs) + + def get_certificates( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List certificate attributes + + Displays certificate attributes. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('CertificatesApi', 'api256_certificates_get_with_http_info', kwargs) + + def patch_certificates( + self, + certificate: 'models.CertificatePost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + generate_new_key: Annotated[Optional[StrictBool], Field(description="If set to `true`, a new private key is generated when generating a new certificate with the specified attributes. This may not be set to `true` when importing a certificate and private key, and may not be set to `false` when generating a new self-signed certificate to replace a certificate that was imported. Default setting is `false`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify certificates + + Modifies certificate attributes. Modifying self-signed certificate attributes replaces the existing certificate with a new one, generated by Purity//FA, using the specified attributes. + + :param certificate: (required) + :type certificate: CertificatePost + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param generate_new_key: If set to `true`, a new private key is generated when generating a new + certificate with the specified attributes. This may not be set to `true` + when importing a certificate and private key, and may not be set to + `false` when generating a new self-signed certificate to replace a + certificate that was imported. Default setting is `false`. + :type generate_new_key: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + certificate=certificate, + authorization=authorization, + x_request_id=x_request_id, + generate_new_key=generate_new_key, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('CertificatesApi', 'api256_certificates_patch_with_http_info', kwargs) + + def post_certificates( + self, + certificate: 'models.CertificatePost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create certificate + + Creates a certificate object and specifies the valid time period and organization details of the certificate. A certificate can be imported or manually configured. + + :param certificate: (required) + :type certificate: CertificatePost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + certificate=certificate, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('CertificatesApi', 'api256_certificates_post_with_http_info', kwargs) + + def get_certificates_uses( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List certificates uses + + Displays the usage and associations of certificates. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('CertificatesApi', 'api256_certificates_uses_get_with_http_info', kwargs) + + def delete_connections( + self, + volumes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + hosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + host_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + host_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the host group specified. Enter multiple names in comma-separated format. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple host group names and volume names; instead, at least one of the objects (e.g., `host_group_names`) must be set to only one name (e.g., `hgroup01`).")] = None, + host_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the hosts specified. Enter multiple names in comma-separated format. For example, `host01,host02`. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple host names and volume names; instead, at least one of the objects (e.g., `host_names`) must be set to only one name (e.g., `host01`).")] = None, + volume_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified volume. Enter multiple ids in comma-separated format. For example, `vol01id,vol02id`. A request cannot include a mix of multiple objects with multiple IDs. For example, a request cannot include a mix of multiple volume IDs and host names; instead, at least one of the objects (e.g., `volume_ids`) must be set to only one name (e.g., `vol01id`). Only one of the two between `volume_names` and `volume_ids` may be used at a time.")] = None, + volume_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the volume specified. Enter multiple names in comma-separated format. For example, `vol01,vol02`. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple volume names and host names; instead, at least one of the objects (e.g., `volume_names`) must be set to only one name (e.g., `vol01`).")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a connection between a volume and its host or host group + + Deletes the connection between a volume and its associated host or host group. One of `volume_names` or `volume_ids` and one of `host_names` or `host_group_names` query parameters are required. + + :param volumes: A list of volumes to query for. Overrides volume_ids and volume_names keyword arguments. + :type volumes: ReferenceType or List[ReferenceType], optional + :param hosts: A list of hosts to query for. Overrides host_names keyword argument. + :type hosts: ReferenceType or List[ReferenceType], optional + :param host_groups: A list of host_groups to query for. Overrides host_group_names keyword argument. + :type host_groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param host_group_names: Performs the operation on the host group specified. Enter multiple names in + comma-separated format. A request cannot include a mix of multiple objects + with multiple names. For example, a request cannot include a mix of + multiple host group names and volume names; instead, at least one of the + objects (e.g., `host_group_names`) must be set to only one name (e.g., + `hgroup01`). + :type host_group_names: List[str] + :param host_names: Performs the operation on the hosts specified. Enter multiple names in comma- + separated format. For example, `host01,host02`. A request cannot include a + mix of multiple objects with multiple names. For example, a request cannot + include a mix of multiple host names and volume names; instead, at least one + of the objects (e.g., `host_names`) must be set to only one name (e.g., + `host01`). + :type host_names: List[str] + :param volume_ids: Performs the operation on the specified volume. Enter multiple ids in comma- + separated format. For example, `vol01id,vol02id`. A request cannot include a + mix of multiple objects with multiple IDs. For example, a request cannot + include a mix of multiple volume IDs and host names; instead, at least one + of the objects (e.g., `volume_ids`) must be set to only one name (e.g., + `vol01id`). Only one of the two between `volume_names` and `volume_ids` may + be used at a time. + :type volume_ids: List[str] + :param volume_names: Performs the operation on the volume specified. Enter multiple names in comma- + separated format. For example, `vol01,vol02`. A request cannot include a + mix of multiple objects with multiple names. For example, a request cannot + include a mix of multiple volume names and host names; instead, at least + one of the objects (e.g., `volume_names`) must be set to only one name + (e.g., `vol01`). + :type volume_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + host_group_names=host_group_names, + host_names=host_names, + volume_ids=volume_ids, + volume_names=volume_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(host_groups, ['host_group_names'], kwargs) + _process_references(hosts, ['host_names'], kwargs) + _process_references(volumes, ['volume_ids', 'volume_names'], kwargs) + _fixup_list_type_params(['context_names', 'host_group_names', 'host_names', 'volume_ids', 'volume_names'], kwargs) + return self._call_api('ConnectionsApi', 'api256_connections_delete_with_http_info', kwargs) + + def get_connections( + self, + volumes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + protocol_endpoints: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + hosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + host_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + host_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the host group specified. Enter multiple names in comma-separated format. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple host group names and volume names; instead, at least one of the objects (e.g., `host_group_names`) must be set to only one name (e.g., `hgroup01`).")] = None, + host_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the hosts specified. Enter multiple names in comma-separated format. For example, `host01,host02`. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple host names and volume names; instead, at least one of the objects (e.g., `host_names`) must be set to only one name (e.g., `host01`).")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol_endpoint_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the protocol endpoints specified. Enter multiple IDs in comma-separated format. For example, `peid01,peid02`. A request cannot include a mix of multiple objects with multiple IDs. For example, a request cannot include a mix of multiple protocol endpoint IDs and host names. Instead, at least one of the objects (e.g., `protocol_endpoint_ids`) must be set to one ID (e.g., `peid01`).")] = None, + protocol_endpoint_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the protocol endpoints specified. Enter multiple names in comma-separated format. For example, `pe01,pe02`. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple protocol endpoint names and host names; instead, at least one of the objects (e.g., `protocol_endpoint_names`) must be set to one name (e.g., `pe01`).")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + volume_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified volume. Enter multiple ids in comma-separated format. For example, `vol01id,vol02id`. A request cannot include a mix of multiple objects with multiple IDs. For example, a request cannot include a mix of multiple volume IDs and host names; instead, at least one of the objects (e.g., `volume_ids`) must be set to only one name (e.g., `vol01id`). Only one of the two between `volume_names` and `volume_ids` may be used at a time.")] = None, + volume_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the volume specified. Enter multiple names in comma-separated format. For example, `vol01,vol02`. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple volume names and host names; instead, at least one of the objects (e.g., `volume_names`) must be set to only one name (e.g., `vol01`).")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume connections + + Displays a list of connections between a volume and its hosts and host groups, as well as the logical unit numbers (LUNs) or NVMe Namespace IDs (NSIDs) used by the associated hosts to address these volumes. + + :param volumes: A list of volumes to query for. Overrides volume_ids and volume_names keyword arguments. + :type volumes: ReferenceType or List[ReferenceType], optional + :param protocol_endpoints: A list of protocol_endpoints to query for. Overrides protocol_endpoint_ids and protocol_endpoint_names keyword arguments. + :type protocol_endpoints: ReferenceType or List[ReferenceType], optional + :param hosts: A list of hosts to query for. Overrides host_names keyword argument. + :type hosts: ReferenceType or List[ReferenceType], optional + :param host_groups: A list of host_groups to query for. Overrides host_group_names keyword argument. + :type host_groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param host_group_names: Performs the operation on the host group specified. Enter multiple names in + comma-separated format. A request cannot include a mix of multiple objects + with multiple names. For example, a request cannot include a mix of + multiple host group names and volume names; instead, at least one of the + objects (e.g., `host_group_names`) must be set to only one name (e.g., + `hgroup01`). + :type host_group_names: List[str] + :param host_names: Performs the operation on the hosts specified. Enter multiple names in comma- + separated format. For example, `host01,host02`. A request cannot include a + mix of multiple objects with multiple names. For example, a request cannot + include a mix of multiple host names and volume names; instead, at least one + of the objects (e.g., `host_names`) must be set to only one name (e.g., + `host01`). + :type host_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol_endpoint_ids: Performs the operation on the protocol endpoints specified. Enter multiple IDs + in comma-separated format. For example, `peid01,peid02`. A request cannot + include a mix of multiple objects with multiple IDs. For example, a + request cannot include a mix of multiple protocol endpoint IDs and host + names. Instead, at least one of the objects (e.g., + `protocol_endpoint_ids`) must be set to one ID (e.g., `peid01`). + :type protocol_endpoint_ids: List[str] + :param protocol_endpoint_names: Performs the operation on the protocol endpoints specified. Enter multiple names + in comma-separated format. For example, `pe01,pe02`. A request cannot + include a mix of multiple objects with multiple names. For example, a + request cannot include a mix of multiple protocol endpoint names and + host names; instead, at least one of the objects (e.g., + `protocol_endpoint_names`) must be set to one name (e.g., `pe01`). + :type protocol_endpoint_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param volume_ids: Performs the operation on the specified volume. Enter multiple ids in comma- + separated format. For example, `vol01id,vol02id`. A request cannot include a + mix of multiple objects with multiple IDs. For example, a request cannot + include a mix of multiple volume IDs and host names; instead, at least one + of the objects (e.g., `volume_ids`) must be set to only one name (e.g., + `vol01id`). Only one of the two between `volume_names` and `volume_ids` may + be used at a time. + :type volume_ids: List[str] + :param volume_names: Performs the operation on the volume specified. Enter multiple names in comma- + separated format. For example, `vol01,vol02`. A request cannot include a + mix of multiple objects with multiple names. For example, a request cannot + include a mix of multiple volume names and host names; instead, at least + one of the objects (e.g., `volume_names`) must be set to only one name + (e.g., `vol01`). + :type volume_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + host_group_names=host_group_names, + host_names=host_names, + limit=limit, + offset=offset, + protocol_endpoint_ids=protocol_endpoint_ids, + protocol_endpoint_names=protocol_endpoint_names, + sort=sort, + total_item_count=total_item_count, + volume_ids=volume_ids, + volume_names=volume_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(host_groups, ['host_group_names'], kwargs) + _process_references(hosts, ['host_names'], kwargs) + _process_references(protocol_endpoints, ['protocol_endpoint_ids', 'protocol_endpoint_names'], kwargs) + _process_references(volumes, ['volume_ids', 'volume_names'], kwargs) + _fixup_list_type_params(['context_names', 'host_group_names', 'host_names', 'protocol_endpoint_ids', 'protocol_endpoint_names', 'sort', 'volume_ids', 'volume_names'], kwargs) + return self._call_api('ConnectionsApi', 'api256_connections_get_with_http_info', kwargs) + + def post_connections( + self, + volumes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + hosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + host_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + host_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the host group specified. Enter multiple names in comma-separated format. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple host group names and volume names; instead, at least one of the objects (e.g., `host_group_names`) must be set to only one name (e.g., `hgroup01`).")] = None, + host_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the hosts specified. Enter multiple names in comma-separated format. For example, `host01,host02`. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple host names and volume names; instead, at least one of the objects (e.g., `host_names`) must be set to only one name (e.g., `host01`).")] = None, + volume_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified volume. Enter multiple ids in comma-separated format. For example, `vol01id,vol02id`. A request cannot include a mix of multiple objects with multiple IDs. For example, a request cannot include a mix of multiple volume IDs and host names; instead, at least one of the objects (e.g., `volume_ids`) must be set to only one name (e.g., `vol01id`). Only one of the two between `volume_names` and `volume_ids` may be used at a time.")] = None, + volume_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the volume specified. Enter multiple names in comma-separated format. For example, `vol01,vol02`. A request cannot include a mix of multiple objects with multiple names. For example, a request cannot include a mix of multiple volume names and host names; instead, at least one of the objects (e.g., `volume_names`) must be set to only one name (e.g., `vol01`).")] = None, + connection: Optional['models.ConnectionPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a connection between a volume and host or host group + + Creates a connection between a volume and a host or host group. One of `volume_names` or `volume_ids` and one of `host_names` or `host_group_names` query parameters are required. + + :param volumes: A list of volumes to query for. Overrides volume_ids and volume_names keyword arguments. + :type volumes: ReferenceType or List[ReferenceType], optional + :param hosts: A list of hosts to query for. Overrides host_names keyword argument. + :type hosts: ReferenceType or List[ReferenceType], optional + :param host_groups: A list of host_groups to query for. Overrides host_group_names keyword argument. + :type host_groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param host_group_names: Performs the operation on the host group specified. Enter multiple names in + comma-separated format. A request cannot include a mix of multiple objects + with multiple names. For example, a request cannot include a mix of + multiple host group names and volume names; instead, at least one of the + objects (e.g., `host_group_names`) must be set to only one name (e.g., + `hgroup01`). + :type host_group_names: List[str] + :param host_names: Performs the operation on the hosts specified. Enter multiple names in comma- + separated format. For example, `host01,host02`. A request cannot include a + mix of multiple objects with multiple names. For example, a request cannot + include a mix of multiple host names and volume names; instead, at least one + of the objects (e.g., `host_names`) must be set to only one name (e.g., + `host01`). + :type host_names: List[str] + :param volume_ids: Performs the operation on the specified volume. Enter multiple ids in comma- + separated format. For example, `vol01id,vol02id`. A request cannot include a + mix of multiple objects with multiple IDs. For example, a request cannot + include a mix of multiple volume IDs and host names; instead, at least one + of the objects (e.g., `volume_ids`) must be set to only one name (e.g., + `vol01id`). Only one of the two between `volume_names` and `volume_ids` may + be used at a time. + :type volume_ids: List[str] + :param volume_names: Performs the operation on the volume specified. Enter multiple names in comma- + separated format. For example, `vol01,vol02`. A request cannot include a + mix of multiple objects with multiple names. For example, a request cannot + include a mix of multiple volume names and host names; instead, at least + one of the objects (e.g., `volume_names`) must be set to only one name + (e.g., `vol01`). + :type volume_names: List[str] + :param connection: + :type connection: ConnectionPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + host_group_names=host_group_names, + host_names=host_names, + volume_ids=volume_ids, + volume_names=volume_names, + connection=connection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(host_groups, ['host_group_names'], kwargs) + _process_references(hosts, ['host_names'], kwargs) + _process_references(volumes, ['volume_ids', 'volume_names'], kwargs) + _fixup_list_type_params(['context_names', 'host_group_names', 'host_names', 'volume_ids', 'volume_names'], kwargs) + return self._call_api('ConnectionsApi', 'api256_connections_post_with_http_info', kwargs) + + def get_container_default_protections( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the container ID specified. Enter multiple source IDs in comma-separated format. The `ids` or `names` parameter is required, but they cannot be set together. Specifying `ids` or `names` with no value will perform the operation on local array.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique container name specified. Enter multiple names in comma-separated format. The `ids` or `names` parameter is required, but they cannot be set together. Specifying `ids` or `names` with no value will perform the operation on local array.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List container default protections + + Displays a list of containers with its default protections. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: Performs the operation on the container ID specified. Enter multiple source IDs + in comma-separated format. The `ids` or `names` parameter is required, but + they cannot be set together. Specifying `ids` or `names` with no value will + perform the operation on local array. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique container name specified. Enter multiple + names in comma-separated format. The `ids` or `names` parameter is required, + but they cannot be set together. Specifying `ids` or `names` with no value + will perform the operation on local array. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ContainerDefaultProtectionsApi', 'api256_container_default_protections_get_with_http_info', kwargs) + + def patch_container_default_protections( + self, + container_default_protection: 'models.ContainerDefaultProtection', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the container ID specified. Enter multiple source IDs in comma-separated format. The `ids` or `names` parameter is required, but they cannot be set together. Specifying `ids` or `names` with no value will perform the operation on local array.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique container name specified. Enter multiple names in comma-separated format. The `ids` or `names` parameter is required, but they cannot be set together. Specifying `ids` or `names` with no value will perform the operation on local array.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a container's default protections + + Modifies a container's default protections. To modify, set `default_protections` to the new list. + + :param container_default_protection: (required) + :type container_default_protection: ContainerDefaultProtection + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the container ID specified. Enter multiple source IDs + in comma-separated format. The `ids` or `names` parameter is required, but + they cannot be set together. Specifying `ids` or `names` with no value will + perform the operation on local array. + :type ids: List[str] + :param names: Performs the operation on the unique container name specified. Enter multiple + names in comma-separated format. The `ids` or `names` parameter is required, + but they cannot be set together. Specifying `ids` or `names` with no value + will perform the operation on local array. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + container_default_protection=container_default_protection, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ContainerDefaultProtectionsApi', 'api256_container_default_protections_patch_with_http_info', kwargs) + + def get_controllers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List controller information and status + + Displays the name, mode, FlashArray model, Purity//FA software version, and status of each controller in the array. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('ControllersApi', 'api256_controllers_get_with_http_info', kwargs) + + def delete_dns( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete DNS configuration + + Deletes DNS configuration identified by configuration name. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('DNSApi', 'api256_dns_delete_with_http_info', kwargs) + + def get_dns( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List DNS parameters + + Displays the current DNS configurations and their parameters including domain suffix, the list of DNS name server IP addresses, and the list of services that DNS parameters apply to. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('DNSApi', 'api256_dns_get_with_http_info', kwargs) + + def patch_dns( + self, + dns: 'models.DnsPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify DNS parameters + + Modifies the DNS parameters of an array, including the domain suffix, the list of DNS name server IP addresses, and the list of services that DNS parameters apply to. If there is no DNS configuration beforehand new DNS configuration with 'default' name is created. If more than one DNS configuration exists, `name` has to be specified to identify the DNS configuration to be modified. + + :param dns: (required) + :type dns: DnsPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + dns=dns, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('DNSApi', 'api256_dns_patch_with_http_info', kwargs) + + def post_dns( + self, + dns: 'models.DnsPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create DNS configuration + + Creates new DNS configuration with parameters including the domain suffix, the list of DNS name server IP addresses, and the list of services that DNS parameters apply to. + + :param dns: (required) + :type dns: DnsPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + dns=dns, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('DNSApi', 'api256_dns_post_with_http_info', kwargs) + + def get_data_sealing_keys( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List data sealing keys + + The list of `data sealing keys` configured for the `realm`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DataSealingKeysApi', 'api256_data_sealing_keys_get_with_http_info', kwargs) + + def patch_data_sealing_keys( + self, + data_sealing_key_patch: 'models.DataSealingKeyPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify data sealing keys + + The modification of `data sealing keys`. `Keys` can be `enabled` or `disabled` to unseal or seal the matching `data-isolated realms`. The `key material` can also be rotated. + + :param data_sealing_key_patch: (required) + :type data_sealing_key_patch: DataSealingKeyPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + data_sealing_key_patch=data_sealing_key_patch, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DataSealingKeysApi', 'api256_data_sealing_keys_patch_with_http_info', kwargs) + + def post_data_sealing_keys( + self, + data_sealing_key: 'models.DataSealingKeyPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create data sealing keys + + The creation of `data sealing keys` for `data-isolated realms`. The `key` can be stored on an external `key management server` (e.g., `KMIP`), or provided as `keying material`. The `names` parameter is required and must specify the fully qualified name in the format `realm_name::data_sealing_key`. + + :param data_sealing_key: (required) + :type data_sealing_key: DataSealingKeyPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + data_sealing_key=data_sealing_key, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('DataSealingKeysApi', 'api256_data_sealing_keys_post_with_http_info', kwargs) + + def post_data_sealing_keys_rotate( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + data_sealing_key: Optional['models.DataSealingKeyRotate'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Rotate data sealing keys + + The rotation of the keying material for `data sealing keys`. For `remote keys`, the `key` is automatically rotated on the external `key management server` and no `request body` is required. For `local-in-memory keys`, both the `new keying material` and the `old keying material` must be provided in the `request body`. The `names` parameter is required and must specify the fully qualified name in the format `realm_name::data_sealing_key`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param data_sealing_key: + :type data_sealing_key: DataSealingKeyRotate + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + data_sealing_key=data_sealing_key, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DataSealingKeysApi', 'api256_data_sealing_keys_rotate_post_with_http_info', kwargs) + + def get_data_sealing_keys_test( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Test data sealing key remote connectivity + + The connectivity test between the `FlashArray` and the external `key management server` associated with the specified `data sealing key`. This process verifies that the `server` is reachable and that the `data sealing key` can be accessed. The `names` parameter is required and must specify the fully qualified name in the format `realm-name::data-sealing-key`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DataSealingKeysApi', 'api256_data_sealing_keys_test_get_with_http_info', kwargs) + + def delete_directories( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete managed directories + + Deletes one or more managed directories. To be deleted, a managed directory must be empty and not attached to any enabled export policies. Deleted managed directories cannot be recovered. The `ids` or `names` parameter is required, but cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_delete_with_http_info', kwargs) + + def get_directories( + self, + workloads: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + file_systems: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + file_system_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together.")] = None, + file_system_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + workload_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter.")] = None, + workload_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directories + + Displays a list of directories, including those pending eradication. + + :param workloads: A list of workloads to query for. Overrides workload_ids and workload_names keyword arguments. + :type workloads: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param file_systems: A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + :type file_systems: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param file_system_ids: Performs the operation on the file system ID specified. Enter multiple file + system IDs in comma-separated format. The `file_system_ids` or + `file_system_names` parameter is required, but they cannot be set + together. + :type file_system_ids: List[str] + :param file_system_names: Performs the operation on the file system name specified. Enter multiple file + system names in comma-separated format. For example, + `filesystem01,filesystem02`. + :type file_system_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :param workload_ids: A comma-separated list of workload IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_names` query + parameter. + :type workload_ids: List[str] + :param workload_names: A comma-separated list of workload names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_ids` query + parameter. + :type workload_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + workload_ids=workload_ids, + workload_names=workload_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(workloads, ['workload_ids', 'workload_names'], kwargs) + _fixup_list_type_params(['context_names', 'file_system_ids', 'file_system_names', 'ids', 'names', 'sort', 'workload_ids', 'workload_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_get_with_http_info', kwargs) + + def get_directories_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + file_systems: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + file_system_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together.")] = None, + file_system_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the groups that match the given list of gids. Enter names in a comma-separated format, e.g., `2001,2002`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List group with content in directories + + Displays a list of groups, that have content in specific directories. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param file_systems: A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + :type file_systems: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param file_system_ids: Performs the operation on the file system ID specified. Enter multiple file + system IDs in comma-separated format. The `file_system_ids` or + `file_system_names` parameter is required, but they cannot be set + together. + :type file_system_ids: List[str] + :param file_system_names: Performs the operation on the file system name specified. Enter multiple file + system names in comma-separated format. For example, + `filesystem01,filesystem02`. + :type file_system_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: Performs the operation on the groups that match the given list of gids. Enter + names in a comma-separated format, e.g., `2001,2002`. + :type group_ids: List[int] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + group_sids=group_sids, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'file_system_ids', 'file_system_names', 'group_ids', 'group_names', 'group_sids', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_groups_get_with_http_info', kwargs) + + def post_directories_locks_nlm_reclamations( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create NLM reclamation + + Creates an NLM reclamation, which is a system-wide operation that affects all clients, so only one may be in progress at a time. Attempting to initiate reclamation while one is in progress will result in an error. When NLM reclamation is initiated, all NLM locks are deleted and client applications are notified that they can reacquire their locks within a grace period. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_locks_nlm_reclamations_post_with_http_info', kwargs) + + def patch_directories( + self, + directory: 'models.DirectoryPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a managed directory + + Modifies a managed directory. To rename a managed directory, set `name` to the new name. The `ids` or `names` parameter is required, but cannot be set together. The `name` or `directory_name` parameter is required. + + :param directory: (required) + :type directory: DirectoryPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + directory=directory, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_patch_with_http_info', kwargs) + + def get_directories_performance_by_array( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directories performance data by array + + The real-time and historical `performance data`, real-time `latency data`, and average `I/O size data`. The `data` is displayed as a total across all `directories` on the `local array` and by individual `directory`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`. + :type protocol: str + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + protocol=protocol, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_performance_by_array_get_with_http_info', kwargs) + + def get_directories_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`.")] = None, + protocol_group: Annotated[Optional[StrictStr], Field(description="Protocol group type. Valid values are `block`, `file`, `object-store`, and `all`.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directory performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes for each directory and as a total of all directories across the entire array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`. + :type protocol: str + :param protocol_group: Protocol group type. Valid values are `block`, `file`, `object-store`, and + `all`. + :type protocol_group: str + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + protocol=protocol, + protocol_group=protocol_group, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_performance_get_with_http_info', kwargs) + + def delete_directories_policies_audit_file( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more audit policies + + Deletes a membership between a directory and one or more audit policies. Either the `policy_ids` or `policy_names` parameter is required, but they cannot be set together. Either the `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_audit_file_delete_with_http_info', kwargs) + + def get_directories_policies_audit_file( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List audit policies attached to a directory + + Displays a list of audit policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_audit_file_get_with_http_info', kwargs) + + def post_directories_policies_audit_file( + self, + policies: 'models.DirectoryPolicyPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory and one or more audit policies + + Creates a membership between a directory and one or more audit policies. Either the `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_audit_file_post_with_http_info', kwargs) + + def delete_directories_policies_autodir( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more auto managed directory policies + + Deletes a membership between a directory with one or more auto managed directory policies. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_autodir_delete_with_http_info', kwargs) + + def get_directories_policies_autodir( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List auto managed directory policies attached to a directory + + Displays a list of auto managed directory policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_autodir_get_with_http_info', kwargs) + + def post_directories_policies_autodir( + self, + policies: 'models.DirectoryPolicyPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory with one or more auto managed directory policies + + Creates a membership between a directory with one or more auto managed directory policies. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_autodir_post_with_http_info', kwargs) + + def get_directories_policies( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List policies + + Displays a list of policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_get_with_http_info', kwargs) + + def delete_directories_policies_nfs( + self, + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + server_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of server IDs.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more NFS policies + + Deletes a membership between a directory and one or more NFS policies. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param servers: A list of servers to query for. Overrides server_ids and server_names keyword arguments. + :type servers: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param server_ids: A comma-separated list of server IDs. + :type server_ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + server_ids=server_ids, + server_names=server_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(servers, ['server_ids', 'server_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'server_ids', 'server_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_nfs_delete_with_http_info', kwargs) + + def get_directories_policies_nfs( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List NFS policies attached to a directory + + Displays a list of NFS policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_nfs_get_with_http_info', kwargs) + + def post_directories_policies_nfs( + self, + policies: 'models.DirectoryPolicyExportPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory and one or more NFS policies + + Creates a membership between a directory and one or more NFS policies. The `member_ids` or `member_names` parameter is required but cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyExportPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_nfs_post_with_http_info', kwargs) + + def delete_directories_policies_qos( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more QoS policies + + The operation that deletes a `membership` between a `directory` and one or more `QoS policies` by detaching them. For this request, either `policy_ids` or `policy_names` must be provided, and either `member_ids` or `member_names` must be provided; however, the ID and name parameters for each respective category cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_qos_delete_with_http_info', kwargs) + + def get_directories_policies_qos( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List QoS policies attached to a directory + + The operation that displays a list of `QoS policies` that are attached to `directories`. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_qos_get_with_http_info', kwargs) + + def post_directories_policies_qos( + self, + policies: 'models.DirectoryPolicyPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory and one or more QoS policies + + The operation that creates a `membership` between a `directory` and one or more `QoS policies` by attaching them. Either the `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_qos_post_with_http_info', kwargs) + + def delete_directories_policies_quota( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more quota policies + + Deletes a membership between a directory and one or more quota policies. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_quota_delete_with_http_info', kwargs) + + def get_directories_policies_quota( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List quota policies attached to a directory + + Displays a list of quota policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_quota_get_with_http_info', kwargs) + + def post_directories_policies_quota( + self, + policies: 'models.DirectoryPolicyPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory and one or more quota policies + + Creates a membership between a directory and one or more quota policies. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for quota management operations. If set to `true`, + directory usage is not checked against the `quota_limits` that are set. If + set to `false`, the actual logical bytes in use are prevented from + exceeding the limits set on the directory. Client operations might be + impacted. If the limit exceeds the quota, the client operation is not + allowed. If not specified, defaults to `false`. + :type ignore_usage: bool + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_quota_post_with_http_info', kwargs) + + def delete_directories_policies_smb( + self, + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + server_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of server IDs.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more SMB policies + + Deletes a membership between a directory and one or more SMB policies. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param servers: A list of servers to query for. Overrides server_ids and server_names keyword arguments. + :type servers: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param server_ids: A comma-separated list of server IDs. + :type server_ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + server_ids=server_ids, + server_names=server_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(servers, ['server_ids', 'server_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'server_ids', 'server_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_smb_delete_with_http_info', kwargs) + + def get_directories_policies_smb( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SMB policies attached to a directory + + Displays a list of SMB policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_smb_get_with_http_info', kwargs) + + def post_directories_policies_smb( + self, + policies: 'models.DirectoryPolicyExportPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory and one or more SMB policies + + Creates a membership between a directory and one or more SMB policies. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyExportPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_smb_post_with_http_info', kwargs) + + def delete_directories_policies_snapshot( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more snapshot policies + + Deletes a membership between a directory and one or more snapshot policies. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_snapshot_delete_with_http_info', kwargs) + + def get_directories_policies_snapshot( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List snapshot policies attached to a directory + + Displays a list of snapshot policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_snapshot_get_with_http_info', kwargs) + + def post_directories_policies_snapshot( + self, + policies: 'models.DirectoryPolicyPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory with one or more snapshot policies + + Creates a membership between a directory with one or more snapshot policies. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_snapshot_post_with_http_info', kwargs) + + def delete_directories_policies_user_group_quota( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a directory and one or more user-group-quota policies + + Deletes a membership between a directory and one or more user-group-quota policies. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_user_group_quota_delete_with_http_info', kwargs) + + def get_directories_policies_user_group_quota( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List user-group-quota policies attached to a directory + + Displays a list of user-group-quota policies that are attached to directories. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_user_group_quota_get_with_http_info', kwargs) + + def post_directories_policies_user_group_quota( + self, + policies: 'models.DirectoryPolicyPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a directory and one or more user-group-quota policies + + Creates a membership between a directory and one or more user-group-quota policies. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_policies_user_group_quota_post_with_http_info', kwargs) + + def post_directories( + self, + directory: 'models.DirectoryPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + file_systems: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + add_to_policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + add_to_policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The managed directories will become members of the specified policies along with creation. Enter multiple ids in comma-separated format.")] = None, + add_to_policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="The managed directories will become members of the specified policies along with creation. Enter multiple names in a comma-separated format.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + file_system_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together.")] = None, + file_system_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the initial protection of the newly created managed directories will be the union of the container default protection policies thatare not already applied to any of their ancestors, and either `add_to_policy_names` or `add_to_policy_ids`. If specified as `false`, the default protection of the container will not be applied automatically. The initial protection of the newly created managed directories will be configured by either `add_to_policy_names` or `add_to_policy_ids`. If not specified, defaults to `true`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create or copy directory + + The operation that creates a `managed directory` at the specified path. The `managed directory` name must consist of a `file system` name prefix and a `managed directory` name suffix, separated by a colon (:). The suffix must be between 1 and 63 characters (alphanumeric and '-') in length and must begin and end with a letter or number. Additionally, the suffix must include at least one letter or '-'. Users must either set `names` to create a `managed directory` with a specified full name, or set `file_system_names` or `file_system_ids` in the query parameters along with `suffix` in the body parameters; these two options are mutually exclusive. The `add_to_policy_names` and `add_to_policy_ids` query parameters specify a list of policy names or IDs to apply to the new `managed directory` and are mutually exclusive. The `with_default_protection` parameter specifies whether to use the container default protection. Note that `add_to_policy_names` and `with_default_protection` cannot be provided when `overwrite` is `true`. + + :param directory: (required) + :type directory: DirectoryPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param file_systems: A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + :type file_systems: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param add_to_policies: A list of add_to_policies to query for. Overrides add_to_policy_ids and add_to_policy_names keyword arguments. + :type add_to_policies: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param add_to_policy_ids: The managed directories will become members of the specified policies along with + creation. Enter multiple ids in comma-separated format. + :type add_to_policy_ids: List[str] + :param add_to_policy_names: The managed directories will become members of the specified policies along with + creation. Enter multiple names in a comma-separated format. + :type add_to_policy_names: List[str] + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param file_system_ids: Performs the operation on the file system ID specified. Enter multiple file + system IDs in comma-separated format. The `file_system_ids` or + `file_system_names` parameter is required, but they cannot be set + together. + :type file_system_ids: List[str] + :param file_system_names: Performs the operation on the file system name specified. Enter multiple file + system names in comma-separated format. For example, + `filesystem01,filesystem02`. + :type file_system_names: List[str] + :param ignore_usage: Flag used to override checks for quota management operations. If set to `true`, + directory usage is not checked against the `quota_limits` that are set. If + set to `false`, the actual logical bytes in use are prevented from + exceeding the limits set on the directory. Client operations might be + impacted. If the limit exceeds the quota, the client operation is not + allowed. If not specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :param with_default_protection: If specified as `true`, the initial protection of the newly created managed + directories will be the union of the container default protection + policies thatare not already applied to any of their ancestors, and + either `add_to_policy_names` or `add_to_policy_ids`. If specified as + `false`, the default protection of the container will not be applied + automatically. The initial protection of the newly created managed + directories will be configured by either `add_to_policy_names` or + `add_to_policy_ids`. If not specified, defaults to `true`. + :type with_default_protection: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + directory=directory, + authorization=authorization, + x_request_id=x_request_id, + add_to_policy_ids=add_to_policy_ids, + add_to_policy_names=add_to_policy_names, + context_names=context_names, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + ignore_usage=ignore_usage, + names=names, + overwrite=overwrite, + with_default_protection=with_default_protection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(add_to_policies, ['add_to_policy_ids', 'add_to_policy_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['add_to_policy_ids', 'add_to_policy_names', 'context_names', 'file_system_ids', 'file_system_names', 'names'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_post_with_http_info', kwargs) + + def get_directories_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directory QoS policy configurations + + The operation that displays real-time and historical `QoS policy configurations` for each `directory`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_qos_get_with_http_info', kwargs) + + def get_directories_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directory space information + + Displays physical storage consumption data for each directory. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_space_get_with_http_info', kwargs) + + def get_directories_users( + self, + users: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + file_systems: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + file_system_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together.")] = None, + file_system_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + user_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the users that match the given list of uids. Enter names in a comma-separated format, for example, `1001,1002`.")] = None, + user_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the users that match the given list of user names. Enter names in a comma-separated format, for example, `u1,u2`.")] = None, + user_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the users that match the given list of user SIDs. Enter SIDs in a comma-separated format, for example, `S-1-1-20-1000,S-1-1-20-2002`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List users with content in directories + + Displays a list of users that have content in specific directories. + + :param users: A list of users to query for. Overrides user_ids and user_names keyword arguments. + :type users: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param file_systems: A list of file_systems to query for. Overrides file_system_ids and file_system_names keyword arguments. + :type file_systems: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param file_system_ids: Performs the operation on the file system ID specified. Enter multiple file + system IDs in comma-separated format. The `file_system_ids` or + `file_system_names` parameter is required, but they cannot be set + together. + :type file_system_ids: List[str] + :param file_system_names: Performs the operation on the file system name specified. Enter multiple file + system names in comma-separated format. For example, + `filesystem01,filesystem02`. + :type file_system_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param user_ids: Performs the operation on the users that match the given list of uids. Enter + names in a comma-separated format, for example, `1001,1002`. + :type user_ids: List[int] + :param user_names: Performs the operation on the users that match the given list of user names. + Enter names in a comma-separated format, for example, `u1,u2`. + :type user_names: List[str] + :param user_sids: Performs the operation on the users that match the given list of user SIDs. + Enter SIDs in a comma-separated format, for example, + `S-1-1-20-1000,S-1-1-20-2002`. + :type user_sids: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + file_system_ids=file_system_ids, + file_system_names=file_system_names, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + user_ids=user_ids, + user_names=user_names, + user_sids=user_sids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(file_systems, ['file_system_ids', 'file_system_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(users, ['user_ids', 'user_names'], kwargs) + _fixup_list_type_params(['context_names', 'file_system_ids', 'file_system_names', 'ids', 'names', 'sort', 'user_ids', 'user_names', 'user_sids'], kwargs) + return self._call_api('DirectoriesApi', 'api256_directories_users_get_with_http_info', kwargs) + + def delete_directory_exports( + self, + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + exports: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`.")] = None, + export_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the export names specified. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. Combines the export containment hierarchy (server), the protocol (smb or nfs) and the export_name. For example, `server01::smb::export01,server01::nfs::export01`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + server_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of server IDs.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete directory exports + + Deletes one or more directory exports. If any of the `export_names` is not unique across the system, `policy_ids` or `policy_names` must be specified to determine the exports. When server reference is not provided, the `_array_server` is set as effective default. The API provides two options for identifying an export object. One option is to reference it by its fully qualified export name, or alternatively, by a combination of parameters-specifically, the `server_names` (or `server_ids`) and `export_names`. All identifying parameters must always be provided, either explicitly or as part of the fully qualified name. + + :param servers: A list of servers to query for. Overrides server_ids and server_names keyword arguments. + :type servers: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param exports: A list of exports to query for. Overrides export_names keyword argument. + :type exports: ReferenceType or List[ReferenceType], optional + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. The name is + expected to be fully qualified, meaning if the object is contained in some + context, the corresponding name would provide complete information about + the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`. + :type directory_names: List[str] + :param export_names: Performs the operation on the export names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. + :type export_names: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. Combines the export containment hierarchy (server), + the protocol (smb or nfs) and the export_name. For example, + `server01::smb::export01,server01::nfs::export01`. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param server_ids: A comma-separated list of server IDs. + :type server_ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + directory_ids=directory_ids, + directory_names=directory_names, + export_names=export_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + server_ids=server_ids, + server_names=server_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _process_references(exports, ['export_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(servers, ['server_ids', 'server_names'], kwargs) + _fixup_list_type_params(['context_names', 'directory_ids', 'directory_names', 'export_names', 'names', 'policy_ids', 'policy_names', 'server_ids', 'server_names'], kwargs) + return self._call_api('DirectoryExportsApi', 'api256_directory_exports_delete_with_http_info', kwargs) + + def get_directory_exports( + self, + workloads: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + exports: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`.")] = None, + export_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the export names specified. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. Combines the export containment hierarchy (server), the protocol (smb or nfs) and the export_name. For example, `server01::smb::export01,server01::nfs::export01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + workload_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter.")] = None, + workload_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directory exports + + Displays a list of directory exports. + + :param workloads: A list of workloads to query for. Overrides workload_ids and workload_names keyword arguments. + :type workloads: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param exports: A list of exports to query for. Overrides export_names keyword argument. + :type exports: ReferenceType or List[ReferenceType], optional + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. The name is + expected to be fully qualified, meaning if the object is contained in some + context, the corresponding name would provide complete information about + the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`. + :type directory_names: List[str] + :param export_names: Performs the operation on the export names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. + :type export_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. Combines the export containment hierarchy (server), + the protocol (smb or nfs) and the export_name. For example, + `server01::smb::export01,server01::nfs::export01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param workload_ids: A comma-separated list of workload IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_names` query + parameter. + :type workload_ids: List[str] + :param workload_names: A comma-separated list of workload names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_ids` query + parameter. + :type workload_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + directory_ids=directory_ids, + directory_names=directory_names, + export_names=export_names, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + workload_ids=workload_ids, + workload_names=workload_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _process_references(exports, ['export_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(workloads, ['workload_ids', 'workload_names'], kwargs) + _fixup_list_type_params(['context_names', 'directory_ids', 'directory_names', 'export_names', 'names', 'policy_ids', 'policy_names', 'sort', 'workload_ids', 'workload_names'], kwargs) + return self._call_api('DirectoryExportsApi', 'api256_directory_exports_get_with_http_info', kwargs) + + def patch_directory_exports( + self, + export: 'models.DirectoryExportPatch', + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + exports: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`.")] = None, + export_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the export names specified. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. Combines the export containment hierarchy (server), the protocol (smb or nfs) and the export_name. For example, `server01::smb::export01,server01::nfs::export01`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + server_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of server IDs.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify directory exports + + Modifies a directory export. Used for manually renaming, enabling, and disabling directory exports. To rename a directory export, set 'export_name' to the new name. When server reference is not provided, the `_array_server` is set as effective default. The API provides two options for identifying an export object. One option is to reference it by its fully qualified export name, or alternatively, by a combination of parameters—specifically, the `server` and `export_name`. All identifying parameters must always be provided, either explicitly or as part of the fully qualified name. + + :param export: (required) + :type export: DirectoryExportPatch + :param servers: A list of servers to query for. Overrides server_ids and server_names keyword arguments. + :type servers: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param exports: A list of exports to query for. Overrides export_names keyword argument. + :type exports: ReferenceType or List[ReferenceType], optional + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. The name is + expected to be fully qualified, meaning if the object is contained in some + context, the corresponding name would provide complete information about + the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`. + :type directory_names: List[str] + :param export_names: Performs the operation on the export names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. + :type export_names: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. Combines the export containment hierarchy (server), + the protocol (smb or nfs) and the export_name. For example, + `server01::smb::export01,server01::nfs::export01`. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param server_ids: A comma-separated list of server IDs. + :type server_ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + export=export, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + directory_ids=directory_ids, + directory_names=directory_names, + export_names=export_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + server_ids=server_ids, + server_names=server_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _process_references(exports, ['export_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(servers, ['server_ids', 'server_names'], kwargs) + _fixup_list_type_params(['context_names', 'directory_ids', 'directory_names', 'export_names', 'names', 'policy_ids', 'policy_names', 'server_ids', 'server_names'], kwargs) + return self._call_api('DirectoryExportsApi', 'api256_directory_exports_patch_with_http_info', kwargs) + + def post_directory_exports( + self, + exports: 'models.DirectoryExportPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. Combines the export containment hierarchy (server), the protocol (smb or nfs) and the export_name. For example, `server01::smb::export01,server01::nfs::export01`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create directory exports + + Creates an export of a managed directory. The `directory_ids` or `directory_names` parameter is required, but cannot be set together. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. When server reference is not provided, the `_array_server` is set as effective default. The API provides two options for identifying an export object. One option is to reference it by its fully qualified export name, or alternatively, by a combination of parameters—specifically, the `server` and `export_name`. All identifying parameters must always be provided, either explicitly or as part of the fully qualified name. + + :param exports: (required) + :type exports: DirectoryExportPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. The name is + expected to be fully qualified, meaning if the object is contained in some + context, the corresponding name would provide complete information about + the containment hierarchy. For example, `fs:dir01,pod01::fs:dir01`. + :type directory_names: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. Combines the export containment hierarchy (server), + the protocol (smb or nfs) and the export_name. For example, + `server01::smb::export01,server01::nfs::export01`. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + exports=exports, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + directory_ids=directory_ids, + directory_names=directory_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'directory_ids', 'directory_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoryExportsApi', 'api256_directory_exports_post_with_http_info', kwargs) + + def get_directory_quotas( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. For example, `fs:dir01,fs:dir02`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directories with attached quota policies + + Displays a list of directories and the quota policies attached to them. Directories with multiple policies are listed repeatedly (once per policy). The directories without a policy attached are not listed. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. For example, + `fs:dir01,fs:dir02`. + :type directory_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + directory_ids=directory_ids, + directory_names=directory_names, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'directory_ids', 'directory_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoryQuotasApi', 'api256_directory_quotas_get_with_http_info', kwargs) + + def delete_directory_services( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete directory services configuration + + Deletes directory services configuration. Directory service configuration must not be referenced by any server nor enabled to be deleted. The built-in "management" directory service cannot be deleted. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_delete_with_http_info', kwargs) + + def get_directory_services( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directory services configuration + + Displays the directory services configuration settings for manageability. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_get_with_http_info', kwargs) + + def delete_directory_services_local_directory_services( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete local directory services + + Deletes local directory services. Local directory service can't be deleted when referenced by any server. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_directory_services_delete_with_http_info', kwargs) + + def get_directory_services_local_directory_services( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List local directory services + + Displays a list of local directory services. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_directory_services_get_with_http_info', kwargs) + + def patch_directory_services_local_directory_services( + self, + local_directory: 'models.LocalDirectoryService', + to_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + to_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format.")] = None, + to_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify local directory service + + Modifies local directory services. + + :param local_directory: (required) + :type local_directory: LocalDirectoryService + :param to_members: A list of to_members to query for. Overrides to_member_ids and to_member_names keyword arguments. + :type to_members: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param to_member_ids: The resource will be moved to the specified local member realm or array. Enter + multiple IDs in a comma-separated format. + :type to_member_ids: List[str] + :param to_member_names: The resource will be moved to the specified local member realm or array. Enter + multiple names in a comma-separated format. + :type to_member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + local_directory=local_directory, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + to_member_ids=to_member_ids, + to_member_names=to_member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(to_members, ['to_member_ids', 'to_member_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'to_member_ids', 'to_member_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_directory_services_patch_with_http_info', kwargs) + + def post_directory_services_local_directory_services( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_directory: Optional['models.LocalDirectoryServicePost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create local directory service + + Creates a local directory service. + + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_directory: + :type local_directory: LocalDirectoryServicePost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_directory=local_directory, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_directory_services_post_with_http_info', kwargs) + + def delete_directory_services_local_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete local groups + + Deletes one or more local groups. The `gids`, `names`, or `sids` parameter is required, but cannot be set together. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type gids: List[int] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + gids=gids, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + names=names, + sids=sids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'gids', 'local_directory_service_ids', 'local_directory_service_names', 'names', 'sids'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_groups_delete_with_http_info', kwargs) + + def get_directory_services_local_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List local groups + + Displays a list of local groups. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type gids: List[int] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + gids=gids, + ids=ids, + limit=limit, + names=names, + offset=offset, + sids=sids, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'gids', 'ids', 'names', 'sids', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_groups_get_with_http_info', kwargs) + + def delete_directory_services_local_groups_members( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + member_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete local group membership + + Deletes one or more local group memberships. The `group_names`, `group_sids`, or `group_gids` parameter is required, but cannot be set together. The `member_names`, `member_sids`, or `member_gids` parameter is required, but cannot be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type group_gids: List[int] + :param group_names: Performs the operation on the group names specified. Enter multiple group names + in comma-separated format. For example, `group1,group2`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param member_ids: Performs the operation on the unique local member IDs specified. Enter multiple + member IDs in comma-separated format. For local group IDs refer to group IDs + (GID). For local user IDs refer to user IDs (UID). The `member_ids` and + `member_names` parameters cannot be provided together. + :type member_ids: List[int] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_sids: Performs the operation on the specified member SID. Enter multiple member SIDs + in comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type member_sids: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_gids=group_gids, + group_names=group_names, + group_sids=group_sids, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + member_ids=member_ids, + member_names=member_names, + member_sids=member_sids, + member_types=member_types, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_gids', 'group_names', 'group_sids', 'local_directory_service_ids', 'local_directory_service_names', 'member_ids', 'member_names', 'member_sids', 'member_types'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_groups_members_delete_with_http_info', kwargs) + + def get_directory_services_local_groups_members( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List local group memberships + + Displays a list of local group memberships. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type group_gids: List[int] + :param group_names: Performs the operation on the group names specified. Enter multiple group names + in comma-separated format. For example, `group1,group2`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique local member IDs specified. Enter multiple + member IDs in comma-separated format. For local group IDs refer to group IDs + (GID). For local user IDs refer to user IDs (UID). The `member_ids` and + `member_names` parameters cannot be provided together. + :type member_ids: List[int] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_sids: Performs the operation on the specified member SID. Enter multiple member SIDs + in comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type member_sids: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_gids=group_gids, + group_names=group_names, + group_sids=group_sids, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_sids=member_sids, + member_types=member_types, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_gids', 'group_names', 'group_sids', 'member_ids', 'member_names', 'member_sids', 'member_types', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_groups_members_get_with_http_info', kwargs) + + def post_directory_services_local_groups_members( + self, + local_membership: Annotated['models.LocalGroupMembershipPost', Field(..., description="The `member_names`, `member_sids`, or `member_gids` parameter is required, but cannot be set together.")], + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create local group membership + + Creates a local group membership with a group. The `group_names`, `group_sids`, or `group_gids` parameter is required, but cannot be set together. + + :param local_membership: The `member_names`, `member_sids`, or `member_gids` parameter is required, but + cannot be set together. (required) + :type local_membership: LocalGroupMembershipPost + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type group_gids: List[int] + :param group_names: Performs the operation on the group names specified. Enter multiple group names + in comma-separated format. For example, `group1,group2`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + local_membership=local_membership, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_gids=group_gids, + group_names=group_names, + group_sids=group_sids, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_gids', 'group_names', 'group_sids', 'local_directory_service_ids', 'local_directory_service_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_groups_members_post_with_http_info', kwargs) + + def patch_directory_services_local_groups( + self, + local_group: 'models.LocalGroupPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify local groups + + Modifies local groups. The `gids`, `names`, or `sids` parameter is required, but cannot be set together. + + :param local_group: (required) + :type local_group: LocalGroupPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type gids: List[int] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + local_group=local_group, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + gids=gids, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + names=names, + sids=sids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'gids', 'local_directory_service_ids', 'local_directory_service_names', 'names', 'sids'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_groups_patch_with_http_info', kwargs) + + def post_directory_services_local_groups( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + local_group: Optional['models.LocalGroupPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create local group + + Creates a local group. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param local_group: + :type local_group: LocalGroupPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + local_group=local_group, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'local_directory_service_ids', 'local_directory_service_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_groups_post_with_http_info', kwargs) + + def delete_directory_services_local_users( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + uids: Annotated[Optional[conlist(StrictInt)], Field(description="A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs in comma-separated format. For example, `423,51234`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete local users + + Deletes one or more local users. The `uids`, `names`, or `sids` parameter is required, but cannot be set together. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :param uids: A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs + in comma-separated format. For example, `423,51234`. + :type uids: List[int] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + names=names, + sids=sids, + uids=uids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'local_directory_service_ids', 'local_directory_service_names', 'names', 'sids', 'uids'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_users_delete_with_http_info', kwargs) + + def get_directory_services_local_users( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + uids: Annotated[Optional[conlist(StrictInt)], Field(description="A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs in comma-separated format. For example, `423,51234`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List local users + + Displays a list of local users. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param uids: A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs + in comma-separated format. For example, `423,51234`. + :type uids: List[int] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sids=sids, + sort=sort, + total_item_count=total_item_count, + uids=uids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sids', 'sort', 'uids'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_users_get_with_http_info', kwargs) + + def delete_directory_services_local_users_members( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + member_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete local user membership + + Deletes one or more local user memberships. The `member_names`, `member_sids`, or `member_ids` parameter is required, but cannot be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type group_gids: List[int] + :param group_names: Performs the operation on the group names specified. Enter multiple group names + in comma-separated format. For example, `group1,group2`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param member_ids: Performs the operation on the unique local member IDs specified. Enter multiple + member IDs in comma-separated format. For local group IDs refer to group IDs + (GID). For local user IDs refer to user IDs (UID). The `member_ids` and + `member_names` parameters cannot be provided together. + :type member_ids: List[int] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_sids: Performs the operation on the specified member SID. Enter multiple member SIDs + in comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type member_sids: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_gids=group_gids, + group_names=group_names, + group_sids=group_sids, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + member_ids=member_ids, + member_names=member_names, + member_sids=member_sids, + member_types=member_types, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_gids', 'group_names', 'group_sids', 'local_directory_service_ids', 'local_directory_service_names', 'member_ids', 'member_names', 'member_sids', 'member_types'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_users_members_delete_with_http_info', kwargs) + + def get_directory_services_local_users_members( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List local user memberships + + Displays a list of local user memberships. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma- + separated format. For example, `4234235,9681923`. + :type group_gids: List[int] + :param group_names: Performs the operation on the group names specified. Enter multiple group names + in comma-separated format. For example, `group1,group2`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique local member IDs specified. Enter multiple + member IDs in comma-separated format. For local group IDs refer to group IDs + (GID). For local user IDs refer to user IDs (UID). The `member_ids` and + `member_names` parameters cannot be provided together. + :type member_ids: List[int] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_sids: Performs the operation on the specified member SID. Enter multiple member SIDs + in comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type member_sids: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_gids=group_gids, + group_names=group_names, + group_sids=group_sids, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_sids=member_sids, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_gids', 'group_names', 'group_sids', 'member_ids', 'member_names', 'member_sids', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_users_members_get_with_http_info', kwargs) + + def post_directory_services_local_users_members( + self, + local_membership: Annotated['models.LocalUserMembershipPost', Field(..., description="The `group_names`, `group_sids`, or `group_gids` parameter is required, but cannot be set together.")], + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + member_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create local user membership + + Creates a local user membership with a group. The `member_names` or `member_sids` or `member_ids` parameter is required, but cannot be set together. + + :param local_membership: The `group_names`, `group_sids`, or `group_gids` parameter is required, but + cannot be set together. (required) + :type local_membership: LocalUserMembershipPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param member_ids: Performs the operation on the unique local member IDs specified. Enter multiple + member IDs in comma-separated format. For local group IDs refer to group IDs + (GID). For local user IDs refer to user IDs (UID). The `member_ids` and + `member_names` parameters cannot be provided together. + :type member_ids: List[int] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_sids: Performs the operation on the specified member SID. Enter multiple member SIDs + in comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type member_sids: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + local_membership=local_membership, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + member_ids=member_ids, + member_names=member_names, + member_sids=member_sids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'local_directory_service_ids', 'local_directory_service_names', 'member_ids', 'member_names', 'member_sids'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_users_members_post_with_http_info', kwargs) + + def patch_directory_services_local_users( + self, + local_user: 'models.LocalUserPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keep_open_sessions: Annotated[Optional[StrictBool], Field(description="If set to `true`, the session does not expire. If set to `false`, when the user is disabled or password is changed, the session expires. If not specified, defaults to `false`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + uids: Annotated[Optional[conlist(StrictInt)], Field(description="A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs in comma-separated format. For example, `423,51234`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify local user + + Modifies a local user. + + :param local_user: (required) + :type local_user: LocalUserPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keep_open_sessions: If set to `true`, the session does not expire. If set to `false`, when the user + is disabled or password is changed, the session expires. If not specified, + defaults to `false`. + :type keep_open_sessions: bool + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :param uids: A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs + in comma-separated format. For example, `423,51234`. + :type uids: List[int] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + local_user=local_user, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keep_open_sessions=keep_open_sessions, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + names=names, + sids=sids, + uids=uids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'local_directory_service_ids', 'local_directory_service_names', 'names', 'sids', 'uids'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_users_patch_with_http_info', kwargs) + + def post_directory_services_local_users( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + local_directory_services: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + local_user: Optional['models.LocalUserPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create local user + + Creates a local user. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param local_directory_services: A list of local_directory_services to query for. Overrides local_directory_service_ids and local_directory_service_names keyword arguments. + :type local_directory_services: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports + exactly one value. When not specified, the local directory service + connected to the `_array_server` will be used. This cannot be provided + in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param local_user: + :type local_user: LocalUserPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_directory_service_ids=local_directory_service_ids, + local_directory_service_names=local_directory_service_names, + local_user=local_user, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_directory_services, ['local_directory_service_ids', 'local_directory_service_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'local_directory_service_ids', 'local_directory_service_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_local_users_post_with_http_info', kwargs) + + def patch_directory_services( + self, + directory_service: 'models.DirectoryServicePatch', + to_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + to_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format.")] = None, + to_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify directory services configuration + + Modifies the directory service configuration. + + :param directory_service: (required) + :type directory_service: DirectoryServicePatch + :param to_members: A list of to_members to query for. Overrides to_member_ids and to_member_names keyword arguments. + :type to_members: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param to_member_ids: The resource will be moved to the specified local member realm or array. Enter + multiple IDs in a comma-separated format. + :type to_member_ids: List[str] + :param to_member_names: The resource will be moved to the specified local member realm or array. Enter + multiple names in a comma-separated format. + :type to_member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + directory_service=directory_service, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + to_member_ids=to_member_ids, + to_member_names=to_member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(to_members, ['to_member_ids', 'to_member_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'to_member_ids', 'to_member_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_patch_with_http_info', kwargs) + + def post_directory_services( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")], + directory_service: 'models.DirectoryServicePost', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create directory services configuration + + Creates directory services configuration. All directory services configuration created using this resource will have `services` set to `data`. + + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. (required) + :type names: List[str] + :param directory_service: (required) + :type directory_service: DirectoryServicePost + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + directory_service=directory_service, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_post_with_http_info', kwargs) + + def delete_directory_services_roles( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete group to management access policy mappings + + Deletes one or more group to management access policy mappings. + + :param names: Performs the operation on the unique names specified. For example, + `GroupRoleMappingName`. Enter multiple names in comma-separated format. + (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_roles_delete_with_http_info', kwargs) + + def get_directory_services_roles( + self, + roles: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + role_names: Annotated[Optional[conlist(StrictStr)], Field(description="This field has been deprecated.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List group to management access policy mappings + + Displays access control settings for remote groups. + + :param roles: A list of roles to query for. Overrides role_names keyword argument. + :type roles: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. For example, + `GroupRoleMappingName`. Enter multiple names in comma-separated format. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param role_names: This field has been deprecated. + :type role_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + role_names=role_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(roles, ['role_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'role_names', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_roles_get_with_http_info', kwargs) + + def patch_directory_services_roles( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format.")], + directory_service_roles: 'models.DirectoryServiceRole', + roles: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + role_names: Annotated[Optional[conlist(StrictStr)], Field(description="This field has been deprecated.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify group to management access policy mappings + + Modifies properties of one or more group to management access policy mappings. Modifying management access policies is done at `/directory-services/roles/policies/management-access` instead. + + :param names: Performs the operation on the unique names specified. For example, + `GroupRoleMappingName`. Enter multiple names in comma-separated format. + (required) + :type names: List[str] + :param directory_service_roles: (required) + :type directory_service_roles: DirectoryServiceRole + :param roles: A list of roles to query for. Overrides role_names keyword argument. + :type roles: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param role_names: This field has been deprecated. + :type role_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + directory_service_roles=directory_service_roles, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + role_names=role_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(roles, ['role_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'role_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_roles_patch_with_http_info', kwargs) + + def delete_directory_services_roles_policies_management_access( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership between a group to management access policy mapping and one or more management access policies + + Deletes a membership between a group to management access policy mapping with one or more management access policies. One of `policy_ids` or `policy_names` is required, and one of `member_ids` or `member_names` is required. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_roles_policies_management_access_delete_with_http_info', kwargs) + + def get_directory_services_roles_policies_management_access( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List management access policies attached to a group to management access policy mapping + + Displays a list of management access policies that are attached to a group to management access policy mappings. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_roles_policies_management_access_get_with_http_info', kwargs) + + def post_directory_services_roles_policies_management_access( + self, + policies: 'models.PolicyAssignmentPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a group to management access policy mapping with one or more management access policies + + Creates a membership between a group to management access policy mapping with one or more management access policies. One of `member_ids` or `member_names` parameter is required. + + :param policies: (required) + :type policies: PolicyAssignmentPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_roles_policies_management_access_post_with_http_info', kwargs) + + def post_directory_services_roles( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format.")], + directory_service_roles: 'models.DirectoryServiceRolePost', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a group in management access policy mappings + + Creates one or more groups in management access policy mappings. + + :param names: Performs the operation on the unique names specified. For example, + `GroupRoleMappingName`. Enter multiple names in comma-separated format. + (required) + :type names: List[str] + :param directory_service_roles: (required) + :type directory_service_roles: DirectoryServiceRolePost + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + directory_service_roles=directory_service_roles, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_roles_post_with_http_info', kwargs) + + def get_directory_services_test( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET directory-service/test + + The diagnostic utility that verifies the status and configuration of the `directory services` on the `array`. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param servers: A list of servers to query for. Overrides server_names keyword argument. + :type servers: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names and ids keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + offset=offset, + server_names=server_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names', 'ids'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(servers, ['server_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'ids', 'server_names', 'sort'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_test_get_with_http_info', kwargs) + + def patch_directory_services_test( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + directory_service: Annotated[Optional['models.DirectoryServicePatch'], Field(description="The optional `directory service` `configuration` used to temporarily overwrite specific attributes of existing `objects` during diagnostic testing. These modifications are applied only within the scope of the test and do not persist or alter the current active system settings.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """PATCH directory-service/test + + The diagnostic utility that verifies the status of the configured `directory services` on the `array`. This process supports the optional provision of `configuration` modifications, allowing for validation of proposed changes in a test environment without affecting the current active settings. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param servers: A list of servers to query for. Overrides server_names keyword argument. + :type servers: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names and ids keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :param directory_service: The optional `directory service` `configuration` used to temporarily overwrite + specific attributes of existing `objects` during diagnostic testing. These + modifications are applied only within the scope of the test and do not + persist or alter the current active system settings. + :type directory_service: DirectoryServicePatch + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + server_names=server_names, + directory_service=directory_service, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names', 'ids'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(servers, ['server_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'ids', 'server_names'], kwargs) + return self._call_api('DirectoryServicesApi', 'api256_directory_services_test_patch_with_http_info', kwargs) + + def delete_directory_snapshots( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete directory snapshot + + Deletes a directory snapshot that has been destroyed and is pending eradication. Eradicated directory snapshots cannot be recovered. Directory snapshots are destroyed by using the PATCH method. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DirectorySnapshotsApi', 'api256_directory_snapshots_delete_with_http_info', kwargs) + + def get_directory_snapshots( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List directory snapshots + + Displays a list of directory snapshots, including those pending eradication. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('DirectorySnapshotsApi', 'api256_directory_snapshots_get_with_http_info', kwargs) + + def patch_directory_snapshots( + self, + directory_snapshot: 'models.DirectorySnapshotPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify directory snapshot + + Modifies a directory snapshot. You can destroy, recover, or update the policy or time remaining of a directory snapshot. To destroy a directory snapshot, set `destroyed=true`. To recover a directory snapshot that has been destroyed and is pending eradication, set `destroyed=false`. To rename a directory snapshot, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param directory_snapshot: (required) + :type directory_snapshot: DirectorySnapshotPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + directory_snapshot=directory_snapshot, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('DirectorySnapshotsApi', 'api256_directory_snapshots_patch_with_http_info', kwargs) + + def post_directory_snapshots( + self, + directory_snapshot: 'models.DirectorySnapshotPost', + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create directory snapshot + + Creates a snapshot of the contents of a directory. The `source_ids` or `source_names` parameter is required, but they cannot be set together. + + :param directory_snapshot: (required) + :type directory_snapshot: DirectorySnapshotPost + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + directory_snapshot=directory_snapshot, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + source_ids=source_ids, + source_names=source_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('DirectorySnapshotsApi', 'api256_directory_snapshots_post_with_http_info', kwargs) + + def get_drives( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List flash, NVRAM, and cache modules + + Displays a list of flash, NVRAM, and cache modules that are installed in the array along with their attributes and status. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('DrivesApi', 'api256_drives_get_with_http_info', kwargs) + + def patch_drives( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + admit: Annotated[Optional[StrictBool], Field(description="If `true`, admits any `unadmitted` drives into the system.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify flash and NVRAM modules + + Modifies flash and NVRAM modules that have been added or connected but not yet admitted to the array. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param admit: If `true`, admits any `unadmitted` drives into the system. + :type admit: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + admit=admit, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('DrivesApi', 'api256_drives_patch_with_http_info', kwargs) + + def delete_file_systems( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete file system + + Deletes a file system that has been destroyed and is pending eradication. Eradicated file systems cannot be recovered. File systems are destroyed using the PATCH method. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('FileSystemsApi', 'api256_file_systems_delete_with_http_info', kwargs) + + def get_file_systems( + self, + workloads: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + workload_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter.")] = None, + workload_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List file systems + + Displays a list of file systems, including those pending eradication. + + :param workloads: A list of workloads to query for. Overrides workload_ids and workload_names keyword arguments. + :type workloads: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param workload_ids: A comma-separated list of workload IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_names` query + parameter. + :type workload_ids: List[str] + :param workload_names: A comma-separated list of workload names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_ids` query + parameter. + :type workload_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + workload_ids=workload_ids, + workload_names=workload_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(workloads, ['workload_ids', 'workload_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'workload_ids', 'workload_names'], kwargs) + return self._call_api('FileSystemsApi', 'api256_file_systems_get_with_http_info', kwargs) + + def patch_file_systems( + self, + file_system: 'models.FileSystemPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a file system + + Modifies a file system. You can rename, destroy, move, or recover a file system. To rename a file system, set `name` to the new name. To destroy a file system, set `destroyed=true`. To move a file system, set 'pod' to the destination pod reference. To recover a file system that has been destroyed and is pending eradication, set `destroyed=false`. + + :param file_system: (required) + :type file_system: FileSystemPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + file_system=file_system, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('FileSystemsApi', 'api256_file_systems_patch_with_http_info', kwargs) + + def post_file_systems( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + add_to_policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + add_to_policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The root directories of the file systems will become members of the specified policies along with creation. Enter multiple ids in comma-separated format.")] = None, + add_to_policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="The root directories of the file systems will become members of the specified policies along with creation. Enter multiple names in a comma-separated format.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the initial protection of the root directories of the newly created file systems will be the union of the container default protection configuration and either `add_to_policy_names` or `add_to_policy_ids`. If specified as `false`, the default protection of the container will not be applied automatically. The initial protection of the root directories of the newly created file systems will be configured by either `add_to_policy_names` or `add_to_policy_ids`. If not specified, defaults to `true`.")] = None, + file_system: Optional['models.FileSystemPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create file system + + Creates one or more file systems. The `add_to_policy_names` and `add_to_policy_ids` query parameters specify a list of policy names or ids, respectively, that will be applied to the root directory of the newly created file system. These parameters are mutually exclusive. The `with_default_protection` query parameter specifies whether to use the container default protection configuration for the root directory of the file system. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param add_to_policies: A list of add_to_policies to query for. Overrides add_to_policy_ids and add_to_policy_names keyword arguments. + :type add_to_policies: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param add_to_policy_ids: The root directories of the file systems will become members of the specified + policies along with creation. Enter multiple ids in comma-separated + format. + :type add_to_policy_ids: List[str] + :param add_to_policy_names: The root directories of the file systems will become members of the specified + policies along with creation. Enter multiple names in a comma-separated + format. + :type add_to_policy_names: List[str] + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param with_default_protection: If specified as `true`, the initial protection of the root directories of the + newly created file systems will be the union of the container default + protection configuration and either `add_to_policy_names` or + `add_to_policy_ids`. If specified as `false`, the default protection of + the container will not be applied automatically. The initial protection + of the root directories of the newly created file systems will be + configured by either `add_to_policy_names` or `add_to_policy_ids`. If + not specified, defaults to `true`. + :type with_default_protection: bool + :param file_system: + :type file_system: FileSystemPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + add_to_policy_ids=add_to_policy_ids, + add_to_policy_names=add_to_policy_names, + context_names=context_names, + names=names, + with_default_protection=with_default_protection, + file_system=file_system, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(add_to_policies, ['add_to_policy_ids', 'add_to_policy_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['add_to_policy_ids', 'add_to_policy_names', 'context_names', 'names'], kwargs) + return self._call_api('FileSystemsApi', 'api256_file_systems_post_with_http_info', kwargs) + + def post_files( + self, + source_file: 'models.FilePost', + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. For example, `fs:dir01,fs:dir02`.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + paths: Annotated[Optional[conlist(StrictStr)], Field(description="Target file path relative to the target directory. Enter multiple target file path in a comma-separated format. For example, `/dir1/dir2/file1,/dir3/dir4/file2`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a file copy + + Creates a file copy from one path to another path. The `directory_ids`, `directory_names` or `paths` value must be specified. If the `directory_ids` or `directory_names` value is not specified, the file is copied to the source directory specified in the body params. The `paths` value refers to the path of the target file relative to the target directory. If `paths` value is not specified, the file will be copied to the relative path specified in `source_path` under the target directory. The `source_path` value refers to the path of the source file relative to the source directory. To overwrite an existing file, set the `overwrite` flag to `true`. + + :param source_file: (required) + :type source_file: FilePost + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. For example, + `fs:dir01,fs:dir02`. + :type directory_names: List[str] + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :param paths: Target file path relative to the target directory. Enter multiple target file + path in a comma-separated format. For example, + `/dir1/dir2/file1,/dir3/dir4/file2`. + :type paths: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + source_file=source_file, + authorization=authorization, + x_request_id=x_request_id, + directory_ids=directory_ids, + directory_names=directory_names, + overwrite=overwrite, + paths=paths, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _fixup_list_type_params(['directory_ids', 'directory_names', 'paths'], kwargs) + return self._call_api('FilesApi', 'api256_files_post_with_http_info', kwargs) + + def delete_fleets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a fleet + + Deletes a fleet, permanently. A fleet can only be deleted if the current array is the only array in the fleet. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: Performs the operation on the unique resource IDs specified. Only one value is + supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('FleetsApi', 'api256_fleets_delete_with_http_info', kwargs) + + def get_fleets_fleet_key( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Get fleet key information + + Displays the time remaining on the fleet key. Note, fleet key itself is not displayed, since that is only available at time of fleet key creation. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('FleetsApi', 'api256_fleets_fleet_key_get_with_http_info', kwargs) + + def post_fleets_fleet_key( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a fleet key + + Creates a fleet key allowing an array to be added to a fleet. This is the only time the fleet key is displayed, it cannot be retrieved subsequently. Note, creation of a subsequent key invalidates all keys created earlier. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('FleetsApi', 'api256_fleets_fleet_key_post_with_http_info', kwargs) + + def get_fleets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List fleets + + Displays information about the fleets known to the array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('FleetsApi', 'api256_fleets_get_with_http_info', kwargs) + + def delete_fleets_members( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + unreachable: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows a one-sided disconnect when the connection status is `connecting` instead of `connected` or `partially connected`. If set to `false`, it works just like normal coordinated disconnect. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete fleet members + + Deletes the specified array(s) from the fleet. Note that this will only succeed if the array(s) to be removed are not making use of any fleet resources. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param unreachable: If set to `true`, allows a one-sided disconnect when the connection status is + `connecting` instead of `connected` or `partially connected`. If set to + `false`, it works just like normal coordinated disconnect. If not + specified, defaults to `false`. + :type unreachable: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + member_ids=member_ids, + member_names=member_names, + unreachable=unreachable, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['member_ids', 'member_names'], kwargs) + return self._call_api('FleetsApi', 'api256_fleets_members_delete_with_http_info', kwargs) + + def get_fleets_members( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + fleets: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + fleet_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique Fleet IDs specified. This query currently accepts only 1 ID.")] = None, + fleet_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique Fleet names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. This query currently accepts only 1 name.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List fleet members + + Displays the members in the current fleet. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param fleets: A list of fleets to query for. Overrides fleet_ids and fleet_names keyword arguments. + :type fleets: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param fleet_ids: Performs the operation on the unique Fleet IDs specified. This query currently + accepts only 1 ID. + :type fleet_ids: List[str] + :param fleet_names: Performs the operation on the unique Fleet names specified. Enter multiple names + in comma-separated format. For example, `name01,name02`. This query + currently accepts only 1 name. + :type fleet_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + fleet_ids=fleet_ids, + fleet_names=fleet_names, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(fleets, ['fleet_ids', 'fleet_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['fleet_ids', 'fleet_names', 'member_ids', 'member_names', 'sort'], kwargs) + return self._call_api('FleetsApi', 'api256_fleets_members_get_with_http_info', kwargs) + + def post_fleets_members( + self, + fleets: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + fleet_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique Fleet IDs specified. This query currently accepts only 1 ID.")] = None, + fleet_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique Fleet names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. This query currently accepts only 1 name.")] = None, + members: Annotated[Optional['models.FleetMemberPost'], Field(description="Info about the members being added to fleet.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Add members to a fleet + + Adds arrays to an existing fleet. This API needs to be run from the array that's joining the fleet. To add the current array to the fleet, specify its own array `id` or `name`, as well as the `fleet key` generated on any array already in the fleet. `resource_type` is `remote-arrays`. The array's `ID` and `name` can be retrieved with a call to `GET /arrays` on the array. + + :param fleets: A list of fleets to query for. Overrides fleet_ids and fleet_names keyword arguments. + :type fleets: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param fleet_ids: Performs the operation on the unique Fleet IDs specified. This query currently + accepts only 1 ID. + :type fleet_ids: List[str] + :param fleet_names: Performs the operation on the unique Fleet names specified. Enter multiple names + in comma-separated format. For example, `name01,name02`. This query + currently accepts only 1 name. + :type fleet_names: List[str] + :param members: Info about the members being added to fleet. + :type members: FleetMemberPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + fleet_ids=fleet_ids, + fleet_names=fleet_names, + members=members, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(fleets, ['fleet_ids', 'fleet_names'], kwargs) + _fixup_list_type_params(['fleet_ids', 'fleet_names'], kwargs) + return self._call_api('FleetsApi', 'api256_fleets_members_post_with_http_info', kwargs) + + def patch_fleets( + self, + fleet: 'models.FleetPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a fleet + + Modifies a fleet, changing its name by passing the old name in `name` query parameter, and the new name in the `name` parameter in the request body. + + :param fleet: (required) + :type fleet: FleetPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: Performs the operation on the unique resource IDs specified. Only one value is + supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + fleet=fleet, + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('FleetsApi', 'api256_fleets_patch_with_http_info', kwargs) + + def post_fleets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a fleet + + Creates a fleet and adds the current array as its first member. Additional arrays can be added to the fleet with `POST /fleets/members`. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('FleetsApi', 'api256_fleets_post_with_http_info', kwargs) + + def get_hardware( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List hardware component information + + Displays a list of hardware slots and bays and status of installed components. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('HardwareApi', 'api256_hardware_get_with_http_info', kwargs) + + def patch_hardware( + self, + hardware: 'models.HardwarePatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify visual identification + + Modifies the visual identification of a specified hardware component, and causing the ID LED to turn on or off. + + :param hardware: (required) + :type hardware: HardwarePatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + hardware=hardware, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('HardwareApi', 'api256_hardware_patch_with_http_info', kwargs) + + def delete_host_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a host group + + Deletes a host group in which the `names` query parameter is required. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_delete_with_http_info', kwargs) + + def get_host_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host groups + + Displays a list of host groups. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_get_with_http_info', kwargs) + + def delete_host_groups_hosts( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership from a host group + + Deletes a membership from a host group. Removing a membership from a host group automatically disconnects the host from all volumes associated with the group. Hosts can be removed from host groups at any time. The `group_names` and `member_names` parameters are required and must be set together, and only one host group can be specified at a time. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_names', 'member_names'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_hosts_delete_with_http_info', kwargs) + + def get_host_groups_hosts( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host groups that are associated with hosts + + Displays a list of host groups that are associated with hosts. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_names=group_names, + limit=limit, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_names', 'member_names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_hosts_get_with_http_info', kwargs) + + def post_host_groups_hosts( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership to a host group + + Create a membership between a host and a host group. Adding a membership to a host group automatically connects the host to all volumes associated with the group. Multiple hosts can be belong to a host group, but a host can only belong to one host group. Hosts can be added to host groups at any time. The `group_names` and `member_names` parameters are required and must be set together, and only one host group can be specified at a time. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_names', 'member_names'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_hosts_post_with_http_info', kwargs) + + def patch_host_groups( + self, + host_group: 'models.HostGroupPatch', + to_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + from_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + from_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays from which the resource should be removed. Enter multiple IDs in a comma-separated format.")] = None, + from_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays to be removed from the specified resource. Enter multiple names in a comma-separated format.")] = None, + modify_resource_access: Annotated[Optional[StrictStr], Field(description="Describes how to modify a resource accesses of a resource when that resource is moved. Possible values are: `none`, `create`, and `delete`. The `none` value indicates that no resource access should be modified. The `create` value is used when a resource is moving out of a realm into the array and it needs to create a resource access of the moved resource to the realm from which it is moving. The `delete` value is used when a resource that is moving from an array into a realm already has a resource access into that realm. This is a required parameter when a resource is being moved to another member.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + to_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format.")] = None, + to_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a host group + + Modifies a host group in which the `names` query parameter is required. + + :param host_group: (required) + :type host_group: HostGroupPatch + :param to_members: A list of to_members to query for. Overrides to_member_ids and to_member_names keyword arguments. + :type to_members: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param from_members: A list of from_members to query for. Overrides from_member_ids and from_member_names keyword arguments. + :type from_members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param from_member_ids: Move the resource from the specified local member realm or array. This should be + a union of all local realms and arrays from which the resource should be + removed. Enter multiple IDs in a comma-separated format. + :type from_member_ids: List[str] + :param from_member_names: Move the resource from the specified local member realm or array. This should be + a union of all local realms and arrays to be removed from the specified + resource. Enter multiple names in a comma-separated format. + :type from_member_names: List[str] + :param modify_resource_access: Describes how to modify a resource accesses of a resource when that resource is moved. Possible values are: `none`, `create`, and `delete`. The `none` value indicates that no resource + access should be modified. The `create` value + is used when a resource is moving out of a + realm into the array and it needs to create a + resource access of the moved resource to the + realm from which it is moving. The `delete` + value is used when a resource that is moving + from an array into a realm already has a + resource access into that realm. This is a + required parameter when a resource is being + moved to another member. + :type modify_resource_access: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param to_member_ids: The resource will be moved to the specified local member realm or array. Enter + multiple IDs in a comma-separated format. + :type to_member_ids: List[str] + :param to_member_names: The resource will be moved to the specified local member realm or array. Enter + multiple names in a comma-separated format. + :type to_member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + host_group=host_group, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + from_member_ids=from_member_ids, + from_member_names=from_member_names, + modify_resource_access=modify_resource_access, + names=names, + to_member_ids=to_member_ids, + to_member_names=to_member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(from_members, ['from_member_ids', 'from_member_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(to_members, ['to_member_ids', 'to_member_names'], kwargs) + _fixup_list_type_params(['context_names', 'from_member_ids', 'from_member_names', 'names', 'to_member_ids', 'to_member_names'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_patch_with_http_info', kwargs) + + def get_host_groups_performance_by_array( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host group performance data by array + + Displays real-time and historical performance data, real-time latency data, and average I/O size data. The data is displayed by total size across all host groups on each array and by individual host group on each array. The displayed data represents the volumes that are connected to a host group on the current array and the volumes that are connected to a host group on any remote arrays that are visible to the current array. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_performance_by_array_get_with_http_info', kwargs) + + def get_host_groups_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host group performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes of all host groups, displayed both by host group and by total size across all host groups. This data represents volumes that are connected to the host groups on the local array and stretched volumes connected to the host groups on arrays that are connected by synchronous replication. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_performance_get_with_http_info', kwargs) + + def post_host_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + host_group: Optional['models.HostGroupPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a host group and upsert tags + + Creates a host group in which the `names` query parameter is required. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param host_group: + :type host_group: HostGroupPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + host_group=host_group, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_post_with_http_info', kwargs) + + def delete_host_groups_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a host group from a protection group + + Deletes a host group member from a protection group. After the member has been removed, it is no longer protected by the group. Any protection group snapshots that were taken before the member was removed are not affected. Removing a member from a protection group does not delete the member from the array or realm, and the member can be added back to the protection group at any time. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host group. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_protection_groups_delete_with_http_info', kwargs) + + def get_host_groups_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host groups that are members of protection groups + + Displays a list of host group members that belong to one or more protection groups. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_protection_groups_get_with_http_info', kwargs) + + def post_host_groups_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a host group + + Creates a host group member and assigns to a protection group. Members that are already in the protection group are not affected. For asynchronous replication, only members of the same type can belong to a protection group. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host group. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_protection_groups_post_with_http_info', kwargs) + + def get_host_groups_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host group QoS config + + Displays real-time and historical QoS config data for each host group. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_qos_get_with_http_info', kwargs) + + def get_host_groups_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host group space information + + Displays provisioned size and physical storage consumption data for each host group. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_space_get_with_http_info', kwargs) + + def put_host_groups_tags_batch( + self, + tag: Annotated[conlist('models.NonCopyableTagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if one already exists, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags. + + :param tag: A list of tags to be created or, if one already exists, updated. (required) + :type tag: List[NonCopyableTagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_tags_batch_put_with_http_info', kwargs) + + def delete_host_groups_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags on host group objects. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_tags_delete_with_http_info', kwargs) + + def get_host_groups_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags on host group objects. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('HostGroupsApi', 'api256_host_groups_tags_get_with_http_info', kwargs) + + def delete_hosts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a host + + Deletes an existing host. All volumes that are connected to the host, either through private or shared connections, must be disconnected from the host before the host can be deleted. The `names` query parameter is required. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_delete_with_http_info', kwargs) + + def get_hosts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List hosts + + Displays a list of hosts. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_get_with_http_info', kwargs) + + def delete_hosts_host_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a membership from a host group + + Deletes a membership from a host group. Deleting a membership from a host group automatically disconnects the host from all volumes associated with the group. Hosts can be deleted from host groups at any time. The `group_names` and `member_names` parameters are required and must be set together, and only one host group can be specified at a time. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_names', 'member_names'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_host_groups_delete_with_http_info', kwargs) + + def get_hosts_host_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List hosts that are associated with host groups + + Displays a list of hosts that are associated with host groups. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_names=group_names, + limit=limit, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_names', 'member_names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_host_groups_get_with_http_info', kwargs) + + def post_hosts_host_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership to a host group + + Creates a membership to a host group. Creating a membership to a host group automatically connects the host to all volumes associated with the group. Multiple hosts can be belong to a host group, but a host can only belong to one host group. Hosts can be added to host groups at any time. The `group_names` and `member_names` parameters are required and must be set together, and only one host group can be specified at a time. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_names keyword argument. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_names', 'member_names'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_host_groups_post_with_http_info', kwargs) + + def patch_hosts( + self, + host: 'models.HostPatch', + to_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + from_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + from_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays from which the resource should be removed. Enter multiple IDs in a comma-separated format.")] = None, + from_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays to be removed from the specified resource. Enter multiple names in a comma-separated format.")] = None, + modify_resource_access: Annotated[Optional[StrictStr], Field(description="Describes how to modify a resource accesses of a resource when that resource is moved. Possible values are: `none`, `create`, and `delete`. The `none` value indicates that no resource access should be modified. The `create` value is used when a resource is moving out of a realm into the array and it needs to create a resource access of the moved resource to the realm from which it is moving. The `delete` value is used when a resource that is moving from an array into a realm already has a resource access into that realm. This is a required parameter when a resource is being moved to another member.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + to_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format.")] = None, + to_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a host + + Modifies an existing host, including its storage network addresses, CHAP, host personality, and preferred arrays, or associate a host to a host group. The `names` query parameter is required. + + :param host: (required) + :type host: HostPatch + :param to_members: A list of to_members to query for. Overrides to_member_ids and to_member_names keyword arguments. + :type to_members: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param from_members: A list of from_members to query for. Overrides from_member_ids and from_member_names keyword arguments. + :type from_members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param from_member_ids: Move the resource from the specified local member realm or array. This should be + a union of all local realms and arrays from which the resource should be + removed. Enter multiple IDs in a comma-separated format. + :type from_member_ids: List[str] + :param from_member_names: Move the resource from the specified local member realm or array. This should be + a union of all local realms and arrays to be removed from the specified + resource. Enter multiple names in a comma-separated format. + :type from_member_names: List[str] + :param modify_resource_access: Describes how to modify a resource accesses of a resource when that resource is moved. Possible values are: `none`, `create`, and `delete`. The `none` value indicates that no resource + access should be modified. The `create` value + is used when a resource is moving out of a + realm into the array and it needs to create a + resource access of the moved resource to the + realm from which it is moving. The `delete` + value is used when a resource that is moving + from an array into a realm already has a + resource access into that realm. This is a + required parameter when a resource is being + moved to another member. + :type modify_resource_access: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param to_member_ids: The resource will be moved to the specified local member realm or array. Enter + multiple IDs in a comma-separated format. + :type to_member_ids: List[str] + :param to_member_names: The resource will be moved to the specified local member realm or array. Enter + multiple names in a comma-separated format. + :type to_member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + host=host, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + from_member_ids=from_member_ids, + from_member_names=from_member_names, + modify_resource_access=modify_resource_access, + names=names, + to_member_ids=to_member_ids, + to_member_names=to_member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(from_members, ['from_member_ids', 'from_member_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(to_members, ['to_member_ids', 'to_member_names'], kwargs) + _fixup_list_type_params(['context_names', 'from_member_ids', 'from_member_names', 'names', 'to_member_ids', 'to_member_names'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_patch_with_http_info', kwargs) + + def get_hosts_performance_balance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host performance balance + + Displays the I/O balance statistics for host paths. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_performance_balance_get_with_http_info', kwargs) + + def get_hosts_performance_by_array( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host performance data by array + + Displays real-time and historical performance data, real-time latency data, and average I/O size data. The data is displayed by total size across all hosts on each array and by individual host on each array. The displayed data represents the volumes that are connected to a host on the current array and the volumes that are connected to a host on any remote arrays that are visible to the current array. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_performance_by_array_get_with_http_info', kwargs) + + def get_hosts_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes across all hosts, displayed by host and by total size across all hosts. This data represents volumes that are connected to the hosts on the local array and stretched volumes connected to the hosts on any arrays that are connected by synchronous replication. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_performance_get_with_http_info', kwargs) + + def post_hosts( + self, + host: 'models.HostPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a host and upsert tags + + Creates a host for which the `names` query parameter is required. + + :param host: (required) + :type host: HostPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + host=host, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_post_with_http_info', kwargs) + + def delete_hosts_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a host from a protection group + + Deletes a host member from a protection group. After the member has been removed, it is no longer protected by the group. Any protection group snapshots that were taken before the member was removed are not affected. Removing a member from a protection group does not delete the member from the array or realm, and the member can be added back to the protection group at any time. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_protection_groups_delete_with_http_info', kwargs) + + def get_hosts_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List hosts that are members of protection groups + + Displays a list of host members that belong to one or more protection groups. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_protection_groups_get_with_http_info', kwargs) + + def post_hosts_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a host + + Creates a host member and adds it to a protection group. Members that are already in the protection group are not affected. For asynchronous replication, only members of the same type can belong to a protection group. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_protection_groups_post_with_http_info', kwargs) + + def get_hosts_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host QoS config + + Displays real-time and historical QoS config data for each host. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_qos_get_with_http_info', kwargs) + + def get_hosts_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List host space information + + Displays provisioned size and physical storage consumption data for each host. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_space_get_with_http_info', kwargs) + + def put_hosts_tags_batch( + self, + tag: Annotated[conlist('models.NonCopyableTagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if one already exists, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags. + + :param tag: A list of tags to be created or, if one already exists, updated. (required) + :type tag: List[NonCopyableTagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_tags_batch_put_with_http_info', kwargs) + + def delete_hosts_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags on host objects. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_tags_delete_with_http_info', kwargs) + + def get_hosts_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags on host objects. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('HostsApi', 'api256_hosts_tags_get_with_http_info', kwargs) + + def delete_kmip( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete KMIP server object + + Deletes KMIP server objects. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('KMIPApi', 'api256_kmip_delete_with_http_info', kwargs) + + def get_kmip( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List KMIP server objects + + Displays the list of KMIP server objects. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('KMIPApi', 'api256_kmip_get_with_http_info', kwargs) + + def patch_kmip( + self, + kmip: 'models.KmipPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify KMIP attributes + + Modifies one or more attributes of KMIP server objects. + + :param kmip: (required) + :type kmip: KmipPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + kmip=kmip, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('KMIPApi', 'api256_kmip_patch_with_http_info', kwargs) + + def post_kmip( + self, + kmip: 'models.KmipPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create KMIP server object + + Creates KMIP server objects. + + :param kmip: (required) + :type kmip: KmipPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + kmip=kmip, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('KMIPApi', 'api256_kmip_post_with_http_info', kwargs) + + def get_kmip_test( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Lists KMIP connection tests + + Displays communication data between a FlashArray and KMIP server. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('KMIPApi', 'api256_kmip_test_get_with_http_info', kwargs) + + def delete_lifecycle_rules( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + buckets: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + bucket_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`.")] = None, + bucket_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE lifecycle-rules + + Deletes individual lifecycle rules by name or id, or deletes all rules for a bucket. If `ids` is specified, `bucket_names` or `bucket_ids` is also required. If `bucket_names` or `bucket_ids` are specified without `ids`, delete all the rules for the bucket. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param buckets: A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + :type buckets: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least + one resource that matches each of the elements of `bucket_ids`, then an + error is returned. This cannot be provided together with the `bucket_names` + query parameter. This can be provided with the `ids` query parameter but not + with `names`. + :type bucket_ids: List[str] + :param bucket_names: A comma-separated list of bucket names. If there is not at least one resource + that matches each of the elements of `bucket_names`, then an error is + returned. This cannot be provided together with the `bucket_ids` query + parameter. This can be provided with the `ids` query parameter but not with + `names`. + :type bucket_names: List[str] + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['bucket_ids', 'bucket_names', 'context_names', 'ids', 'names'], kwargs) + return self._call_api('LifecycleRulesApi', 'api256_lifecycle_rules_delete_with_http_info', kwargs) + + def get_lifecycle_rules( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + buckets: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + bucket_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`.")] = None, + bucket_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET lifecycle-rules + + Returns a list of lifecycle rules. When `names` is specified, list the individual rules. When `ids` is specified, `bucket_names` or `bucket_ids` is also required. When `bucket_names` or `bucket_ids` are specified without `ids`, if there are at most 10 buckets with lifecycle rules in the system, list all the rules for the bucket, else it returns an error. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param buckets: A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + :type buckets: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least + one resource that matches each of the elements of `bucket_ids`, then an + error is returned. This cannot be provided together with the `bucket_names` + query parameter. This can be provided with the `ids` query parameter but not + with `names`. + :type bucket_ids: List[str] + :param bucket_names: A comma-separated list of bucket names. If there is not at least one resource + that matches each of the elements of `bucket_names`, then an error is + returned. This cannot be provided together with the `bucket_ids` query + parameter. This can be provided with the `ids` query parameter but not with + `names`. + :type bucket_names: List[str] + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['bucket_ids', 'bucket_names', 'context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('LifecycleRulesApi', 'api256_lifecycle_rules_get_with_http_info', kwargs) + + def patch_lifecycle_rules( + self, + lifecycle: 'models.LifecycleRulePatchBase', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + buckets: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + bucket_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of bucket IDs. If after filtering, there is not at least one resource that matches each of the elements of `bucket_ids`, then an error is returned. This cannot be provided together with the `bucket_names` query parameter. This can be provided with the `ids` query parameter but not with `names`.")] = None, + bucket_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of bucket names. If there is not at least one resource that matches each of the elements of `bucket_names`, then an error is returned. This cannot be provided together with the `bucket_ids` query parameter. This can be provided with the `ids` query parameter but not with `names`.")] = None, + confirm_date: Annotated[Optional[StrictBool], Field(description="If set to `true`, then confirm the date of `keep_current_version_until` is correct.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """PATCH lifecycle-rules + + Modify an existing lifecycle rule by name or id. If `ids` is specified, `bucket_names` or `bucket_ids` is also required. + + :param lifecycle: (required) + :type lifecycle: LifecycleRulePatchBase + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param buckets: A list of buckets to query for. Overrides bucket_ids and bucket_names keyword arguments. + :type buckets: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param bucket_ids: A comma-separated list of bucket IDs. If after filtering, there is not at least + one resource that matches each of the elements of `bucket_ids`, then an + error is returned. This cannot be provided together with the `bucket_names` + query parameter. This can be provided with the `ids` query parameter but not + with `names`. + :type bucket_ids: List[str] + :param bucket_names: A comma-separated list of bucket names. If there is not at least one resource + that matches each of the elements of `bucket_names`, then an error is + returned. This cannot be provided together with the `bucket_ids` query + parameter. This can be provided with the `ids` query parameter but not with + `names`. + :type bucket_names: List[str] + :param confirm_date: If set to `true`, then confirm the date of `keep_current_version_until` is + correct. + :type confirm_date: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + lifecycle=lifecycle, + x_request_id=x_request_id, + bucket_ids=bucket_ids, + bucket_names=bucket_names, + confirm_date=confirm_date, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(buckets, ['bucket_ids', 'bucket_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['bucket_ids', 'bucket_names', 'context_names', 'ids', 'names'], kwargs) + return self._call_api('LifecycleRulesApi', 'api256_lifecycle_rules_patch_with_http_info', kwargs) + + def post_lifecycle_rules( + self, + rule: 'models.LifecycleRulePostBase', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + confirm_date: Annotated[Optional[StrictBool], Field(description="If set to `true`, then confirm the date of `keep_current_version_until` is correct.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST lifecycle-rules + + Creates a lifecycle rule. `bucket` and `keep_previous_version_for` are required. If `rule_id` is not specified, it will be automatically generated in the format "faRuleIdX". + + :param rule: (required) + :type rule: LifecycleRulePostBase + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param confirm_date: If set to `true`, then confirm the date of `keep_current_version_until` is + correct. + :type confirm_date: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rule=rule, + x_request_id=x_request_id, + confirm_date=confirm_date, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('LifecycleRulesApi', 'api256_lifecycle_rules_post_with_http_info', kwargs) + + def delete_log_targets_file( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete file log target + + Deletes a configured file log target. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('LogTargetsApi', 'api256_log_targets_file_delete_with_http_info', kwargs) + + def get_log_targets_file( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List file log targets + + Displays a list of configured file log targets. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('LogTargetsApi', 'api256_log_targets_file_get_with_http_info', kwargs) + + def patch_log_targets_file( + self, + log_target_file: 'models.LogTargetFile', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify file log target + + Modifies the URI of a configured file log target. + + :param log_target_file: (required) + :type log_target_file: LogTargetFile + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + log_target_file=log_target_file, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('LogTargetsApi', 'api256_log_targets_file_patch_with_http_info', kwargs) + + def post_log_targets_file( + self, + log_target_file: 'models.LogTargetFile', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create file log target + + Creates a new file log target. + + :param log_target_file: (required) + :type log_target_file: LogTargetFile + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + log_target_file=log_target_file, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('LogTargetsApi', 'api256_log_targets_file_post_with_http_info', kwargs) + + def get_log_targets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List log targets + + Displays a list of configured log targets. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('LogTargetsApi', 'api256_log_targets_get_with_http_info', kwargs) + + def delete_log_targets_syslog( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete syslog server + + Deletes a configured syslog server and stop forwarding syslog messages. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('LogTargetsApi', 'api256_log_targets_syslog_delete_with_http_info', kwargs) + + def get_log_targets_syslog( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List syslog servers + + Displays a list of configured syslog servers. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('LogTargetsApi', 'api256_log_targets_syslog_get_with_http_info', kwargs) + + def patch_log_targets_syslog( + self, + syslog_server: 'models.SyslogServer', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify syslog server + + Modifies the URI and services of a configured syslog server. + + :param syslog_server: (required) + :type syslog_server: SyslogServer + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + syslog_server=syslog_server, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('LogTargetsApi', 'api256_log_targets_syslog_patch_with_http_info', kwargs) + + def post_log_targets_syslog( + self, + syslog_server: 'models.SyslogServer', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create syslog server + + Creates a new syslog server. + + :param syslog_server: (required) + :type syslog_server: SyslogServer + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + syslog_server=syslog_server, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('LogTargetsApi', 'api256_log_targets_syslog_post_with_http_info', kwargs) + + def get_log_targets_syslog_settings( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List syslog settings + + Displays syslog settings. Values include `continuation_token`, `items`, `more_items_remaining`, and `total_item_count`. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('LogTargetsApi', 'api256_log_targets_syslog_settings_get_with_http_info', kwargs) + + def patch_log_targets_syslog_settings( + self, + syslog_server_settings: 'models.SyslogServerSettings', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify syslog settings + + Modifies syslog settings. Values include `continuation_token`, `items`, `more_items_remaining`, and `total_item_count`. + + :param syslog_server_settings: (required) + :type syslog_server_settings: SyslogServerSettings + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + syslog_server_settings=syslog_server_settings, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('LogTargetsApi', 'api256_log_targets_syslog_settings_patch_with_http_info', kwargs) + + def get_log_targets_syslog_test( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List syslog server test results + + Displays syslog server test results, which indicate whether the syslog is working and configured correctly. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('LogTargetsApi', 'api256_log_targets_syslog_test_get_with_http_info', kwargs) + + def delete_maintenance_windows( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete maintenance window + + Deletes an open maintenance window before its scheduled end (`expire`) time. The `names` parameter is required and must be set to `environment`. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('MaintenanceWindowsApi', 'api256_maintenance_windows_delete_with_http_info', kwargs) + + def get_maintenance_windows( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List maintenance window details + + Displays maintenance window details, including start time, end time, and maintenance type. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('MaintenanceWindowsApi', 'api256_maintenance_windows_get_with_http_info', kwargs) + + def post_maintenance_windows( + self, + maintenance_window: 'models.MaintenanceWindowPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a maintenance window + + Creates a maintenance window that suppresses alerts for a specified period of time. A maintenance window can be manually closed at any time. The `names` and `timeout` parameters are required. Set the `names` parameter to `environment`. + + :param maintenance_window: (required) + :type maintenance_window: MaintenanceWindowPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + maintenance_window=maintenance_window, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('MaintenanceWindowsApi', 'api256_maintenance_windows_post_with_http_info', kwargs) + + def delete_network_interfaces( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete network interface + + Deletes a network interface on a controller. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('NetworkInterfacesApi', 'api256_network_interfaces_delete_with_http_info', kwargs) + + def get_network_interfaces( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List network interfaces + + Displays all network interfaces for all controllers on the array. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('NetworkInterfacesApi', 'api256_network_interfaces_get_with_http_info', kwargs) + + def get_network_interfaces_neighbors( + self, + local_ports: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_port_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique local port name specified. Enter multiple names in comma-separated format. For example, `ct0.eth0,ct1.eth0`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List network interface neighbors + + Displays all neighbors for all network interfaces on the array. + + :param local_ports: A list of local_ports to query for. Overrides local_port_names keyword argument. + :type local_ports: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param local_port_names: Performs the operation on the unique local port name specified. Enter multiple + names in comma-separated format. For example, `ct0.eth0,ct1.eth0`. + :type local_port_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + local_port_names=local_port_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(local_ports, ['local_port_names'], kwargs) + _fixup_list_type_params(['local_port_names', 'sort'], kwargs) + return self._call_api('NetworkInterfacesApi', 'api256_network_interfaces_neighbors_get_with_http_info', kwargs) + + def patch_network_interfaces( + self, + network: 'models.NetworkInterfacePatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + remediate: Annotated[Optional[StrictBool], Field(description="The boolean value that, if `true`, indicates that `network interfaces` with a `remediation_mode` of `manual` will migrate to their `preferred_arrays`, if configured.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify network interface + + Modifies a network interface on a controller. + + :param network: (required) + :type network: NetworkInterfacePatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param remediate: The boolean value that, if `true`, indicates that `network interfaces` with a + `remediation_mode` of `manual` will migrate to their `preferred_arrays`, if + configured. + :type remediate: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + network=network, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + remediate=remediate, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('NetworkInterfacesApi', 'api256_network_interfaces_patch_with_http_info', kwargs) + + def get_network_interfaces_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List network performance statistics + + Displays network statistics, historical bandwidth, and error reporting for all specified network interfaces. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('NetworkInterfacesApi', 'api256_network_interfaces_performance_get_with_http_info', kwargs) + + def get_network_interfaces_port_details( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SFP port details + + Displays Ethernet and Fibre Channel SFP details. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('NetworkInterfacesApi', 'api256_network_interfaces_port_details_get_with_http_info', kwargs) + + def post_network_interfaces( + self, + network: 'models.NetworkInterfacePost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create network interface + + Creates a network interface on a controller on the array. + + :param network: (required) + :type network: NetworkInterfacePost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + network=network, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('NetworkInterfacesApi', 'api256_network_interfaces_post_with_http_info', kwargs) + + def delete_object_store_access_keys( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE object-store-access-keys + + Delete an object store access key. Once an access key has been deleted, it cannot be recovered. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ObjectStoreAccessKeysApi', 'api256_object_store_access_keys_delete_with_http_info', kwargs) + + def get_object_store_access_keys( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET object-store-access-keys + + List object store access keys. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('ObjectStoreAccessKeysApi', 'api256_object_store_access_keys_get_with_http_info', kwargs) + + def patch_object_store_access_keys( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + object_store_access_key: 'models.ObjectStoreAccessKey', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """PATCH object-store-access-keys + + Enable or disable object store access keys. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param object_store_access_key: (required) + :type object_store_access_key: ObjectStoreAccessKey + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + object_store_access_key=object_store_access_key, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ObjectStoreAccessKeysApi', 'api256_object_store_access_keys_patch_with_http_info', kwargs) + + def post_object_store_access_keys( + self, + object_store_access_key: 'models.ObjectStoreAccessKeyPostBase', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST object-store-access-keys + + The generation of object store access keys. This process produces a new `access key ID` and `secret key` for the specified user. + + :param object_store_access_key: (required) + :type object_store_access_key: ObjectStoreAccessKeyPostBase + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + object_store_access_key=object_store_access_key, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('ObjectStoreAccessKeysApi', 'api256_object_store_access_keys_post_with_http_info', kwargs) + + def delete_object_store_accounts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE object-store-accounts + + The deletion of an object store account. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ObjectStoreAccountsApi', 'api256_object_store_accounts_delete_with_http_info', kwargs) + + def get_object_store_accounts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET object-store-accounts + + The list of object store accounts and their associated attributes. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ObjectStoreAccountsApi', 'api256_object_store_accounts_get_with_http_info', kwargs) + + def post_object_store_accounts( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST object-store-accounts + + The creation of an object store account. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ObjectStoreAccountsApi', 'api256_object_store_accounts_post_with_http_info', kwargs) + + def get_object_store_accounts_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List object store account space information + + The monitoring interface or dataset that provides `physical storage` `consumption` data for each `object store account`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ObjectStoreAccountsApi', 'api256_object_store_accounts_space_get_with_http_info', kwargs) + + def delete_object_store_users( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE object-store-users + + Delete an object store user. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ObjectStoreUsersApi', 'api256_object_store_users_delete_with_http_info', kwargs) + + def get_object_store_users( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET object-store-users + + List object store users and their attributes. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ObjectStoreUsersApi', 'api256_object_store_users_get_with_http_info', kwargs) + + def delete_object_store_users_policies_object_store_access( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE object-store-users/policies/object-store-access + + Revoke an object store user’s access policy. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('ObjectStoreUsersApi', 'api256_object_store_users_policies_object_store_access_delete_with_http_info', kwargs) + + def get_object_store_users_policies_object_store_access( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET object-store-users/policies/object-store-access + + List object store users and their access policies. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('ObjectStoreUsersApi', 'api256_object_store_users_policies_object_store_access_get_with_http_info', kwargs) + + def post_object_store_users_policies_object_store_access( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST object-store-users/policies/object-store-access + + Grant access policies to an object store user. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('ObjectStoreUsersApi', 'api256_object_store_users_policies_object_store_access_post_with_http_info', kwargs) + + def post_object_store_users( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST object-store-users + + Create object store users to administer object storage for an object store account. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ObjectStoreUsersApi', 'api256_object_store_users_post_with_http_info', kwargs) + + def delete_object_store_virtual_hosts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE object-store-virtual-hosts + + The deletion of an object store virtual host. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ObjectStoreVirtualHostsApi', 'api256_object_store_virtual_hosts_delete_with_http_info', kwargs) + + def get_object_store_virtual_hosts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET object-store-virtual-hosts + + The list of object store virtual hosts. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ObjectStoreVirtualHostsApi', 'api256_object_store_virtual_hosts_get_with_http_info', kwargs) + + def post_object_store_virtual_hosts( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST object-store-virtual-hosts + + The creation of an object store virtual host. A maximum of `10` virtual hosts is supported. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('ObjectStoreVirtualHostsApi', 'api256_object_store_virtual_hosts_post_with_http_info', kwargs) + + def delete_offloads( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete offload target + + Deletes an offload target. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('OffloadsApi', 'api256_offloads_delete_with_http_info', kwargs) + + def get_offloads( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `azure`, `google-cloud`, `nfs`, and `s3`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List offload targets + + Displays a list of offload targets that are connected to the array. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `azure`, `google-cloud`, `nfs`, and `s3`. + :type protocol: str + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + protocol=protocol, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('OffloadsApi', 'api256_offloads_get_with_http_info', kwargs) + + def patch_offloads( + self, + offload: 'models.OffloadPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Patch offload target + + Modifies an existing offload target. Usage includes rotating the client secret. + + :param offload: (required) + :type offload: OffloadPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + offload=offload, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('OffloadsApi', 'api256_offloads_patch_with_http_info', kwargs) + + def post_offloads( + self, + offload: 'models.OffloadPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + initialize: Annotated[Optional[StrictBool], Field(description="If set to `true`, initializes the Amazon S3/Azure Blob container/Google Cloud Storage in preparation for offloading. The parameter must be set to `true` if this is the first time the array is connecting to the offload target.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create offload target + + Creates an offload target, connecting it to an array. Before you can connect to, manage, and replicate to an offload target, the Purity Run app must be installed. + + :param offload: (required) + :type offload: OffloadPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param initialize: If set to `true`, initializes the Amazon S3/Azure Blob container/Google Cloud + Storage in preparation for offloading. The parameter must be set to `true` + if this is the first time the array is connecting to the offload target. + :type initialize: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + offload=offload, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + initialize=initialize, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('OffloadsApi', 'api256_offloads_post_with_http_info', kwargs) + + def delete_pod_replica_links( + self, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete pod replica links + + Deletes pod replica links. The `local_pod_names` and `remote_pod_names` are required. Valid values are `replicating`, `baselining`, `paused`, `unhealthy`, `quiescing`, and `quiesced`. A status of `replicating` indicates that the source array is replicating to the target array. A status of `baselining` indicates that the the initial version of the dataset is being sent. During this phase, you cannot promote the target pod. In addition, changing the link direction might trigger the `baselining` status to recur. A status of `paused ` indicates that data transfer between objects has stopped. A status of `unhealthy` indicates that the link is currently unhealthy and customers must perform some health checks to determine the cause. A status of `quiescing` indicates that the source pod is not accepting new write requests but the most recent changes to the source have not arrived on the target. A status of `quiesced` indicates that the source pod has been demoted and all changes have been replicated to the target pod. + + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'remote_pod_ids', 'remote_pod_names'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api256_pod_replica_links_delete_with_http_info', kwargs) + + def get_pod_replica_links( + self, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pod replica links + + Displays the list of pod replica links that are configured between arrays. + + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names', 'sort'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api256_pod_replica_links_get_with_http_info', kwargs) + + def get_pod_replica_links_lag( + self, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pod replica link lag + + Displays the lag in milliseconds that the replication target is behind the source. This is the time difference between the current time and the recovery point. + + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names', 'sort'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api256_pod_replica_links_lag_get_with_http_info', kwargs) + + def get_pod_replica_links_mappings_policies( + self, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + pod_replica_links: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + pod_replica_link_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of pod replica link IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List policy mappings + + Displays a list of policy mappings. + + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param pod_replica_links: A list of pod_replica_links to query for. Overrides pod_replica_link_ids keyword argument. + :type pod_replica_links: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param pod_replica_link_ids: A comma-separated list of pod replica link IDs. If, after filtering, there is + not at least one resource that matches each of the elements, then an + error is returned. + :type pod_replica_link_ids: List[str] + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + offset=offset, + pod_replica_link_ids=pod_replica_link_ids, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(pod_replica_links, ['pod_replica_link_ids'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'pod_replica_link_ids', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names', 'sort'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api256_pod_replica_links_mappings_policies_get_with_http_info', kwargs) + + def patch_pod_replica_links_mappings_policies( + self, + mapping: 'models.MappingPolicyPatch', + remote_policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + pod_replica_links: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + pod_replica_link_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of pod replica link IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + remote_policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote policy IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_policy_names` query parameter.")] = None, + remote_policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote policy names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_policy_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify policy mappings + + Modifies policy mappings of a replica link. Valid `mapping` values are `connected` and `disconnected`. `connected` indicates that the source policy and its attachments will be mirrored on the target pod. `disconnected` indicates that the associated policy and its attachments are independent from any policy on the remote. This operation can only be performed on the target side of a pod replica link. + + :param mapping: (required) + :type mapping: MappingPolicyPatch + :param remote_policies: A list of remote_policies to query for. Overrides remote_policy_ids and remote_policy_names keyword arguments. + :type remote_policies: ReferenceType or List[ReferenceType], optional + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param pod_replica_links: A list of pod_replica_links to query for. Overrides pod_replica_link_ids keyword argument. + :type pod_replica_links: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param pod_replica_link_ids: A comma-separated list of pod replica link IDs. If, after filtering, there is + not at least one resource that matches each of the elements, then an + error is returned. + :type pod_replica_link_ids: List[str] + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :param remote_policy_ids: A comma-separated list of remote policy IDs. If, after filtering, there is not + at least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_policy_names` + query parameter. + :type remote_policy_ids: List[str] + :param remote_policy_names: A comma-separated list of remote policy names. If, after filtering, there is not + at least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_policy_ids` + query parameter. + :type remote_policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + mapping=mapping, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + pod_replica_link_ids=pod_replica_link_ids, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + remote_policy_ids=remote_policy_ids, + remote_policy_names=remote_policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(pod_replica_links, ['pod_replica_link_ids'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _process_references(remote_policies, ['remote_policy_ids', 'remote_policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'pod_replica_link_ids', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names', 'remote_policy_ids', 'remote_policy_names'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api256_pod_replica_links_mappings_policies_patch_with_http_info', kwargs) + + def patch_pod_replica_links( + self, + pod_replica_link: 'models.PodReplicaLinkPatch', + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify pod replica links + + Modifies pod replica links. The `local_pod_names` and `remote_pod_names` are required. Valid values are `replicating`, `baselining`, `paused`, `unhealthy`, `quiescing`, and `quiesced`. A status of `replicating` indicates that the source array is replicating to the target array. A status of `baselining` indicates that the the initial version of the dataset is being sent. During this phase, you cannot promote the target pod. In addition, changing the link direction might trigger the `baselining` status to recur. A status of `paused ` indicates that data transfer between objects has stopped. A status of `unhealthy` indicates that the link is currently unhealthy and customers must perform some health checks to determine the cause. A status of `quiescing` indicates that the source pod is not accepting new write requests but the most recent changes to the source have not arrived on the target. A status of `quiesced` indicates that the source pod has been demoted and all changes have been replicated to the target pod. + + :param pod_replica_link: (required) + :type pod_replica_link: PodReplicaLinkPatch + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + pod_replica_link=pod_replica_link, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api256_pod_replica_links_patch_with_http_info', kwargs) + + def get_pod_replica_links_performance_replication_by_array( + self, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, only return the aggregate value of all items after filtering. For real-time performance, the values are aggregated for the latest timestamp. For historical performance, the values are aggregated for each timestamp from `start_time` to `end_time`. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List replica link performance data with array details + + The monitoring interface that provides the total number of `bytes` of `replication` data transmitted and received `per second`. This data is organized by `array` and further categorized by the specific `replica link`, `source array`, and `target array` to provide granular visibility into network throughput. + + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, only return the aggregate value of all items after filtering. + For real-time performance, the values are aggregated for the latest + timestamp. For historical performance, the values are aggregated for each + timestamp from `start_time` to `end_time`. Where it makes more sense, the + average value is displayed instead. The values are displayed for each name + where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names', 'sort'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api256_pod_replica_links_performance_replication_by_array_get_with_http_info', kwargs) + + def get_pod_replica_links_performance_replication( + self, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, only return the aggregate value of all items after filtering. For real-time performance, the values are aggregated for the latest timestamp. For historical performance, the values are aggregated for each timestamp from `start_time` to `end_time`. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List replica link performance data + + The monitoring interface or metric that provides the total number of `bytes` of `replication` data transmitted and received `per second`. + + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, only return the aggregate value of all items after filtering. + For real-time performance, the values are aggregated for the latest + timestamp. For historical performance, the values are aggregated for each + timestamp from `start_time` to `end_time`. Where it makes more sense, the + average value is displayed instead. The values are displayed for each name + where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + offset=offset, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_pod_ids', 'local_pod_names', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names', 'sort'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api256_pod_replica_links_performance_replication_get_with_http_info', kwargs) + + def post_pod_replica_links( + self, + remote_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + remotes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_names` query parameter.")] = None, + local_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of local pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `local_pod_ids` query parameter.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm IDs. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_ids and remote_names parameters cannot be set together.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of remote array or realm names. If, after filtering, there is not at least one resource that matches each of the elements, an error is returned. The remote_names and remote_ids parameters cannot be set together.")] = None, + remote_pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_names` query parameter.")] = None, + remote_pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote pod names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_pod_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create pod replica links + + Creates pod replica links between two arrays. The `local_pod_names` and `remote_pod_names` are required. Valid values are `replicating`, `baselining`, `paused`, `unhealthy`, `quiescing`, and `quiesced`. A status of `replicating` indicates that the source array is replicating to the target array. A status of `baselining` indicates that the the initial version of the dataset is being sent. During this phase, you cannot promote the target pod. In addition, changing the link direction might trigger the `baselining` status to recur. A status of `paused ` indicates that data transfer between objects has stopped. A status of `unhealthy` indicates that the link is currently unhealthy and customers must perform some health checks to determine the cause. A status of `quiescing` indicates that the source pod is not accepting new write requests but the most recent changes to the source have not arrived on the target. A status of `quiesced` indicates that the source pod has been demoted and all changes have been replicated to the target pod. + + :param remote_pods: A list of remote_pods to query for. Overrides remote_pod_ids and remote_pod_names keyword arguments. + :type remote_pods: ReferenceType or List[ReferenceType], optional + :param remotes: A list of remotes to query for. Overrides remote_ids and remote_names keyword arguments. + :type remotes: ReferenceType or List[ReferenceType], optional + :param local_pods: A list of local_pods to query for. Overrides local_pod_ids and local_pod_names keyword arguments. + :type local_pods: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_pod_ids: A comma-separated list of local pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_names` query + parameter. + :type local_pod_ids: List[str] + :param local_pod_names: A comma-separated list of local pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `local_pod_ids` query + parameter. + :type local_pod_names: List[str] + :param remote_ids: The comma-separated list of remote array or realm IDs. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_ids and remote_names parameters cannot be set + together. + :type remote_ids: List[str] + :param remote_names: The comma-separated list of remote array or realm names. If, after filtering, + there is not at least one resource that matches each of the elements, an + error is returned. The remote_names and remote_ids parameters cannot be set + together. + :type remote_names: List[str] + :param remote_pod_ids: A comma-separated list of remote pod IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_names` + query parameter. + :type remote_pod_ids: List[str] + :param remote_pod_names: A comma-separated list of remote pod names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `remote_pod_ids` query + parameter. + :type remote_pod_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_pod_ids=local_pod_ids, + local_pod_names=local_pod_names, + remote_ids=remote_ids, + remote_names=remote_names, + remote_pod_ids=remote_pod_ids, + remote_pod_names=remote_pod_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_pods, ['local_pod_ids', 'local_pod_names'], kwargs) + _process_references(remotes, ['remote_ids', 'remote_names'], kwargs) + _process_references(remote_pods, ['remote_pod_ids', 'remote_pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'local_pod_ids', 'local_pod_names', 'remote_ids', 'remote_names', 'remote_pod_ids', 'remote_pod_names'], kwargs) + return self._call_api('PodReplicaLinksApi', 'api256_pod_replica_links_post_with_http_info', kwargs) + + def delete_pods_arrays( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + with_unknown: Annotated[Optional[StrictBool], Field(description="If set to `true`, unstretches the specified pod from the specified array by force. Use the `with_unknown` parameter in the following rare event: the local array goes offline while the pod is still stretched across two arrays, the status of the remote array becomes unknown, and there is no guarantee that the pod is online elsewhere.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a pod that was stretched to an array + + Deletes a pod that was stretchd to an array, collapsing the pod to a single array. Unstretch a pod from an array when the volumes within the stretched pod no longer need to be synchronously replicated between the two arrays. After a pod has been unstretched, synchronous replication stops. A destroyed version of the pod with 'restretch' appended to the pod name is created on the array that no longer has the pod. The restretched pod represents a point-in-time snapshot of the pod, just before it was unstretched. The restretch pod enters an eradication pending period starting from the time that the pod was unstretched. A restretched pod can be cloned or destroyed, but it cannot be explicitly recovered. The `group_names` parameter represents the name of the pod to be unstretched. The `member_names` parameter represents the name of the array from which the pod is to be unstretched. The `group_names` and `member_names` parameters are required and must be set together. (Deprecated) Use pods/members instead. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param with_unknown: If set to `true`, unstretches the specified pod from the specified array by + force. Use the `with_unknown` parameter in the following rare event: + the local array goes offline while the pod is still stretched across two + arrays, the status of the remote array becomes unknown, and there is no + guarantee that the pod is online elsewhere. + :type with_unknown: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + with_unknown=with_unknown, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('PodsApi', 'api256_pods_arrays_delete_with_http_info', kwargs) + + def get_pods_arrays( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pods and their the array members + + Displays a list of pods and the local and remote arrays over which the pods are stretched. Pods with realm members will not be returned. The optional `group_names` parameter represents the name of the pod. The optional `member_names` parameter represents the name of the array over which the pod is stretched. (Deprecated) Use pods/members instead.) + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api256_pods_arrays_get_with_http_info', kwargs) + + def post_pods_arrays( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Creates a pod to be stretched to an array + + Creates a pod to be stretched to an array. When a pod is stretched to an array, the data in the arrays over which the pod is stretched is synchronously replicated. The `group_names` parameter represents the name of the pod to be stretched. The `member_names` parameter represents the name of the array over which the pod is to be stretched. The `group_names` and `member_names` parameters are required and must be set together. (Deprecated) Use pods/members instead. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('PodsApi', 'api256_pods_arrays_post_with_http_info', kwargs) + + def delete_pods( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + eradicate_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to eradicate contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups). This enables you to eradicate containers with contents.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a pod + + Deletes a pod that has been destroyed and is pending eradication. Eradicated pods cannot be recovered. Pods are destroyed using the PATCH method. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param eradicate_contents: Set to `true` to eradicate contents (e.g., volumes, protection groups, + snapshots) and containers (e.g., realms, pods, volume groups). This + enables you to eradicate containers with contents. + :type eradicate_contents: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + eradicate_contents=eradicate_contents, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PodsApi', 'api256_pods_delete_with_http_info', kwargs) + + def get_pods( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pods + + Displays a list of pods that are stretched to this array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api256_pods_get_with_http_info', kwargs) + + def delete_pods_members( + self, + pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of pod IDs.")] = None, + pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique pod name specified. Enter multiple names in comma-separated format. For example, `pod01,pod02`.")] = None, + with_unknown: Annotated[Optional[StrictBool], Field(description="If set to `true`, unstretches the specified pod from the specified array by force. Use the `with_unknown` parameter in the following rare event: the local array goes offline while the pod is still stretched across two arrays, the status of the remote array becomes unknown, and there is no guarantee that the pod is online elsewhere.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a member from a pod + + Deletes a stretched pod from an array or realm, collapsing the pod to a member array or realm. Unstretch a pod from an array or realm when the volumes within the stretched podno longer need to be synchronously replicated between the two members. After a pod has been unstretched, synchronous replication stops. A destroyed version of the pod with 'restretch' appended to the pod name is created on the member that no longer has the pod. The restretched pod represents a point-in-time snapshot of the pod, just before it was unstretched. The restretched pod enters an eradication pending period starting from the time that the pod was unstretched. A restretched pod can be cloned or destroyed, but it cannot be explicitly recovered. The `member_names` parameter represents the name of the array or realm from which the pod is to be unstretched. Both pod and member must be specified by name or ID. + + :param pods: A list of pods to query for. Overrides pod_ids and pod_names keyword arguments. + :type pods: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param pod_ids: A comma-separated list of pod IDs. + :type pod_ids: List[str] + :param pod_names: Performs the operation on the unique pod name specified. Enter multiple names in + comma-separated format. For example, `pod01,pod02`. + :type pod_names: List[str] + :param with_unknown: If set to `true`, unstretches the specified pod from the specified array by + force. Use the `with_unknown` parameter in the following rare event: + the local array goes offline while the pod is still stretched across two + arrays, the status of the remote array becomes unknown, and there is no + guarantee that the pod is online elsewhere. + :type with_unknown: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + pod_ids=pod_ids, + pod_names=pod_names, + with_unknown=with_unknown, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(pods, ['pod_ids', 'pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'pod_ids', 'pod_names'], kwargs) + return self._call_api('PodsApi', 'api256_pods_members_delete_with_http_info', kwargs) + + def get_pods_members( + self, + pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of pod IDs.")] = None, + pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique pod name specified. Enter multiple names in comma-separated format. For example, `pod01,pod02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pods and their members + + Displays a list of pods and the local and remote members over which the pods are stretched. Currently either array or realm is supported as member. + + :param pods: A list of pods to query for. Overrides pod_ids and pod_names keyword arguments. + :type pods: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param pod_ids: A comma-separated list of pod IDs. + :type pod_ids: List[str] + :param pod_names: Performs the operation on the unique pod name specified. Enter multiple names in + comma-separated format. For example, `pod01,pod02`. + :type pod_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + pod_ids=pod_ids, + pod_names=pod_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(pods, ['pod_ids', 'pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'pod_ids', 'pod_names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api256_pods_members_get_with_http_info', kwargs) + + def post_pods_members( + self, + pods: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of pod IDs.")] = None, + pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique pod name specified. Enter multiple names in comma-separated format. For example, `pod01,pod02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Creates a pod to be stretched to a member + + Creates a pod to be stretched to a member. When a pod is stretched to an array or a realm on another array, the data in the arrays or realms over which the pod is stretched is synchronously replicated. The `member_names` or `member_ids` parameter represents the array or realm over which the pod is to be stretched. Both pod and member must be specified by name or ID. + + :param pods: A list of pods to query for. Overrides pod_ids and pod_names keyword arguments. + :type pods: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param pod_ids: A comma-separated list of pod IDs. + :type pod_ids: List[str] + :param pod_names: Performs the operation on the unique pod name specified. Enter multiple names in + comma-separated format. For example, `pod01,pod02`. + :type pod_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + pod_ids=pod_ids, + pod_names=pod_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(pods, ['pod_ids', 'pod_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'pod_ids', 'pod_names'], kwargs) + return self._call_api('PodsApi', 'api256_pods_members_post_with_http_info', kwargs) + + def patch_pods( + self, + pod: 'models.PodPatch', + to_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + move_with_hosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + move_with_host_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + from_members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + abort_quiesce: Annotated[Optional[StrictBool], Field(description="Set to `true` to promote the pod when the `pod-replica-link` is in the `quiescing` state and abort when waiting for the `pod-replica-link` to complete the quiescing operation.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + destroy_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups), including eradicating containers with content.")] = None, + from_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays from which the resource should be removed. Enter multiple IDs in a comma-separated format.")] = None, + from_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays to be removed from the specified resource. Enter multiple names in a comma-separated format.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + move_with_host_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The host groups to be moved together with the pods to the specified local member realm or array. All the hosts in the host groups will also be moved. Enter multiple names in a comma-separated format.")] = None, + move_with_host_names: Annotated[Optional[conlist(StrictStr)], Field(description="The hosts to be moved together with the pods to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + promote_from: Annotated[Optional[StrictStr], Field(description="The `undo-demote` pod that should be used to promote the pod. After the pod has been promoted, it will have the same data as the `undo-demote` pod and the `undo-demote` pod will be eradicated.")] = None, + quiesce: Annotated[Optional[StrictBool], Field(description="Set to `true` to demote the pod after the `pod-replica-link` goes into `quiesced` state and allow the pod to become a target of the remote pod. This ensures that all local data has been replicated to the remote pod before the pod is demoted.")] = None, + skip_quiesce: Annotated[Optional[StrictBool], Field(description="Set to `true` to demote the pod without quiescing the `pod-replica-link` and allow the pod to become a target of the remote pod. This stops all pending replication to the remote pod.")] = None, + to_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format.")] = None, + to_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a pod + + Modifies pod details. + + :param pod: (required) + :type pod: PodPatch + :param to_members: A list of to_members to query for. Overrides to_member_ids and to_member_names keyword arguments. + :type to_members: ReferenceType or List[ReferenceType], optional + :param move_with_hosts: A list of move_with_hosts to query for. Overrides move_with_host_names keyword argument. + :type move_with_hosts: ReferenceType or List[ReferenceType], optional + :param move_with_host_groups: A list of move_with_host_groups to query for. Overrides move_with_host_group_names keyword argument. + :type move_with_host_groups: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param from_members: A list of from_members to query for. Overrides from_member_ids and from_member_names keyword arguments. + :type from_members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param abort_quiesce: Set to `true` to promote the pod when the `pod-replica-link` is in the + `quiescing` state and abort when waiting for the `pod-replica-link` to + complete the quiescing operation. + :type abort_quiesce: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param destroy_contents: Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) + and containers (e.g., realms, pods, volume groups), including eradicating + containers with content. + :type destroy_contents: bool + :param from_member_ids: Move the resource from the specified local member realm or array. This should be + a union of all local realms and arrays from which the resource should be + removed. Enter multiple IDs in a comma-separated format. + :type from_member_ids: List[str] + :param from_member_names: Move the resource from the specified local member realm or array. This should be + a union of all local realms and arrays to be removed from the specified + resource. Enter multiple names in a comma-separated format. + :type from_member_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param move_with_host_group_names: The host groups to be moved together with the pods to the specified local member + realm or array. All the hosts in the host groups will also be moved. + Enter multiple names in a comma-separated format. + :type move_with_host_group_names: List[str] + :param move_with_host_names: The hosts to be moved together with the pods to the specified local member realm + or array. Enter multiple names in a comma-separated format. + :type move_with_host_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param promote_from: The `undo-demote` pod that should be used to promote the pod. After the pod has + been promoted, it will have the same data as the `undo-demote` pod and the + `undo-demote` pod will be eradicated. + :type promote_from: str + :param quiesce: Set to `true` to demote the pod after the `pod-replica-link` goes into + `quiesced` state and allow the pod to become a target of the remote pod. + This ensures that all local data has been replicated to the remote pod + before the pod is demoted. + :type quiesce: bool + :param skip_quiesce: Set to `true` to demote the pod without quiescing the `pod-replica-link` and + allow the pod to become a target of the remote pod. This stops all pending + replication to the remote pod. + :type skip_quiesce: bool + :param to_member_ids: The resource will be moved to the specified local member realm or array. Enter + multiple IDs in a comma-separated format. + :type to_member_ids: List[str] + :param to_member_names: The resource will be moved to the specified local member realm or array. Enter + multiple names in a comma-separated format. + :type to_member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + pod=pod, + authorization=authorization, + x_request_id=x_request_id, + abort_quiesce=abort_quiesce, + context_names=context_names, + destroy_contents=destroy_contents, + from_member_ids=from_member_ids, + from_member_names=from_member_names, + ids=ids, + move_with_host_group_names=move_with_host_group_names, + move_with_host_names=move_with_host_names, + names=names, + promote_from=promote_from, + quiesce=quiesce, + skip_quiesce=skip_quiesce, + to_member_ids=to_member_ids, + to_member_names=to_member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(from_members, ['from_member_ids', 'from_member_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(move_with_host_groups, ['move_with_host_group_names'], kwargs) + _process_references(move_with_hosts, ['move_with_host_names'], kwargs) + _process_references(to_members, ['to_member_ids', 'to_member_names'], kwargs) + _fixup_list_type_params(['context_names', 'from_member_ids', 'from_member_names', 'ids', 'move_with_host_group_names', 'move_with_host_names', 'names', 'to_member_ids', 'to_member_names'], kwargs) + return self._call_api('PodsApi', 'api256_pods_patch_with_http_info', kwargs) + + def get_pods_performance_by_array( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`.")] = None, + protocol_group: Annotated[Optional[StrictStr], Field(description="Protocol group type. Valid values are `block`, `file`, `object-store`, and `all`.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pod performance data by array + + Displays real-time and historical performance data, real-time latency data, and average I/O size data. The data is displayed as a total across all pods on the local array and by individual pod. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`. + :type protocol: str + :param protocol_group: Protocol group type. Valid values are `block`, `file`, `object-store`, and + `all`. + :type protocol_group: str + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + protocol=protocol, + protocol_group=protocol_group, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api256_pods_performance_by_array_get_with_http_info', kwargs) + + def get_pods_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`.")] = None, + protocol_group: Annotated[Optional[StrictStr], Field(description="Protocol group type. Valid values are `block`, `file`, `object-store`, and `all`.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pod performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes across all pods, displayed both by pod and as a total across all pods. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`. + :type protocol: str + :param protocol_group: Protocol group type. Valid values are `block`, `file`, `object-store`, and + `all`. + :type protocol_group: str + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + protocol=protocol, + protocol_group=protocol_group, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api256_pods_performance_get_with_http_info', kwargs) + + def get_pods_performance_replication_by_array( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pod replication performance data by array + + Displays pod replication performance data, organized by array. The data returned is the real-time and historical performance data for each replication type at the pod level. Values include `continuous`, `periodic`, `resync`, and `sync`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api256_pods_performance_replication_by_array_get_with_http_info', kwargs) + + def get_pods_performance_replication( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, only return the aggregate value of all items after filtering. For real-time performance, the values are aggregated for the latest timestamp. For historical performance, the values are aggregated for each timestamp from `start_time` to `end_time`. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pod replication performance data + + Displays pod replication performance data. The data returned is the real-time and historical performance data for each replication type at the pod level. Values include `continuous`, `periodic`, `resync`, and `sync`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, only return the aggregate value of all items after filtering. + For real-time performance, the values are aggregated for the latest + timestamp. For historical performance, the values are aggregated for each + timestamp from `start_time` to `end_time`. Where it makes more sense, the + average value is displayed instead. The values are displayed for each name + where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api256_pods_performance_replication_get_with_http_info', kwargs) + + def post_pods( + self, + pod: 'models.PodPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows operation to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the newly created container (pod or realm) will inherit the default protection configuration from its parent container (realm or array). If specified as `false`, the default protection of the parent container will not be applied automatically. If not specified, defaults to `true`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a pod + + Creates a pod on the local array. Each pod must be given a unique name across the arrays to which they are stretched. A pod cannot be stretched to an array that already contains a pod with the same name. After a pod has been created, add volumes and protection groups, and then stretch the pod to another connected array or realm. + + :param pod: (required) + :type pod: PodPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows operation to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param with_default_protection: If specified as `true`, the newly created container (pod or realm) will inherit + the default protection configuration from its parent container (realm or + array). If specified as `false`, the default protection of the parent + container will not be applied automatically. If not specified, defaults + to `true`. + :type with_default_protection: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + pod=pod, + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + context_names=context_names, + names=names, + with_default_protection=with_default_protection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('PodsApi', 'api256_pods_post_with_http_info', kwargs) + + def get_pods_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List pod space information + + Displays provisioned size and physical storage consumption data for each pod on the local array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api256_pods_space_get_with_http_info', kwargs) + + def put_pods_tags_batch( + self, + tag: Annotated[conlist('models.Tag', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if already existing, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags for all specified objects. + + :param tag: A list of tags to be created or, if already existing, updated. (required) + :type tag: List[Tag] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('PodsApi', 'api256_pods_tags_batch_put_with_http_info', kwargs) + + def delete_pods_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('PodsApi', 'api256_pods_tags_delete_with_http_info', kwargs) + + def get_pods_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('PodsApi', 'api256_pods_tags_get_with_http_info', kwargs) + + def post_pods_test( + self, + pod: 'models.PodPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows operation to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the newly created container (pod or realm) will inherit the default protection configuration from its parent container (realm or array). If specified as `false`, the default protection of the parent container will not be applied automatically. If not specified, defaults to `true`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an attempt to clone a pod + + Creates an attempt to clone a pod on the local array without actually cloning it to test whether the pod can be successfully cloned. This action does not suppport pod creation. + + :param pod: (required) + :type pod: PodPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows operation to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param with_default_protection: If specified as `true`, the newly created container (pod or realm) will inherit + the default protection configuration from its parent container (realm or + array). If specified as `false`, the default protection of the parent + container will not be applied automatically. If not specified, defaults + to `true`. + :type with_default_protection: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + pod=pod, + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + context_names=context_names, + names=names, + with_default_protection=with_default_protection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('PodsApi', 'api256_pods_test_post_with_http_info', kwargs) + + def delete_policies_alert_watcher( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete alert-watcher policies + + Deletes one or more alert-watcher policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_alert_watcher_delete_with_http_info', kwargs) + + def get_policies_alert_watcher( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List alert-watcher policies + + Displays a list of alert-watcher policies. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_alert_watcher_get_with_http_info', kwargs) + + def delete_policies_alert_watcher_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between alert-watcher policies and attached object + + Deletes a membership between one or more alert-watcher policies and attached object. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_alert_watcher_members_delete_with_http_info', kwargs) + + def get_policies_alert_watcher_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List alert-watcher policy members + + Displays a list of alert-watcher policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_alert_watcher_members_get_with_http_info', kwargs) + + def post_policies_alert_watcher_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between an object and an alert-watcher policy + + Creates a membership between one or more objects and an alert-watcher policy. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_alert_watcher_members_post_with_http_info', kwargs) + + def patch_policies_alert_watcher( + self, + policy: 'models.PolicyPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify alert-watcher policies + + Modifies one or more alert-watcher policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=false`. To rename a policy, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_alert_watcher_patch_with_http_info', kwargs) + + def post_policies_alert_watcher( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create alert-watcher policies + + Creates one or more alert-watcher policies. To copy a policy, the `source_names` or `source_ids` parameter is required, but they cannot be set together. To create a policy from scratch, policy body is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_alert_watcher_post_with_http_info', kwargs) + + def delete_policies_alert_watcher_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete alert-watcher policy rules + + Deletes one or more alert-watcher policy rules. Either the 'policy_ids' or 'policy_names' parameter is required, but both parameters cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_alert_watcher_rules_delete_with_http_info', kwargs) + + def get_policies_alert_watcher_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List alert-watcher policy rules + + Displays a list of alert-watcher policy rules. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_alert_watcher_rules_get_with_http_info', kwargs) + + def patch_policies_alert_watcher_rules( + self, + rules: 'models.PolicyRuleAlertWatcherPatch', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify alert-watcher policy rules + + Modifies alert-watcher policy rules. + + :param rules: (required) + :type rules: PolicyRuleAlertWatcherPatch + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_alert_watcher_rules_patch_with_http_info', kwargs) + + def post_policies_alert_watcher_rules( + self, + rules: 'models.PolicyRuleAlertWatcherPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create alert-watcher policy rules + + Creates one or more alert-watcher policy rules. Either the 'policy_ids' or 'policy_names' parameter is required, but both parameters cannot be set together. + + :param rules: (required) + :type rules: PolicyRuleAlertWatcherPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_alert_watcher_rules_post_with_http_info', kwargs) + + def get_policies_alert_watcher_rules_test( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List rules of alert-watcher policy rule test + + Displays alert-watcher policy rule email test results. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_alert_watcher_rules_test_get_with_http_info', kwargs) + + def delete_policies_audit_file( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete audit policies + + Deletes one or more audit policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_audit_file_delete_with_http_info', kwargs) + + def get_policies_audit_file( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List audit policies + + Displays a list of audit policies. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_audit_file_get_with_http_info', kwargs) + + def delete_policies_audit_file_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between audit policies and managed directories + + Deletes a membership between one or more audit policies and managed directories. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_audit_file_members_delete_with_http_info', kwargs) + + def get_policies_audit_file_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List audit policy members + + Displays a list of audit policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_audit_file_members_get_with_http_info', kwargs) + + def post_policies_audit_file_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a managed directory and a audit policy + + Creates a membership between one or more managed directories and a audit policy. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_audit_file_members_post_with_http_info', kwargs) + + def patch_policies_audit_file( + self, + policy: 'models.PolicyAuditFilePatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify audit policies + + Modifies one or more audit policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=false`. To rename a policy, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyAuditFilePatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_audit_file_patch_with_http_info', kwargs) + + def post_policies_audit_file( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyAuditFilePost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create audit policies + + Creates one or more audit policies. To copy a policy, the `source_names` or `source_ids` parameter is required, but they cannot be set together. To create a policy from scratch, policy body is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyAuditFilePost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_audit_file_post_with_http_info', kwargs) + + def delete_policies_autodir( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete auto managed directory policies + + Deletes one or more auto managed directory policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_autodir_delete_with_http_info', kwargs) + + def get_policies_autodir( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List auto managed directory policies + + Displays a list of auto managed directory policies. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_autodir_get_with_http_info', kwargs) + + def delete_policies_autodir_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete auto managed directory policies + + Deletes one or more auto managed directory policies from resources. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_autodir_members_delete_with_http_info', kwargs) + + def get_policies_autodir_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List auto managed directories policy members + + Displays a list of auto managed directory policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_autodir_members_get_with_http_info', kwargs) + + def post_policies_autodir_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create auto managed directory policies + + Creates a membership between one or more resources with an auto managed directory policy. Applicable resources are directories. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_autodir_members_post_with_http_info', kwargs) + + def patch_policies_autodir( + self, + policy: 'models.PolicyPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify auto managed directory policies + + Modifies one or more auto managed directory policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=true`. To rename a policy, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_autodir_patch_with_http_info', kwargs) + + def post_policies_autodir( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create auto managed directory policies + + Creates one or more auto managed directory policies. To copy a policy, set one of either `source_names` or `source_ids`. Each policy can only have one entry. To create a policy from scratch, policy body is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_autodir_post_with_http_info', kwargs) + + def get_policies( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List policies + + Displays a list of policies. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_get_with_http_info', kwargs) + + def delete_policies_management_access( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete management access policies + + Deletes one or more management access policies. One of `ids` or `names` is required. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_management_access_delete_with_http_info', kwargs) + + def get_policies_management_access( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List management access policies + + Displays a list of management access policies. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_management_access_get_with_http_info', kwargs) + + def delete_policies_management_access_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in a comma-separated format.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between management access policies and attached object + + Deletes a membership between one or more management access policies and attached object. One of `policy_ids` or `policy_names` is required, as well as one of `member_ids` or `member_names`. `member_types` is required. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in a comma-separated format. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_management_access_members_delete_with_http_info', kwargs) + + def get_policies_management_access_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in a comma-separated format.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in a comma-separated format.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List management access policy members + + Displays a list of management access policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in a comma-separated format. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in a comma-separated format. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_management_access_members_get_with_http_info', kwargs) + + def post_policies_management_access_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in a comma-separated format.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between an object and a management access policy + + Creates a membership between one or more objects and a management access policy. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in a comma-separated format. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_management_access_members_post_with_http_info', kwargs) + + def patch_policies_management_access( + self, + policy: 'models.PolicyManagementAccessPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify management access policies + + Modifies one or more management access policies. One of `ids` or `names` is required. For renames, can only specify one old policy in `ids` or `names`. + + :param policy: (required) + :type policy: PolicyManagementAccessPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_management_access_patch_with_http_info', kwargs) + + def post_policies_management_access( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyManagementAccessPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create management access policies + + Creates one or more management access policies. To copy a policy, one of `source_names` or `source_ids` is required. To create a policy from scratch, policy body is required. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyManagementAccessPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_management_access_post_with_http_info', kwargs) + + def get_policies_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List policy members + + Displays a list of policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_members_get_with_http_info', kwargs) + + def delete_policies_network_access( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete network access policies + + The operation that deletes one or more `network access policies`. This action requires the specification of either `ids` or `names` to identify the target policies, though these parameters are mutually exclusive and cannot be used simultaneously within the same request. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_network_access_delete_with_http_info', kwargs) + + def get_policies_network_access( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List network access policies + + The reporting interface or dataset that provides a `list` of all `network access policies`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_network_access_get_with_http_info', kwargs) + + def get_policies_network_access_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List network access policy members + + The reporting interface or dataset that provides a `list` of all `members` associated with a `network access policy`. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_network_access_members_get_with_http_info', kwargs) + + def patch_policies_network_access( + self, + policy: 'models.PolicyPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify network access policies + + The operation that modifies one or more `network access policies`. This action supports updating the administrative state by adjusting the `enabled` attribute, as well as renaming policies via the `name` parameter. To identify the target policies, the specification of either `ids` or `names` is required; however, these parameters are mutually exclusive and cannot be used simultaneously. + + :param policy: (required) + :type policy: PolicyPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_network_access_patch_with_http_info', kwargs) + + def post_policies_network_access( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create network access policies + + The operation that creates one or more `network access policies`. This action supports two modes: duplicating an existing policy by providing either `source_names` or `source_ids`, or instantiating a new policy from scratch by providing a `policy body`. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_network_access_post_with_http_info', kwargs) + + def delete_policies_network_access_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in a comma-separated format.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete network access policy rules + + The operation that deletes one or more `network access policy rules`. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in a comma-separated format. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_network_access_rules_delete_with_http_info', kwargs) + + def get_policies_network_access_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in a comma-separated format.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List network access policy rules + + The reporting interface or dataset that provides a `list` of all `rules` associated with a `network access policy`. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in a comma-separated format. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_network_access_rules_get_with_http_info', kwargs) + + def patch_policies_network_access_rules( + self, + rules: 'models.PolicyRuleNetworkAccessPatch', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in a comma-separated format.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify network access policy rules + + The operation that modifies one or more `network access policy rules`. + + :param rules: (required) + :type rules: PolicyRuleNetworkAccessPatch + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in a comma-separated format. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_network_access_rules_patch_with_http_info', kwargs) + + def post_policies_network_access_rules( + self, + rules: 'models.PolicyRuleNetworkAccessPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create network access policy rules + + The operation that creates one or more `network access policy rules`. This action requires the specification of either `policy_ids` or `policy_names` to identify the target policies, though these parameters are mutually exclusive and cannot be used simultaneously within the same request. + + :param rules: (required) + :type rules: PolicyRuleNetworkAccessPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_network_access_rules_post_with_http_info', kwargs) + + def delete_policies_nfs_client_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete NFS client policy rules. + + Deletes one or more NFS client policy rules. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_nfs_client_rules_delete_with_http_info', kwargs) + + def get_policies_nfs_client_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List NFS client policy rules + + The list of NFS client policy rules. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_nfs_client_rules_get_with_http_info', kwargs) + + def patch_policies_nfs_client_rules( + self, + rules: 'models.PolicyRuleNfsClientPatch', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify NFS client policy rules + + Modifies one or more NFS client policy rules. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param rules: (required) + :type rules: PolicyRuleNfsClientPatch + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_nfs_client_rules_patch_with_http_info', kwargs) + + def post_policies_nfs_client_rules( + self, + rules: 'models.PolicyRuleNfsClientPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create NFS client policy rules + + The creation of one or more NFS client policy rules. The `policy_ids` or `policy_names` parameter is required; however, these parameters cannot be specified together. + + :param rules: (required) + :type rules: PolicyRuleNfsClientPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_nfs_client_rules_post_with_http_info', kwargs) + + def delete_policies_nfs( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete NFS policies + + Deletes one or more NFS policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_nfs_delete_with_http_info', kwargs) + + def get_policies_nfs( + self, + workloads: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + workload_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter.")] = None, + workload_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List NFS policies + + Displays a list of NFS policies. + + :param workloads: A list of workloads to query for. Overrides workload_ids and workload_names keyword arguments. + :type workloads: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param workload_ids: A comma-separated list of workload IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_names` query + parameter. + :type workload_ids: List[str] + :param workload_names: A comma-separated list of workload names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_ids` query + parameter. + :type workload_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + workload_ids=workload_ids, + workload_names=workload_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(workloads, ['workload_ids', 'workload_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'workload_ids', 'workload_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_nfs_get_with_http_info', kwargs) + + def delete_policies_nfs_members( + self, + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + server_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of server IDs.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete NFS policies + + Deletes one or more NFS policies from resources. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param servers: A list of servers to query for. Overrides server_ids and server_names keyword arguments. + :type servers: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param server_ids: A comma-separated list of server IDs. + :type server_ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + server_ids=server_ids, + server_names=server_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(servers, ['server_ids', 'server_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'server_ids', 'server_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_nfs_members_delete_with_http_info', kwargs) + + def get_policies_nfs_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List NFS policy members + + Displays a list of NFS policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_nfs_members_get_with_http_info', kwargs) + + def post_policies_nfs_members( + self, + members: 'models.PolicyMemberExportPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create NFS policies + + Creates a membership between one or more resources and an NFS policy. Applicable resources are directories. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param members: (required) + :type members: PolicyMemberExportPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_nfs_members_post_with_http_info', kwargs) + + def patch_policies_nfs( + self, + policy: 'models.PolicyNfsPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify NFS policies + + Modifies one or more NFS policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=false`. To rename a policy, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyNfsPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_nfs_patch_with_http_info', kwargs) + + def post_policies_nfs( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyNfsPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create NFS policies + + Creates one or more NFS policies or copies an existing policy. To copy a policy, the `source_names` or `source_ids` parameter is required, but they cannot be set together. To create a policy, policy body is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyNfsPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_nfs_post_with_http_info', kwargs) + + def get_policies_object_store_access( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + exclude_rules: Annotated[Optional[StrictBool], Field(description="If true, the rules field in each policy will be null. If false, each returned policy will include its list of rules in the response. If not specified, defaults to `false`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET policies/object-store-access + + The list of access policies and their associated attributes. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param exclude_rules: If true, the rules field in each policy will be null. If false, each returned + policy will include its list of rules in the response. If not specified, + defaults to `false`. + :type exclude_rules: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + exclude_rules=exclude_rules, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_object_store_access_get_with_http_info', kwargs) + + def delete_policies_object_store_access_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """DELETE policies/object-store-access/members + + Revokes an object store user's access policy. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_object_store_access_members_delete_with_http_info', kwargs) + + def get_policies_object_store_access_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET policies/object-store-access/members + + List object store users and their access policies. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_object_store_access_members_get_with_http_info', kwargs) + + def post_policies_object_store_access_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """POST policies/object-store-access/members + + Grant access policies to an object store user. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_object_store_access_members_post_with_http_info', kwargs) + + def get_policies_object_store_access_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """GET policies/object-store-access/rules + + The list of access policy rules and their associated attributes. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_object_store_access_rules_get_with_http_info', kwargs) + + def get_policies_password( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List password policies + + Displays a list of password policies. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_password_get_with_http_info', kwargs) + + def patch_policies_password( + self, + policy: 'models.PolicyPassword', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify password policies + + Modifies one or more password policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=false`. + + :param policy: (required) + :type policy: PolicyPassword + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_password_patch_with_http_info', kwargs) + + def delete_policies_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete QoS policies + + The operation that deletes one or more `QoS policies`. Either the `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_qos_delete_with_http_info', kwargs) + + def get_policies_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List QoS policies + + The operation that displays a list of `QoS policies`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_qos_get_with_http_info', kwargs) + + def delete_policies_qos_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between QoS policies and entities + + The operation that deletes a `membership` between one or more `QoS policies` and `entities` by detaching them. For this request, either `policy_ids` or `policy_names` must be provided, and either `member_ids` or `member_names` must be provided; however, the ID and name parameters for each respective category cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_qos_members_delete_with_http_info', kwargs) + + def get_policies_qos_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List QoS policy members + + The operation that displays a list of `QoS policy members`. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_qos_members_get_with_http_info', kwargs) + + def post_policies_qos_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between an entity and a QoS policy + + The operation that creates a `membership` between one or more `entities` and a `QoS policy` by attaching them. Either the `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_qos_members_post_with_http_info', kwargs) + + def patch_policies_qos( + self, + policy: 'models.PolicyQosPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify QoS policies + + The operation that modifies one or more `QoS policies`. To enable a policy, set `enabled=true`; to disable a policy, set `enabled=false`. To rename a policy, set `name` to the new name. Either the `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyQosPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_qos_patch_with_http_info', kwargs) + + def post_policies_qos( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyQosPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create QoS policies + + The operation that creates one or more `QoS policies`. To copy a policy, either the `source_names` or `source_ids` parameter is required, but they cannot be set together. Alternatively, to create a policy from scratch, a `policy body` must be provided. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyQosPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_qos_post_with_http_info', kwargs) + + def delete_policies_quota( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete quota policies + + Deletes one or more quota policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_quota_delete_with_http_info', kwargs) + + def get_policies_quota( + self, + workloads: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + workload_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter.")] = None, + workload_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List quota policies + + Displays a list of quota policies. + + :param workloads: A list of workloads to query for. Overrides workload_ids and workload_names keyword arguments. + :type workloads: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param workload_ids: A comma-separated list of workload IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_names` query + parameter. + :type workload_ids: List[str] + :param workload_names: A comma-separated list of workload names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_ids` query + parameter. + :type workload_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + workload_ids=workload_ids, + workload_names=workload_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(workloads, ['workload_ids', 'workload_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'workload_ids', 'workload_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_quota_get_with_http_info', kwargs) + + def delete_policies_quota_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between quota policies and managed directories + + Deletes a membership between one or more quota policies and managed directories. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_quota_members_delete_with_http_info', kwargs) + + def get_policies_quota_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List quota policy members + + Displays a list of quota policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_quota_members_get_with_http_info', kwargs) + + def post_policies_quota_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a managed directory and a quota policy + + Creates a membership between one or more managed directories and a quota policy. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for quota management operations. If set to `true`, + directory usage is not checked against the `quota_limits` that are set. If + set to `false`, the actual logical bytes in use are prevented from + exceeding the limits set on the directory. Client operations might be + impacted. If the limit exceeds the quota, the client operation is not + allowed. If not specified, defaults to `false`. + :type ignore_usage: bool + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_quota_members_post_with_http_info', kwargs) + + def patch_policies_quota( + self, + policy: 'models.PolicyQuotaPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify quota policies + + Modifies one or more quota policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=false`. To rename a policy, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyQuotaPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param ignore_usage: Flag used to override checks for quota management operations. If set to `true`, + directory usage is not checked against the `quota_limits` that are set. If + set to `false`, the actual logical bytes in use are prevented from + exceeding the limits set on the directory. Client operations might be + impacted. If the limit exceeds the quota, the client operation is not + allowed. If not specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + ignore_usage=ignore_usage, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_quota_patch_with_http_info', kwargs) + + def post_policies_quota( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create quota policies + + Creates one or more quota policies. To copy a policy, the `source_names` or `source_ids` parameter is required, but they cannot be set together. To create a policy from scratch, policy body is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_quota_post_with_http_info', kwargs) + + def delete_policies_quota_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete quota policy rules + + Deletes one or more quota policy rules. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_quota_rules_delete_with_http_info', kwargs) + + def get_policies_quota_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List quota policy rules + + Displays a list of quota policy rules. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_quota_rules_get_with_http_info', kwargs) + + def patch_policies_quota_rules( + self, + rules: 'models.PolicyRuleQuotaPatch', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify quota policy rules + + Modifies quota policy rules. + + :param rules: (required) + :type rules: PolicyRuleQuotaPatch + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for quota management operations. If set to `true`, + directory usage is not checked against the `quota_limits` that are set. If + set to `false`, the actual logical bytes in use are prevented from + exceeding the limits set on the directory. Client operations might be + impacted. If the limit exceeds the quota, the client operation is not + allowed. If not specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_quota_rules_patch_with_http_info', kwargs) + + def post_policies_quota_rules( + self, + rules: 'models.PolicyRuleQuotaPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create quota policy rules + + Creates one or more quota policy rules. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param rules: (required) + :type rules: PolicyRuleQuotaPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for quota management operations. If set to `true`, + directory usage is not checked against the `quota_limits` that are set. If + set to `false`, the actual logical bytes in use are prevented from + exceeding the limits set on the directory. Client operations might be + impacted. If the limit exceeds the quota, the client operation is not + allowed. If not specified, defaults to `false`. + :type ignore_usage: bool + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_quota_rules_post_with_http_info', kwargs) + + def delete_policies_smb_client_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete SMB client policy rules. + + Deletes one or more SMB client policy rules. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_smb_client_rules_delete_with_http_info', kwargs) + + def get_policies_smb_client_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SMB client policy rules + + Displays a list of SMB client policy rules. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_smb_client_rules_get_with_http_info', kwargs) + + def post_policies_smb_client_rules( + self, + rules: 'models.PolicyRuleSmbClientPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create SMB client policy rules + + Creates one or more SMB client policy rules. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param rules: (required) + :type rules: PolicyRuleSmbClientPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_smb_client_rules_post_with_http_info', kwargs) + + def delete_policies_smb( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete SMB policies + + Deletes one or more SMB policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_smb_delete_with_http_info', kwargs) + + def get_policies_smb( + self, + workloads: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + workload_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter.")] = None, + workload_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SMB policies + + Displays a list of SMB policies. + + :param workloads: A list of workloads to query for. Overrides workload_ids and workload_names keyword arguments. + :type workloads: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param workload_ids: A comma-separated list of workload IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_names` query + parameter. + :type workload_ids: List[str] + :param workload_names: A comma-separated list of workload names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_ids` query + parameter. + :type workload_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + workload_ids=workload_ids, + workload_names=workload_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(workloads, ['workload_ids', 'workload_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'workload_ids', 'workload_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_smb_get_with_http_info', kwargs) + + def delete_policies_smb_members( + self, + servers: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + server_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of server IDs.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete SMB policies + + Deletes one or more SMB policies from resources. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param servers: A list of servers to query for. Overrides server_ids and server_names keyword arguments. + :type servers: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param server_ids: A comma-separated list of server IDs. + :type server_ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be + fully qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + server_ids=server_ids, + server_names=server_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(servers, ['server_ids', 'server_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'server_ids', 'server_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_smb_members_delete_with_http_info', kwargs) + + def get_policies_smb_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SMB policy members + + Displays a list of SMB policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_smb_members_get_with_http_info', kwargs) + + def post_policies_smb_members( + self, + members: 'models.PolicyMemberExportPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create SMB policies + + Creates a membership between one or more resources and an SMB policy. Applicable resources are directories. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param members: (required) + :type members: PolicyMemberExportPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_smb_members_post_with_http_info', kwargs) + + def patch_policies_smb( + self, + policy: 'models.PolicySmbPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify SMB policies + + Modifies one or more SMB policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=false`. To enable access based enumeration, set `access_based_enumeration_enabled=true`. To disable access based enumeration, set `access_based_enumeration_enabled=false`. To enable continuous availability, set `continuous_availability=true`. To disable continuous availability, set `continuous_availability=false`. To rename a policy, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicySmbPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_smb_patch_with_http_info', kwargs) + + def post_policies_smb( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicySmbPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create SMB policies + + Creates one or more SMB policies. To copy a policy, set one of either `source_names` or `source_ids`. Each policy can only have one entry. To create a policy from scratch, policy body is required. To create an SMB policy with access based enumeration enabled, set `access_based_enumeration_enabled=true`. To create an SMB policy with continuous availability enabled, set `continuous_availability=true`. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicySmbPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_smb_post_with_http_info', kwargs) + + def delete_policies_snapshot( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete snapshot policies + + Deletes one or more snapshot policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_snapshot_delete_with_http_info', kwargs) + + def get_policies_snapshot( + self, + workloads: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + workload_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter.")] = None, + workload_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List snapshot policies + + Displays a list of snapshot policies. + + :param workloads: A list of workloads to query for. Overrides workload_ids and workload_names keyword arguments. + :type workloads: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param workload_ids: A comma-separated list of workload IDs. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_names` query + parameter. + :type workload_ids: List[str] + :param workload_names: A comma-separated list of workload names. If, after filtering, there is not at + least one resource that matches each of the elements, then an error is + returned. This cannot be provided together with the `workload_ids` query + parameter. + :type workload_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + workload_ids=workload_ids, + workload_names=workload_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(workloads, ['workload_ids', 'workload_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'workload_ids', 'workload_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_snapshot_get_with_http_info', kwargs) + + def delete_policies_snapshot_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete snapshot policies + + Deletes one or more snapshot policies from resources. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_snapshot_members_delete_with_http_info', kwargs) + + def get_policies_snapshot_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List snapshot policy members + + Displays a list of snapshot policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_snapshot_members_get_with_http_info', kwargs) + + def post_policies_snapshot_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create snapshot policies + + Creates a membership between one or more resources and a snapshot policy. Applicable resources are directories. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_snapshot_members_post_with_http_info', kwargs) + + def patch_policies_snapshot( + self, + policy: 'models.PolicyLockablePatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify snapshot policies + + Modifies one or more snapshot policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=true`. To rename a policy, set `name` to the new name. To ratchet a policy, set `retention_lock=ratcheted`. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyLockablePatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_snapshot_patch_with_http_info', kwargs) + + def post_policies_snapshot( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create snapshot policies + + Creates one or more snapshot policies. To copy a policy, set one of either `source_names` or `source_ids`. Each policy can only have one entry. To create a policy from scratch, policy body is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_snapshot_post_with_http_info', kwargs) + + def delete_policies_snapshot_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete snapshot policy rules + + Deletes one or more snapshot policy rules. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_snapshot_rules_delete_with_http_info', kwargs) + + def get_policies_snapshot_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List snapshot policy rules + + Displays a list of snapshot policy rules. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_snapshot_rules_get_with_http_info', kwargs) + + def patch_policies_snapshot_rules( + self, + rules: 'models.PolicyRuleSnapshotPatch', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify snapshot policy rules + + Modifies one or more snapshot policy rules. + + :param rules: (required) + :type rules: PolicyRuleSnapshotPatch + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_snapshot_rules_patch_with_http_info', kwargs) + + def post_policies_snapshot_rules( + self, + rules: 'models.PolicyRuleSnapshotPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create snapshot policy rules + + Creates one or more snapshot policy rules. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param rules: (required) + :type rules: PolicyRuleSnapshotPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_snapshot_rules_post_with_http_info', kwargs) + + def delete_policies_tls( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete TLS policies + + The operation that deletes one or more `TLS policies`. A `policy` cannot be deleted if it is currently applied to any `resources`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_tls_delete_with_http_info', kwargs) + + def get_policies_tls( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + effective: Annotated[Optional[StrictBool], Field(description="The flag that, when set to `true`, ensures the `TLS policies` returned are fully evaluated. Evaluation involves expanding shortened `TLS ciphers`, removing disabled `TLS ciphers` from the list of expanded enabled `TLS ciphers`, and converting values such as `default` and `legacy` into concrete values to return the discrete effective TLS settings that the policies encode. This value defaults to `false`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + purity_defined: Annotated[Optional[StrictBool], Field(description="The flag that, when set to `true`, ensures the results returned include the specification for `purity-defined values` on the current `purity version`. These values may be used in configurations to dynamically adopt new behavior across upgrades, and this option allows the exact behavior for the current version to be returned. This value defaults to `false`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List TLS policies + + The operation that returns a list of `TLS policies` and their `attributes`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param effective: The flag that, when set to `true`, ensures the `TLS policies` returned are fully + evaluated. Evaluation involves expanding shortened `TLS ciphers`, removing + disabled `TLS ciphers` from the list of expanded enabled `TLS ciphers`, and + converting values such as `default` and `legacy` into concrete values to + return the discrete effective TLS settings that the policies encode. This + value defaults to `false`. + :type effective: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param purity_defined: The flag that, when set to `true`, ensures the results returned include the + specification for `purity-defined values` on the current `purity version`. + These values may be used in configurations to dynamically adopt new + behavior across upgrades, and this option allows the exact behavior for the + current version to be returned. This value defaults to `false`. + :type purity_defined: bool + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + effective=effective, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + purity_defined=purity_defined, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_tls_get_with_http_info', kwargs) + + def delete_policies_tls_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between TLS policies and attached object + + The operation that deletes a `membership` between one or more `TLS policies` and an `attached object`. For this request, either `policy_ids` or `policy_names` must be provided, and either `member_ids` or `member_names` must be provided; however, the ID and name parameters for each respective category cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_tls_members_delete_with_http_info', kwargs) + + def get_policies_tls_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List TLS policy members + + The operation that displays a list of `TLS policy members`. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_tls_members_get_with_http_info', kwargs) + + def post_policies_tls_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between an object and a TLS policy + + The operation that creates a `membership` between one or more `resources` and a `TLS policy`. Applicable `resources` are `servers`. Either the `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_tls_members_post_with_http_info', kwargs) + + def patch_policies_tls( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy: Optional['models.PolicyTlsPatch'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify TLS policies + + The operation that modifies one or more `TLS policies`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy: + :type policy: PolicyTlsPatch + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_tls_patch_with_http_info', kwargs) + + def post_policies_tls( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyTlsPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create TLS policies + + The operation that creates one or more `TLS policies`. The `names` parameter is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyTlsPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_tls_post_with_http_info', kwargs) + + def delete_policies_user_group_quota( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete user-group-quota policies + + Deletes one or more user-group-quota policies. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_user_group_quota_delete_with_http_info', kwargs) + + def get_policies_user_group_quota( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List user-group-quota policies + + Displays a list of user-group-quota policies. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_user_group_quota_get_with_http_info', kwargs) + + def delete_policies_user_group_quota_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between user-group-quota policies and managed directories + + Deletes a membership between one or more user-group-quota policies and managed directories. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_user_group_quota_members_delete_with_http_info', kwargs) + + def get_policies_user_group_quota_members( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List user-group-quota policy members + + Displays a list of user-group-quota policy members. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the + full name of the resource endpoint. Valid values include `directories`. + Enter multiple member types in comma-separated format. For example, + `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + member_types=member_types, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'member_types', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_user_group_quota_members_get_with_http_info', kwargs) + + def post_policies_user_group_quota_members( + self, + members: 'models.PolicyMemberPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a managed directory and a user-group-quota policy + + Creates a membership between one or more managed directories and a user-group-quota policy. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param members: (required) + :type members: PolicyMemberPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_user_group_quota_members_post_with_http_info', kwargs) + + def patch_policies_user_group_quota( + self, + policy: 'models.PolicyPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify user-group-quota policies + + Modifies one or more user-group-quota policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=false`. To rename a policy, set `name` to the new name. The `ids` or `names` parameter is required, but they cannot be set together. + + :param policy: (required) + :type policy: PolicyPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policy=policy, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + ignore_usage=ignore_usage, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_user_group_quota_patch_with_http_info', kwargs) + + def post_policies_user_group_quota( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + policy: Optional['models.PolicyPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create user-group-quota policies + + Creates one or more user-group-quota policies. To copy a policy, the `source_names` or `source_ids` parameter is required, but they cannot be set together. To create a policy from scratch, policy body is required. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param policy: + :type policy: PolicyPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + source_ids=source_ids, + source_names=source_names, + policy=policy, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_user_group_quota_post_with_http_info', kwargs) + + def delete_policies_user_group_quota_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete quota policy rules + + Deletes one or more user-group-quota policy rules. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_user_group_quota_rules_delete_with_http_info', kwargs) + + def get_policies_user_group_quota_rules( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List user-group-quota policy rules + + Displays a list of user-group-quota policy rules. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_user_group_quota_rules_get_with_http_info', kwargs) + + def patch_policies_user_group_quota_rules( + self, + rules: 'models.PolicyRuleUserGroupQuotaPatch', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify user-group-quota policy rules + + Modifies user-group-quota policy rules. + + :param rules: (required) + :type rules: PolicyRuleUserGroupQuotaPatch + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + names=names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_user_group_quota_rules_patch_with_http_info', kwargs) + + def post_policies_user_group_quota_rules( + self, + rules: 'models.PolicyRuleUserGroupQuotaPost', + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create user-group-quota policy rules + + Creates one or more user-group-quota policy rules. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. + + :param rules: (required) + :type rules: PolicyRuleUserGroupQuotaPost + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set + to `true`, user/group usage is not checked against the `quota_limits` of + user-group-quota rules. If set to `false`, the impact of the user-group- + quota operation is checked against the user/group usage in the managed + directory and its ancestors and the operation is not allowed if the + user/group usage would exceed any enforced user-group-quota limits. If not + specified, defaults to `false`. + :type ignore_usage: bool + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + rules=rules, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ignore_usage=ignore_usage, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('PoliciesApi', 'api256_policies_user_group_quota_rules_post_with_http_info', kwargs) + + def get_ports( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List ports + + Displays host name, iSCSI Qualified Names (IQNs), NVMe Qualified Names (NQNs), IPv4 address of the portal, Fibre Channel World Wide Names (WWNs), and failover ports, including those that were discovered by Purity//FA and those that have been manually assigned by system administrators. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('PortsApi', 'api256_ports_get_with_http_info', kwargs) + + def get_ports_initiators( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List port initiators + + Displays host iSCSI Qualified Names (IQNs), NVMe Qualified Names (NQNs), and Fibre Channel World Wide Names (WWNs), including those that were discovered by Purity//FA and those that have been manually assigned by system administrators, along with the array ports (targets) on which they are eligible to communicate. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('PortsApi', 'api256_ports_initiators_get_with_http_info', kwargs) + + def delete_presets_workload( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a workload preset + + Deletes a workload preset permanently. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Only one value is + supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PresetsApi', 'api256_presets_workload_delete_with_http_info', kwargs) + + def get_presets_workload( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List workload presets + + Displays a list of workload presets. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PresetsApi', 'api256_presets_workload_get_with_http_info', kwargs) + + def patch_presets_workload( + self, + preset: 'models.PresetWorkloadPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a workload preset + + Modifies a workload preset by overriding the fields specified in `preset`. To rename a workload preset, set name to the new name. + + :param preset: (required) + :type preset: PresetWorkloadPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Only one value is + supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + preset=preset, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PresetsApi', 'api256_presets_workload_patch_with_http_info', kwargs) + + def post_presets_workload( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique resource names specified. Only one value is supported.")], + preset: 'models.PresetWorkloadPost', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + skip_verify_deployable: Annotated[Optional[StrictBool], Field(description="If set to `true`, only the most basic syntax checks are performed on the preset to ensure it is valid, but it is possible that it includes configuration that no array in the current fleet can honor when creating a workload. This is primarily useful when uploading a preset created elsewhere so it can be edited until it is deployable. If set to `false`, when a workload preset is created or updated, arrays in the fleet are queried to ensure at least one array in the fleet can deploy a workload based on the configuration specified in the preset. Defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a workload preset + + Creates one workload preset. + + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. (required) + :type names: List[str] + :param preset: (required) + :type preset: PresetWorkloadPost + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param skip_verify_deployable: If set to `true`, only the most basic syntax checks are performed on the preset + to ensure it is valid, but it is possible that it includes configuration + that no array in the current fleet can honor when creating a workload. + This is primarily useful when uploading a preset created elsewhere so it + can be edited until it is deployable. If set to `false`, when a workload + preset is created or updated, arrays in the fleet are queried to ensure + at least one array in the fleet can deploy a workload based on the + configuration specified in the preset. Defaults to `false`. + :type skip_verify_deployable: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + preset=preset, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + skip_verify_deployable=skip_verify_deployable, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('PresetsApi', 'api256_presets_workload_post_with_http_info', kwargs) + + def put_presets_workload( + self, + preset: 'models.PresetWorkload', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + skip_verify_deployable: Annotated[Optional[StrictBool], Field(description="If set to `true`, only the most basic syntax checks are performed on the preset to ensure it is valid, but it is possible that it includes configuration that no array in the current fleet can honor when creating a workload. This is primarily useful when uploading a preset created elsewhere so it can be edited until it is deployable. If set to `false`, when a workload preset is created or updated, arrays in the fleet are queried to ensure at least one array in the fleet can deploy a workload based on the configuration specified in the preset. Defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update a workload preset + + Updates a workload preset by replacing it with the new contents in `preset`. The `ids` or `names` parameter is required, but they cannot be set together. + + :param preset: (required) + :type preset: PresetWorkload + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Only one value is + supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :param skip_verify_deployable: If set to `true`, only the most basic syntax checks are performed on the preset + to ensure it is valid, but it is possible that it includes configuration + that no array in the current fleet can honor when creating a workload. + This is primarily useful when uploading a preset created elsewhere so it + can be edited until it is deployable. If set to `false`, when a workload + preset is created or updated, arrays in the fleet are queried to ensure + at least one array in the fleet can deploy a workload based on the + configuration specified in the preset. Defaults to `false`. + :type skip_verify_deployable: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + preset=preset, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + skip_verify_deployable=skip_verify_deployable, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('PresetsApi', 'api256_presets_workload_put_with_http_info', kwargs) + + def delete_protection_group_snapshots( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a protection group snapshot + + Deletes a protection group snapshot that has been destroyed and is pending eradication. Eradicating a protection group snapshot eradicates all of its protection group snapshots and cannot be recovered. Protection group snapshots are destroyed through the `PATCH` method. The `names` or `ids` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api256_protection_group_snapshots_delete_with_http_info', kwargs) + + def get_protection_group_snapshots( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection group snapshots + + Displays a list of protection group snapshots, including those pending eradication. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api256_protection_group_snapshots_get_with_http_info', kwargs) + + def patch_protection_group_snapshots( + self, + protection_group_snapshot: 'models.ProtectionGroupSnapshotPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a protection group snapshot + + Modifies a protection group snapshot so that it can be destroyed. To destroy a volume, set `destroyed=true`. To recover a volume that has been destroyed and is pending eradication, set `destroyed=false`. The `names` or `ids` parameter is required, but they cannot be set together. + + :param protection_group_snapshot: (required) + :type protection_group_snapshot: ProtectionGroupSnapshotPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + protection_group_snapshot=protection_group_snapshot, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api256_protection_group_snapshots_patch_with_http_info', kwargs) + + def post_protection_group_snapshots( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows snapshot to fail if array health is not optimal.")] = None, + apply_retention: Annotated[Optional[StrictBool], Field(description="If `true`, applies the local and remote retention policy to the snapshots.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + for_replication: Annotated[Optional[StrictBool], Field(description="If `true`, destroys and eradicates the snapshot after 1 hour.")] = None, + replicate: Annotated[Optional[StrictBool], Field(description="If set to `true`, queues up and begins replicating to each allowed target after all earlier replication sessions for the same protection group have been completed to that target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + replicate_now: Annotated[Optional[StrictBool], Field(description="If set to `true`, replicates the snapshots to each allowed target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + protection_group_snapshot: Optional['models.ProtectionGroupSnapshotPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a protection group snapshot and create tags. + + Creates a point-in-time snapshot of the contents of a protection group. The `source_ids` or `source_names` parameter is required, but they cannot be set together. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows snapshot to fail if array health is not optimal. + :type allow_throttle: bool + :param apply_retention: If `true`, applies the local and remote retention policy to the snapshots. + :type apply_retention: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param for_replication: If `true`, destroys and eradicates the snapshot after 1 hour. + :type for_replication: bool + :param replicate: If set to `true`, queues up and begins replicating to each allowed target after + all earlier replication sessions for the same protection group have been + completed to that target. The `replicate` and `replicate_now` parameters + cannot be used together. + :type replicate: bool + :param replicate_now: If set to `true`, replicates the snapshots to each allowed target. The + `replicate` and `replicate_now` parameters cannot be used together. + :type replicate_now: bool + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param protection_group_snapshot: + :type protection_group_snapshot: ProtectionGroupSnapshotPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + apply_retention=apply_retention, + context_names=context_names, + for_replication=for_replication, + replicate=replicate, + replicate_now=replicate_now, + source_ids=source_ids, + source_names=source_names, + protection_group_snapshot=protection_group_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api256_protection_group_snapshots_post_with_http_info', kwargs) + + def post_protection_group_snapshots_replica( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + convert_source_to_baseline: Annotated[Optional[StrictBool], Field(description="Set to `true` to have the snapshot be eradicated when it is no longer baseline on source.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation locally with the target names specified as the destinations of the operation. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an action to send protection group snapshots + + Creates an action to send protection group snapshots to protection pgroup targets. When the `on` option is used, only specified targets will recieve the protection group snapshots. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param convert_source_to_baseline: Set to `true` to have the snapshot be eradicated when it is no longer baseline + on source. + :type convert_source_to_baseline: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation locally with the target names specified as the + destinations of the operation. Enter multiple target names in comma-separated + format. For example, `targetName01,targetName02`. + :type on: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + convert_source_to_baseline=convert_source_to_baseline, + ids=ids, + names=names, + on=on, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api256_protection_group_snapshots_replica_post_with_http_info', kwargs) + + def put_protection_group_snapshots_tags_batch( + self, + tag: Annotated[conlist('models.TagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if already existing, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates or creates tags for all specified objects. + + :param tag: A list of tags to be created or, if already existing, updated. (required) + :type tag: List[TagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api256_protection_group_snapshots_tags_batch_put_with_http_info', kwargs) + + def delete_protection_group_snapshots_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api256_protection_group_snapshots_tags_delete_with_http_info', kwargs) + + def get_protection_group_snapshots_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api256_protection_group_snapshots_tags_get_with_http_info', kwargs) + + def post_protection_group_snapshots_test( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows snapshot to fail if array health is not optimal.")] = None, + apply_retention: Annotated[Optional[StrictBool], Field(description="If `true`, applies the local and remote retention policy to the snapshots.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + for_replication: Annotated[Optional[StrictBool], Field(description="If `true`, destroys and eradicates the snapshot after 1 hour.")] = None, + replicate: Annotated[Optional[StrictBool], Field(description="If set to `true`, queues up and begins replicating to each allowed target after all earlier replication sessions for the same protection group have been completed to that target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + replicate_now: Annotated[Optional[StrictBool], Field(description="If set to `true`, replicates the snapshots to each allowed target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + protection_group_snapshot: Optional['models.ProtectionGroupSnapshotPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an attempt to take protection group snapshot + + Creates an attempt to take the protection group snapshot, without actually taking it, to test if the snapshot can be successfully taken. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows snapshot to fail if array health is not optimal. + :type allow_throttle: bool + :param apply_retention: If `true`, applies the local and remote retention policy to the snapshots. + :type apply_retention: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param for_replication: If `true`, destroys and eradicates the snapshot after 1 hour. + :type for_replication: bool + :param replicate: If set to `true`, queues up and begins replicating to each allowed target after + all earlier replication sessions for the same protection group have been + completed to that target. The `replicate` and `replicate_now` parameters + cannot be used together. + :type replicate: bool + :param replicate_now: If set to `true`, replicates the snapshots to each allowed target. The + `replicate` and `replicate_now` parameters cannot be used together. + :type replicate_now: bool + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param protection_group_snapshot: + :type protection_group_snapshot: ProtectionGroupSnapshotPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + apply_retention=apply_retention, + context_names=context_names, + for_replication=for_replication, + replicate=replicate, + replicate_now=replicate_now, + source_ids=source_ids, + source_names=source_names, + protection_group_snapshot=protection_group_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api256_protection_group_snapshots_test_post_with_http_info', kwargs) + + def get_protection_group_snapshots_transfer( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection group snapshots with transfer statistics + + Displays a list of protection group snapshots and corresponding transfer statistics. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('ProtectionGroupSnapshotsApi', 'api256_protection_group_snapshots_transfer_get_with_http_info', kwargs) + + def delete_protection_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a protection group + + Deletes a protection group that has been destroyed and is pending eradication. Eradicated protection groups cannot be recovered. Protection groups are destroyed through the `PATCH` method. The `names` parameter is required. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_delete_with_http_info', kwargs) + + def get_protection_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection groups + + Displays a list of protection groups, including their associated source arrays or pods, replication targets, hosts, host groups, and volumes. The list includes protection groups that were created on the local array or realm to replicate snapshot data to other arrays, pods or offload targets, created on a remote array or pod and replicated asynchronously to this array or realm, or created inside a pod on a remote array or realm and stretched to the local array or realm. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_get_with_http_info', kwargs) + + def delete_protection_groups_host_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a host group from a protection group + + Deletes a host group member from a protection group. After the member has been removed, it is no longer protected by the group. Protection group snapshots taken before the member was removed will not be affected. Removing a member from a protection group does not delete the member from the array or realm, and the member can be added back to the protection group at any time. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host group. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_host_groups_delete_with_http_info', kwargs) + + def get_protection_groups_host_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection groups with host group members + + Displays a list of protection groups that have host group members. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_host_groups_get_with_http_info', kwargs) + + def post_protection_groups_host_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Creates an action to add a host group to a protection group + + Creates an action to add a host group member to a protection group. Members that are already in the protection group are not affected. For asynchronous replication, only members of the same type can belong to a protection group. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host group. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_host_groups_post_with_http_info', kwargs) + + def delete_protection_groups_hosts( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a host from a protection group + + Deletes a host member from a protection group. After the member has been removed, it is no longer protected by the group. Any protection group snapshots that were taken before the member was removed will not be affected. Removing a member from a protection group does not delete the member from the array or realm, and the member can be added back to the protection group at any time. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_hosts_delete_with_http_info', kwargs) + + def get_protection_groups_hosts( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection groups with host members + + Displays a list of protection groups that have host members. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_hosts_get_with_http_info', kwargs) + + def post_protection_groups_hosts( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an action to add a host to a protection group + + Creates an action to add a host member to a protection group. Members that are already in the protection group are not affected. For asynchronous replication, only members of the same type can belong to a protection group. The `group_names` parameter represents the name of the protection group, and the `member_names` parameter represents the name of the host. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_names keyword argument. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_hosts_post_with_http_info', kwargs) + + def patch_protection_groups( + self, + protection_group: 'models.ProtectionGroup', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a protection group + + Modifies the protection group schedules to generate and replicate snapshots to another array, pod or to an external storage system. Renames or destroys a protection group. + + :param protection_group: (required) + :type protection_group: ProtectionGroup + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + protection_group=protection_group, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_patch_with_http_info', kwargs) + + def get_protection_groups_performance_replication_by_array( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection group replication performance data with array details + + Displays the total number of bytes of replication data transmitted and received per second. The data is grouped by protection group and includes the names of the source array and targets for each protection group. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_performance_replication_by_array_get_with_http_info', kwargs) + + def get_protection_groups_performance_replication( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection group replication performance data + + Displays the total number of bytes of replication data transmitted and received per second. The data is grouped by protection group. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_performance_replication_get_with_http_info', kwargs) + + def post_protection_groups( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The id of the protection group or protection group snapshot to be copied into a new or existing protection group. If the destination protection group and all of its volumes already exist, include the `overwrite` parameter to overwrite all of the existing volumes with the snapshot contents. If including the `overwrite` parameter, the names of the volumes that are being overwritten must match the names of the volumes that are being restored. If the source is a protection group, the latest snapshot of the protection group will be used as the source during the copy operation.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="The name of the protection group or protection group snapshot to be copied into a new or existing protection group. If the destination protection group and all of its volumes already exist, include the `overwrite` parameter to overwrite all of the existing volumes with the snapshot contents. If including the `overwrite` parameter, the names of the volumes that are being overwritten must match the names of the volumes that are being restored. If the source is a protection group, the latest snapshot of the protection group will be used as the source during the copy operation.")] = None, + protection_group: Optional['models.ProtectionGroupPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a protection group and upsert tags + + Creates a protection group on the local array or realm for asynchronous replication. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :param source_ids: The id of the protection group or protection group snapshot to be copied into a + new or existing protection group. If the destination protection group and + all of its volumes already exist, include the `overwrite` parameter to + overwrite all of the existing volumes with the snapshot contents. If + including the `overwrite` parameter, the names of the volumes that are being + overwritten must match the names of the volumes that are being restored. If + the source is a protection group, the latest snapshot of the protection + group will be used as the source during the copy operation. + :type source_ids: List[str] + :param source_names: The name of the protection group or protection group snapshot to be copied into + a new or existing protection group. If the destination protection group and + all of its volumes already exist, include the `overwrite` parameter to + overwrite all of the existing volumes with the snapshot contents. If + including the `overwrite` parameter, the names of the volumes that are + being overwritten must match the names of the volumes that are being + restored. If the source is a protection group, the latest snapshot of the + protection group will be used as the source during the copy operation. + :type source_names: List[str] + :param protection_group: + :type protection_group: ProtectionGroupPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + overwrite=overwrite, + source_ids=source_ids, + source_names=source_names, + protection_group=protection_group, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_post_with_http_info', kwargs) + + def get_protection_groups_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection group space information + + Displays provisioned size and physical storage consumption data for each protection group. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_space_get_with_http_info', kwargs) + + def put_protection_groups_tags_batch( + self, + tag: Annotated[conlist('models.TagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if one already exists, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags for all specified objects. + + :param tag: A list of tags to be created or, if one already exists, updated. (required) + :type tag: List[TagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_tags_batch_put_with_http_info', kwargs) + + def delete_protection_groups_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_tags_delete_with_http_info', kwargs) + + def get_protection_groups_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_tags_get_with_http_info', kwargs) + + def delete_protection_groups_targets( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a target from a protection group + + Deletes an array, pod, or offload target from a protection group. The `group_names` parameter represents the name of the protection group. The `member_names` parameter represents the name of the array, pod, or offload target that is being removed from the protection group. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_targets_delete_with_http_info', kwargs) + + def get_protection_groups_targets( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection groups with targets + + Displays a list of protection groups that have target arrays, pods, or offload targets. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_targets_get_with_http_info', kwargs) + + def patch_protection_groups_targets( + self, + target: 'models.TargetProtectionGroupPostPatch', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a protection group target + + Modifies the source array or pod to replicate protection group data to the target, or disallows the source array or pod from replicating protection group data to the target. The `allowed` parameter must be set from the target array or realm. The `group_names` parameter represents the name of the protection group. The `allowed` and `group_names` parameters are required and must be set together. Offload targets do not support the `allowed` parameter. + + :param target: (required) + :type target: TargetProtectionGroupPostPatch + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + target=target, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_targets_patch_with_http_info', kwargs) + + def post_protection_groups_targets( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an action to add a target to a protection group + + Creates an action to add an array, pod, or offload target to a protection group. The `group_names` parameter represents the name of the protection group. The `member_names` parameter represents the name of the array, pod, or offload target that is being added to the protection group. The `group_names` and `member_names` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_targets_post_with_http_info', kwargs) + + def delete_protection_groups_volumes( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a volume from a protection group + + Deletes a volume member from a protection group. After the member has been deleted, it is no longer protected by the group. Any protection group snapshots that were taken before the member was deleted are not affected. Deleting a member from a protection group does not delete the member from the array or realm, and the member can be added back to the protection group at any time. The `group_names` parameter represents the name of the protection group, and the `member_names` and `member_ids` parameters represent the names or IDs of the volume. The `group_names` parameter, and either the `member_names` or `member_ids` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_volumes_delete_with_http_info', kwargs) + + def get_protection_groups_volumes( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group id specified. Provide multiple resource IDs in comma-separated format. The group_ids or names parameter is required, but they cannot be set together.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + include_remote: Annotated[Optional[StrictBool], Field(description="If set to `true` the response will include remote membership for protection groups that belong to the remote arrays or realms as well as local volumes. Defaults to `false`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_destroyed: Annotated[Optional[StrictBool], Field(description="If true, returns only destroyed member objects. Returns an error if a name of a live member object is specified in the member_names query param. If false, returns only live member objects. Returns an error if a name of a destroyed member object is specified in the member_names query param.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List protection groups with volume members + + Displays a list of protection groups that have volume members. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: Performs the operation on the unique group id specified. Provide multiple + resource IDs in comma-separated format. The group_ids or names parameter is + required, but they cannot be set together. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param include_remote: If set to `true` the response will include remote membership for protection + groups that belong to the remote arrays or realms as well as local volumes. + Defaults to `false`. + :type include_remote: bool + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_destroyed: If true, returns only destroyed member objects. Returns an error if a name of a + live member object is specified in the member_names query param. If false, + returns only live member objects. Returns an error if a name of a + destroyed member object is specified in the member_names query param. + :type member_destroyed: bool + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + include_remote=include_remote, + limit=limit, + member_destroyed=member_destroyed, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names', 'sort'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_volumes_get_with_http_info', kwargs) + + def post_protection_groups_volumes( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a volume to add it to a protection group + + Creates a volume member and adds it to a protection group. Members that are already in the protection group are not affected. For asynchronous replication, only members of the same type can belong to a protection group. The `group_names` parameter represents the name of the protection group, and the `member_names` and `member_ids` parameters represent the names or IDs of the volume. The `group_names` parameter, and either the `member_names` or `member_ids` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('ProtectionGroupsApi', 'api256_protection_groups_volumes_post_with_http_info', kwargs) + + def delete_realm_connections_connection_keys( + self, + realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete realm connection keys + + Deletes all connection keys for a given realm. Note that every realm connection key is a one-time key and is deleted automatically upon a successful connection or once it expires. + + :param realms: A list of realms to query for. Overrides realm_ids and realm_names keyword arguments. + :type realms: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` + can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + realm_ids=realm_ids, + realm_names=realm_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(realms, ['realm_ids', 'realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'realm_ids', 'realm_names'], kwargs) + return self._call_api('RealmConnectionsApi', 'api256_realm_connections_connection_keys_delete_with_http_info', kwargs) + + def get_realm_connections_connection_keys( + self, + realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Get realm connection key information + + Displays information about existing realm connection keys. Secret keys are not displayed, as they are only available at the time of key creation. + + :param realms: A list of realms to query for. Overrides realm_ids and realm_names keyword arguments. + :type realms: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` + can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + realm_ids=realm_ids, + realm_names=realm_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(realms, ['realm_ids', 'realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'realm_ids', 'realm_names', 'sort'], kwargs) + return self._call_api('RealmConnectionsApi', 'api256_realm_connections_connection_keys_get_with_http_info', kwargs) + + def post_realm_connections_connection_keys( + self, + connection_key: 'models.RealmConnectionKeyPost', + realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create realm connection key + + Creates a new one-time connection key to allow establishing a connection to the specified realm. The key is valid until a successful connection is established or its expiration time is reached. Note that this is the only time the connection key is displayed; it cannot be retrieved subsequently. + + :param connection_key: (required) + :type connection_key: RealmConnectionKeyPost + :param realms: A list of realms to query for. Overrides realm_ids and realm_names keyword arguments. + :type realms: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` + can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + connection_key=connection_key, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + realm_ids=realm_ids, + realm_names=realm_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(realms, ['realm_ids', 'realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'realm_ids', 'realm_names'], kwargs) + return self._call_api('RealmConnectionsApi', 'api256_realm_connections_connection_keys_post_with_http_info', kwargs) + + def delete_realm_connections( + self, + remote_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format.")] = None, + local_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together.")] = None, + local_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together.")] = None, + remote_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + remote_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete realm connections. + + Deletes connections between realms. + + :param remote_realms: A list of remote_realms to query for. Overrides remote_realm_ids and remote_realm_names keyword arguments. + :type remote_realms: ReferenceType or List[ReferenceType], optional + :param local_realms: A list of local_realms to query for. Overrides local_realm_ids and local_realm_names keyword arguments. + :type local_realms: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Enter multiple + resource IDs in comma-separated format. + :type ids: List[str] + :param local_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The local_realm_ids and + local_realm_names parameters cannot be set together. + :type local_realm_ids: List[str] + :param local_realm_names: Performs the operation on the specified unique resource names. Enter multiple + resource names in comma-separated format. The local_realm_names and + local_realm_ids parameters cannot be set together. + :type local_realm_names: List[str] + :param remote_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_ids: List[str] + :param remote_realm_names: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + local_realm_ids=local_realm_ids, + local_realm_names=local_realm_names, + remote_realm_ids=remote_realm_ids, + remote_realm_names=remote_realm_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_realms, ['local_realm_ids', 'local_realm_names'], kwargs) + _process_references(remote_realms, ['remote_realm_ids', 'remote_realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_realm_ids', 'local_realm_names', 'remote_realm_ids', 'remote_realm_names'], kwargs) + return self._call_api('RealmConnectionsApi', 'api256_realm_connections_delete_with_http_info', kwargs) + + def get_realm_connections( + self, + remote_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together.")] = None, + local_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + remote_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List realm connections. + + Displays a list of configured realm connections. + + :param remote_realms: A list of remote_realms to query for. Overrides remote_realm_ids and remote_realm_names keyword arguments. + :type remote_realms: ReferenceType or List[ReferenceType], optional + :param local_realms: A list of local_realms to query for. Overrides local_realm_ids and local_realm_names keyword arguments. + :type local_realms: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: Performs the operation on the unique resource IDs specified. Enter multiple + resource IDs in comma-separated format. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param local_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The local_realm_ids and + local_realm_names parameters cannot be set together. + :type local_realm_ids: List[str] + :param local_realm_names: Performs the operation on the specified unique resource names. Enter multiple + resource names in comma-separated format. The local_realm_names and + local_realm_ids parameters cannot be set together. + :type local_realm_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param remote_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_ids: List[str] + :param remote_realm_names: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + local_realm_ids=local_realm_ids, + local_realm_names=local_realm_names, + offset=offset, + remote_realm_ids=remote_realm_ids, + remote_realm_names=remote_realm_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_realms, ['local_realm_ids', 'local_realm_names'], kwargs) + _process_references(remote_realms, ['remote_realm_ids', 'remote_realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_realm_ids', 'local_realm_names', 'remote_realm_ids', 'remote_realm_names', 'sort'], kwargs) + return self._call_api('RealmConnectionsApi', 'api256_realm_connections_get_with_http_info', kwargs) + + def patch_realm_connections( + self, + connection: 'models.RealmConnectionWithKey', + remote_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format.")] = None, + local_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together.")] = None, + local_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together.")] = None, + remote_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + remote_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify realm connections. + + Modifies the connection type between realms. + + :param connection: (required) + :type connection: RealmConnectionWithKey + :param remote_realms: A list of remote_realms to query for. Overrides remote_realm_ids and remote_realm_names keyword arguments. + :type remote_realms: ReferenceType or List[ReferenceType], optional + :param local_realms: A list of local_realms to query for. Overrides local_realm_ids and local_realm_names keyword arguments. + :type local_realms: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Enter multiple + resource IDs in comma-separated format. + :type ids: List[str] + :param local_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The local_realm_ids and + local_realm_names parameters cannot be set together. + :type local_realm_ids: List[str] + :param local_realm_names: Performs the operation on the specified unique resource names. Enter multiple + resource names in comma-separated format. The local_realm_names and + local_realm_ids parameters cannot be set together. + :type local_realm_names: List[str] + :param remote_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_ids: List[str] + :param remote_realm_names: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + connection=connection, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + local_realm_ids=local_realm_ids, + local_realm_names=local_realm_names, + remote_realm_ids=remote_realm_ids, + remote_realm_names=remote_realm_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(local_realms, ['local_realm_ids', 'local_realm_names'], kwargs) + _process_references(remote_realms, ['remote_realm_ids', 'remote_realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'local_realm_ids', 'local_realm_names', 'remote_realm_ids', 'remote_realm_names'], kwargs) + return self._call_api('RealmConnectionsApi', 'api256_realm_connections_patch_with_http_info', kwargs) + + def post_realm_connections( + self, + connection: 'models.RealmConnectionWithKey', + remote_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + local_realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together.")] = None, + local_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together.")] = None, + remote_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + remote_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create realm connection. + + Creates a new connection between two realms. + + :param connection: (required) + :type connection: RealmConnectionWithKey + :param remote_realms: A list of remote_realms to query for. Overrides remote_realm_ids and remote_realm_names keyword arguments. + :type remote_realms: ReferenceType or List[ReferenceType], optional + :param local_realms: A list of local_realms to query for. Overrides local_realm_ids and local_realm_names keyword arguments. + :type local_realms: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The local_realm_ids and + local_realm_names parameters cannot be set together. + :type local_realm_ids: List[str] + :param local_realm_names: Performs the operation on the specified unique resource names. Enter multiple + resource names in comma-separated format. The local_realm_names and + local_realm_ids parameters cannot be set together. + :type local_realm_names: List[str] + :param remote_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_ids: List[str] + :param remote_realm_names: Performs the operation on the specified unique resource IDs. Enter multiple + resource IDs in comma-separated format. The remote_realm_ids and + remote_realm_names parameters cannot be set together. + :type remote_realm_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + connection=connection, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + local_realm_ids=local_realm_ids, + local_realm_names=local_realm_names, + remote_realm_ids=remote_realm_ids, + remote_realm_names=remote_realm_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(local_realms, ['local_realm_ids', 'local_realm_names'], kwargs) + _process_references(remote_realms, ['remote_realm_ids', 'remote_realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'local_realm_ids', 'local_realm_names', 'remote_realm_ids', 'remote_realm_names'], kwargs) + return self._call_api('RealmConnectionsApi', 'api256_realm_connections_post_with_http_info', kwargs) + + def delete_realms( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + eradicate_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to eradicate contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups). This enables you to eradicate containers with contents.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete realms + + Deletes realms that have been destroyed and are pending eradication. Eradicated realms cannot be recovered. Realms are destroyed using the PATCH method. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param eradicate_contents: Set to `true` to eradicate contents (e.g., volumes, protection groups, + snapshots) and containers (e.g., realms, pods, volume groups). This + enables you to eradicate containers with contents. + :type eradicate_contents: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + eradicate_contents=eradicate_contents, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('RealmsApi', 'api256_realms_delete_with_http_info', kwargs) + + def get_realms( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List realms + + Displays a list of realms. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('RealmsApi', 'api256_realms_get_with_http_info', kwargs) + + def delete_realms_members( + self, + realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a member from a realm + + The deletion of a `stretched realm` from an `array`, collapsing the `realm` to a `member array`. Unstretch a `realm` from an `array` when the `data` within the `stretched realm` no longer needs to be synchronously replicated between the two `members`. After a `realm` has been unstretched, synchronous replication stops. A `destroyed` version of the `realm` with `restretch` appended to the `realm name` is created on the `member` that no longer has the `realm`. The `restretched realm` represents a point-in-time `snapshot` of the `realm`, just before it was unstretched. The `restretched realm` enters an `eradication pending period` starting from the time that the `realm` was unstretched. A `restretched realm` can be `destroyed`, but it cannot be explicitly recovered. The `member_names` parameter represents the `name` of the `array` from which the `realm` is to be unstretched. Both `realm` and `member` must be specified by `name` or `ID`. + + :param realms: A list of realms to query for. Overrides realm_ids and realm_names keyword arguments. + :type realms: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` + can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + realm_ids=realm_ids, + realm_names=realm_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(realms, ['realm_ids', 'realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'realm_ids', 'realm_names'], kwargs) + return self._call_api('RealmsApi', 'api256_realms_members_delete_with_http_info', kwargs) + + def get_realms_members( + self, + realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List realms and their members + + The list of `realms` and the `local` and `remote array members` over which the `realms` are stretched. Currently, either `array` is supported as a `member`. + + :param realms: A list of realms to query for. Overrides realm_ids and realm_names keyword arguments. + :type realms: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` + can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + realm_ids=realm_ids, + realm_names=realm_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(realms, ['realm_ids', 'realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'realm_ids', 'realm_names', 'sort'], kwargs) + return self._call_api('RealmsApi', 'api256_realms_members_get_with_http_info', kwargs) + + def post_realms_members( + self, + realms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Creates a stretched realm + + The creation of a `stretched realm`. When a `realm` is stretched to an `array`, the `data` in the `arrays` over which the `realm` is stretched is synchronously replicated. The `member_names` or `member_ids` parameter represents the `array` over which the `realm` is to be stretched. Both `realm` and `member` must be specified by `name` or `ID`. + + :param realms: A list of realms to query for. Overrides realm_ids and realm_names keyword arguments. + :type realms: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` + can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + realm_ids=realm_ids, + realm_names=realm_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(realms, ['realm_ids', 'realm_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'realm_ids', 'realm_names'], kwargs) + return self._call_api('RealmsApi', 'api256_realms_members_post_with_http_info', kwargs) + + def patch_realms( + self, + realm: 'models.RealmPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + destroy_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups), including eradicating containers with content.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Set to `true` to set a `quota_limit` that is lower than the existing usage. This ensures that no new volumes can be created until the existing usage drops below the `quota_limit`. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify realms + + Modifies realm details. + + :param realm: (required) + :type realm: RealmPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param destroy_contents: Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) + and containers (e.g., realms, pods, volume groups), including eradicating + containers with content. + :type destroy_contents: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param ignore_usage: Set to `true` to set a `quota_limit` that is lower than the existing usage. This + ensures that no new volumes can be created until the existing usage drops + below the `quota_limit`. If not specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + realm=realm, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + destroy_contents=destroy_contents, + ids=ids, + ignore_usage=ignore_usage, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('RealmsApi', 'api256_realms_patch_with_http_info', kwargs) + + def get_realms_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List realm performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes across all realms, displayed both by realm and as a total across all realms. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('RealmsApi', 'api256_realms_performance_get_with_http_info', kwargs) + + def post_realms( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the newly created container (pod or realm) will inherit the default protection configuration from its parent container (realm or array). If specified as `false`, the default protection of the parent container will not be applied automatically. If not specified, defaults to `true`.")] = None, + realm: Optional['models.RealmPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create realms + + Creates realms on the local array. Each realm must be given a name that is unique across the connected arrays. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param with_default_protection: If specified as `true`, the newly created container (pod or realm) will inherit + the default protection configuration from its parent container (realm or + array). If specified as `false`, the default protection of the parent + container will not be applied automatically. If not specified, defaults + to `true`. + :type with_default_protection: bool + :param realm: + :type realm: RealmPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + with_default_protection=with_default_protection, + realm=realm, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('RealmsApi', 'api256_realms_post_with_http_info', kwargs) + + def get_realms_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List realm QoS config + + Displays real-time and historical QoS configuration data for each realm. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('RealmsApi', 'api256_realms_qos_get_with_http_info', kwargs) + + def get_realms_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List realm space information + + Displays provisioned size and storage consumption data for each realm on the local array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('RealmsApi', 'api256_realms_space_get_with_http_info', kwargs) + + def put_realms_tags_batch( + self, + tag: Annotated[conlist('models.NonCopyableTag', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if already existing, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates or creates tags for all specified objects. + + :param tag: A list of tags to be created or, if already existing, updated. (required) + :type tag: List[NonCopyableTag] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('RealmsApi', 'api256_realms_tags_batch_put_with_http_info', kwargs) + + def delete_realms_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('RealmsApi', 'api256_realms_tags_delete_with_http_info', kwargs) + + def get_realms_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('RealmsApi', 'api256_realms_tags_get_with_http_info', kwargs) + + def get_remote_arrays( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + current_fleet_only: Annotated[Optional[StrictBool], Field(description="If current_fleet_only is specified, then results will only show arrays from the same fleet to which the current array is a member of.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote arrays + + The operation that displays `arrays` in the current `fleet`, as well as `arrays` that the current `array` has existing `replication connections` to. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param current_fleet_only: If current_fleet_only is specified, then results will only show arrays from the + same fleet to which the current array is a member of. + :type current_fleet_only: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + current_fleet_only=current_fleet_only, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('RemoteArraysApi', 'api256_remote_arrays_get_with_http_info', kwargs) + + def patch_remote_arrays( + self, + to_topology_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + to_topology_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The operation that moves a selected `remote array` to a specified `topology group` by ID. Either the `to_topology_group_ids` or `to_topology_group_names` parameter is required, but they cannot be set together.")] = None, + to_topology_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The operation that moves a selected `remote array` to a specified `topology group` by name. Either the `to_topology_group_ids` or `to_topology_group_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify remote arrays + + The operation that modifies the `topology group` of `remote arrays`. + + :param to_topology_groups: A list of to_topology_groups to query for. Overrides to_topology_group_ids and to_topology_group_names keyword arguments. + :type to_topology_groups: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param to_topology_group_ids: The operation that moves a selected `remote array` to a specified `topology + group` by ID. Either the `to_topology_group_ids` or + `to_topology_group_names` parameter is required, but they cannot be set + together. + :type to_topology_group_ids: List[str] + :param to_topology_group_names: The operation that moves a selected `remote array` to a specified `topology + group` by name. Either the `to_topology_group_ids` or + `to_topology_group_names` parameter is required, but they cannot be set + together. + :type to_topology_group_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + to_topology_group_ids=to_topology_group_ids, + to_topology_group_names=to_topology_group_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _process_references(to_topology_groups, ['to_topology_group_ids', 'to_topology_group_names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'to_topology_group_ids', 'to_topology_group_names'], kwargs) + return self._call_api('RemoteArraysApi', 'api256_remote_arrays_patch_with_http_info', kwargs) + + def get_remote_pods( + self, + ons: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + on_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified target IDs. Enter multiple target IDs in comma-separated format. The on and on_ids parameters cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote pods + + Displays a list of pods that that are on connected arrays or realms but not stretched to this array or realm. + + :param ons: A list of ons to query for. Overrides on_ids keyword argument. + :type ons: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param on_ids: Performs the operation on the specified target IDs. Enter multiple target IDs in + comma-separated format. The on and on_ids parameters cannot be set together. + :type on_ids: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + on=on, + on_ids=on_ids, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(ons, ['on_ids'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on', 'on_ids', 'sort'], kwargs) + return self._call_api('RemotePodsApi', 'api256_remote_pods_get_with_http_info', kwargs) + + def get_remote_pods_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + ons: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + on_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified target IDs. Enter multiple target IDs in comma-separated format. The on and on_ids parameters cannot be set together.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param ons: A list of ons to query for. Overrides on_ids keyword argument. + :type ons: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param on_ids: Performs the operation on the specified target IDs. Enter multiple target IDs in + comma-separated format. The on and on_ids parameters cannot be set together. + :type on_ids: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + on=on, + on_ids=on_ids, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(ons, ['on_ids'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'on', 'on_ids', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('RemotePodsApi', 'api256_remote_pods_tags_get_with_http_info', kwargs) + + def delete_remote_protection_group_snapshots( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a remote protection group snapshot + + Deletes a remote protection group snapshot that has been destroyed and is pending eradication. Eradicated remote protection group snapshots cannot be recovered. Remote protection group snapshots are destroyed using the `PATCH` method. The `names` parameter represents the name of the protection group snapshot. The `on` parameter represents the name of the offload target. The `names` and `on` parameters are required and must be used together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + on=on, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('RemoteProtectionGroupSnapshotsApi', 'api256_remote_protection_group_snapshots_delete_with_http_info', kwargs) + + def get_remote_protection_group_snapshots( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote protection group snapshots + + Displays a list of remote protection group snapshots. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + on=on, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('RemoteProtectionGroupSnapshotsApi', 'api256_remote_protection_group_snapshots_get_with_http_info', kwargs) + + def patch_remote_protection_group_snapshots( + self, + remote_protection_group_snapshot: 'models.DestroyedPatchPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a remote protection group snapshot + + Modifies a remote protection group snapshot, removing it from the offload target and destroying the snapshot. The `on` parameter represents the name of the offload target. The `ids` or `names` parameter and the `on` parameter are required and must be used together. + + :param remote_protection_group_snapshot: (required) + :type remote_protection_group_snapshot: DestroyedPatchPost + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + remote_protection_group_snapshot=remote_protection_group_snapshot, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + on=on, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('RemoteProtectionGroupSnapshotsApi', 'api256_remote_protection_group_snapshots_patch_with_http_info', kwargs) + + def post_remote_protection_group_snapshots( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows snapshot to fail if array health is not optimal.")] = None, + apply_retention: Annotated[Optional[StrictBool], Field(description="If `true`, applies the local and remote retention policy to the snapshots.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + convert_source_to_baseline: Annotated[Optional[StrictBool], Field(description="Set to `true` to have the snapshot be eradicated when it is no longer baseline on source.")] = None, + for_replication: Annotated[Optional[StrictBool], Field(description="If `true`, destroys and eradicates the snapshot after 1 hour.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + replicate: Annotated[Optional[StrictBool], Field(description="If set to `true`, queues up and begins replicating to each allowed target after all earlier replication sessions for the same protection group have been completed to that target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + replicate_now: Annotated[Optional[StrictBool], Field(description="If set to `true`, replicates the snapshots to each allowed target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + remote_protection_group_snapshot: Optional['models.RemoteProtectionGroupSnapshotPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create remote protection group snapshot and tags + + Creates remote protection group snapshots. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows snapshot to fail if array health is not optimal. + :type allow_throttle: bool + :param apply_retention: If `true`, applies the local and remote retention policy to the snapshots. + :type apply_retention: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param convert_source_to_baseline: Set to `true` to have the snapshot be eradicated when it is no longer baseline + on source. + :type convert_source_to_baseline: bool + :param for_replication: If `true`, destroys and eradicates the snapshot after 1 hour. + :type for_replication: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :param replicate: If set to `true`, queues up and begins replicating to each allowed target after + all earlier replication sessions for the same protection group have been + completed to that target. The `replicate` and `replicate_now` parameters + cannot be used together. + :type replicate: bool + :param replicate_now: If set to `true`, replicates the snapshots to each allowed target. The + `replicate` and `replicate_now` parameters cannot be used together. + :type replicate_now: bool + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param remote_protection_group_snapshot: + :type remote_protection_group_snapshot: RemoteProtectionGroupSnapshotPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + apply_retention=apply_retention, + context_names=context_names, + convert_source_to_baseline=convert_source_to_baseline, + for_replication=for_replication, + ids=ids, + names=names, + on=on, + replicate=replicate, + replicate_now=replicate_now, + source_ids=source_ids, + source_names=source_names, + remote_protection_group_snapshot=remote_protection_group_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('RemoteProtectionGroupSnapshotsApi', 'api256_remote_protection_group_snapshots_post_with_http_info', kwargs) + + def post_remote_protection_group_snapshots_test( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows snapshot to fail if array health is not optimal.")] = None, + apply_retention: Annotated[Optional[StrictBool], Field(description="If `true`, applies the local and remote retention policy to the snapshots.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + convert_source_to_baseline: Annotated[Optional[StrictBool], Field(description="Set to `true` to have the snapshot be eradicated when it is no longer baseline on source.")] = None, + for_replication: Annotated[Optional[StrictBool], Field(description="If `true`, destroys and eradicates the snapshot after 1 hour.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + replicate: Annotated[Optional[StrictBool], Field(description="If set to `true`, queues up and begins replicating to each allowed target after all earlier replication sessions for the same protection group have been completed to that target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + replicate_now: Annotated[Optional[StrictBool], Field(description="If set to `true`, replicates the snapshots to each allowed target. The `replicate` and `replicate_now` parameters cannot be used together.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + remote_protection_group_snapshot: Optional['models.RemoteProtectionGroupSnapshotPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an attempt to take remote protection group snapshot + + Creates an attempt to take a remote protection group snapshot without actually taking it, to test if the snapshot can be successfully taken. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows snapshot to fail if array health is not optimal. + :type allow_throttle: bool + :param apply_retention: If `true`, applies the local and remote retention policy to the snapshots. + :type apply_retention: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param convert_source_to_baseline: Set to `true` to have the snapshot be eradicated when it is no longer baseline + on source. + :type convert_source_to_baseline: bool + :param for_replication: If `true`, destroys and eradicates the snapshot after 1 hour. + :type for_replication: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :param replicate: If set to `true`, queues up and begins replicating to each allowed target after + all earlier replication sessions for the same protection group have been + completed to that target. The `replicate` and `replicate_now` parameters + cannot be used together. + :type replicate: bool + :param replicate_now: If set to `true`, replicates the snapshots to each allowed target. The + `replicate` and `replicate_now` parameters cannot be used together. + :type replicate_now: bool + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param remote_protection_group_snapshot: + :type remote_protection_group_snapshot: RemoteProtectionGroupSnapshotPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + apply_retention=apply_retention, + context_names=context_names, + convert_source_to_baseline=convert_source_to_baseline, + for_replication=for_replication, + ids=ids, + names=names, + on=on, + replicate=replicate, + replicate_now=replicate_now, + source_ids=source_ids, + source_names=source_names, + remote_protection_group_snapshot=remote_protection_group_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'source_ids', 'source_names'], kwargs) + return self._call_api('RemoteProtectionGroupSnapshotsApi', 'api256_remote_protection_group_snapshots_test_post_with_http_info', kwargs) + + def get_remote_protection_group_snapshots_transfer( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote protection groups with transfer statistics + + Displays a list of remote protection groups and their transfer statistics. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + on=on, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('RemoteProtectionGroupSnapshotsApi', 'api256_remote_protection_group_snapshots_transfer_get_with_http_info', kwargs) + + def delete_remote_protection_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a remote protection group + + Deletes a remote protection group that has been destroyed and is pending eradication. Eradicated remote protection groups cannot be recovered. Remote protection groups are destroyed through the `PATCH` method. The `on` parameter represents the name of the offload target. The `ids` or `names` parameter and the `on` parameter are required and must be used together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + on=on, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('RemoteProtectionGroupsApi', 'api256_remote_protection_groups_delete_with_http_info', kwargs) + + def get_remote_protection_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote protection groups + + Returns a list of remote protection groups. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + on=on, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on', 'sort'], kwargs) + return self._call_api('RemoteProtectionGroupsApi', 'api256_remote_protection_groups_get_with_http_info', kwargs) + + def patch_remote_protection_groups( + self, + remote_protection_group: 'models.RemoteProtectionGroup', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a remote protection group + + Modifies the snapshot retention schedule of a remote protection group. Also destroys a remote protection group from the offload target. Before the remote protection group can be destroyed, the offload target must first be removed from the protection group via the source array. The `on` parameter represents the name of the offload target. The `ids` or `names` parameter and the `on` parameter are required and must be used together. + + :param remote_protection_group: (required) + :type remote_protection_group: RemoteProtectionGroup + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + remote_protection_group=remote_protection_group, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + on=on, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('RemoteProtectionGroupsApi', 'api256_remote_protection_groups_patch_with_http_info', kwargs) + + def get_remote_realms( + self, + ons: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + on_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified target IDs. Enter multiple target IDs in comma-separated format. The on and on_ids parameters cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote realms + + Displays a list of realms that are on connected arrays. + + :param ons: A list of ons to query for. Overrides on_ids keyword argument. + :type ons: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param on_ids: Performs the operation on the specified target IDs. Enter multiple target IDs in + comma-separated format. The on and on_ids parameters cannot be set together. + :type on_ids: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + on=on, + on_ids=on_ids, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(ons, ['on_ids'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on', 'on_ids', 'sort'], kwargs) + return self._call_api('RemoteRealmsApi', 'api256_remote_realms_get_with_http_info', kwargs) + + def get_remote_realms_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + ons: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + on_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified target IDs. Enter multiple target IDs in comma-separated format. The on and on_ids parameters cannot be set together.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param ons: A list of ons to query for. Overrides on_ids keyword argument. + :type ons: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param on_ids: Performs the operation on the specified target IDs. Enter multiple target IDs in + comma-separated format. The on and on_ids parameters cannot be set together. + :type on_ids: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + on=on, + on_ids=on_ids, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(ons, ['on_ids'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'on', 'on_ids', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('RemoteRealmsApi', 'api256_remote_realms_tags_get_with_http_info', kwargs) + + def delete_remote_volume_snapshots( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + replication_snapshot: Annotated[Optional[StrictBool], Field(description="If set to `true`, allow destruction/eradication of snapshots in use by replication. If set to `false`, allow destruction/eradication of snapshots not in use by replication. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a remote volume snapshot + + Deletes a remote volume snapshot that has been destroyed and is pending eradication. Eradicated remote volume snapshots cannot be recovered. Remote volume snapshots are destroyed through the `PATCH` method. The `names` parameter represents the name of the volume snapshot. The `on` parameter represents the name of the offload target. The `names` and `on` parameters are required and must be used together. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :param replication_snapshot: If set to `true`, allow destruction/eradication of snapshots in use by + replication. If set to `false`, allow destruction/eradication of + snapshots not in use by replication. If not specified, defaults to + `false`. + :type replication_snapshot: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + on=on, + replication_snapshot=replication_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('RemoteVolumeSnapshotsApi', 'api256_remote_volume_snapshots_delete_with_http_info', kwargs) + + def get_remote_volume_snapshots( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote volume snapshots + + Displays a list of remote volume snapshots. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + on=on, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('RemoteVolumeSnapshotsApi', 'api256_remote_volume_snapshots_get_with_http_info', kwargs) + + def patch_remote_volume_snapshots( + self, + remote_volume_snapshot: 'models.DestroyedPatchPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + replication_snapshot: Annotated[Optional[StrictBool], Field(description="If set to `true`, allow destruction/eradication of snapshots in use by replication. If set to `false`, allow destruction/eradication of snapshots not in use by replication. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a remote volume snapshot + + Modifies a remote volume snapshot by destroying or recovering it from the offload target. The `on` parameter represents the name of the offload target. The `names` parameter and the `on` parameter are required and must be used together. + + :param remote_volume_snapshot: (required) + :type remote_volume_snapshot: DestroyedPatchPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :param replication_snapshot: If set to `true`, allow destruction/eradication of snapshots in use by + replication. If set to `false`, allow destruction/eradication of + snapshots not in use by replication. If not specified, defaults to + `false`. + :type replication_snapshot: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + remote_volume_snapshot=remote_volume_snapshot, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + on=on, + replication_snapshot=replication_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('RemoteVolumeSnapshotsApi', 'api256_remote_volume_snapshots_patch_with_http_info', kwargs) + + def post_remote_volume_snapshots( + self, + remote_volume_snapshot: 'models.RemoteVolumeSnapshotPost', + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a volume snapshot on a connected remote target or offload target + + Creates a volume snapshot on the specified connected remote target or offload target. + + :param remote_volume_snapshot: (required) + :type remote_volume_snapshot: RemoteVolumeSnapshotPost + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + remote_volume_snapshot=remote_volume_snapshot, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + on=on, + source_ids=source_ids, + source_names=source_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('RemoteVolumeSnapshotsApi', 'api256_remote_volume_snapshots_post_with_http_info', kwargs) + + def get_remote_volume_snapshots_transfer( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + on: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the target name specified. Enter multiple target names in comma-separated format. For example, `targetName01,targetName02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote volume snapshots with transfer statistics + + Displays a list of remote volume snapshots and their transfer statistics. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param on: Performs the operation on the target name specified. Enter multiple target names + in comma-separated format. For example, `targetName01,targetName02`. + :type on: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + on=on, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'on', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('RemoteVolumeSnapshotsApi', 'api256_remote_volume_snapshots_transfer_get_with_http_info', kwargs) + + def post_resource_accesses_batch( + self, + items: conlist('models.ResourceAccess'), + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a resource access configuration + + Creates resource access objects. + + :param items: (required) + :type items: List[ResourceAccess] + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + items=items, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['items'], kwargs) + return self._call_api('ResourceAccessesApi', 'api256_resource_accesses_batch_post_with_http_info', kwargs) + + def delete_resource_accesses( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a resource access configuration + + Deletes a resource access object. + + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: Performs the operation on the unique resource IDs specified. Enter multiple + resource IDs in comma-separated format. + :type ids: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids'], kwargs) + _fixup_list_type_params(['ids'], kwargs) + return self._call_api('ResourceAccessesApi', 'api256_resource_accesses_delete_with_http_info', kwargs) + + def get_resource_accesses( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List resource access configurations + + Displays a list of configured resource accesses. + + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: Performs the operation on the unique resource IDs specified. Enter multiple + resource IDs in comma-separated format. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids'], kwargs) + _fixup_list_type_params(['ids', 'sort'], kwargs) + return self._call_api('ResourceAccessesApi', 'api256_resource_accesses_get_with_http_info', kwargs) + + def get_resource_accesses_status( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List status of resource accesses as specified by resource access configuration + + Displays a list of effective resource accesses. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('ResourceAccessesApi', 'api256_resource_accesses_status_get_with_http_info', kwargs) + + def delete_sso_saml2_idps( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete SAML2 SSO configurations + + Deletes SAML2 SSO configurations. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('SAML2SSOApi', 'api256_sso_saml2_idps_delete_with_http_info', kwargs) + + def get_sso_saml2_idps( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SAML2 SSO configurations + + Displays the SAML2 SSO service provider and identity provider configuration settings in the array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('SAML2SSOApi', 'api256_sso_saml2_idps_get_with_http_info', kwargs) + + def patch_sso_saml2_idps( + self, + idp: 'models.Saml2SsoPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify SAML2 SSO configurations + + Modifies one or more attributes of SAML2 SSO configurations. + + :param idp: (required) + :type idp: Saml2SsoPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + idp=idp, + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('SAML2SSOApi', 'api256_sso_saml2_idps_patch_with_http_info', kwargs) + + def post_sso_saml2_idps( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + idp: 'models.Saml2SsoPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create SAML2 SSO configurations + + Creates SAML2 SSO configurations. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param idp: (required) + :type idp: Saml2SsoPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + idp=idp, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('SAML2SSOApi', 'api256_sso_saml2_idps_post_with_http_info', kwargs) + + def get_sso_saml2_idps_test( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List existing SAML2 SSO configurations + + Displays the existing SAML2 SSO configurations in the array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('SAML2SSOApi', 'api256_sso_saml2_idps_test_get_with_http_info', kwargs) + + def patch_sso_saml2_idps_test( + self, + idp: 'models.Saml2SsoPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify provided SAML2 SSO configurations + + Modifies the provided SAML2 SSO configurations. If the configurations with the specified `ids` or `names` exist, the provided configurations will overwrite the existing configurations, but will not be persisted in the array. + + :param idp: (required) + :type idp: Saml2SsoPost + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + idp=idp, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('SAML2SSOApi', 'api256_sso_saml2_idps_test_patch_with_http_info', kwargs) + + def get_smi_s( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SMI-S settings + + Displays the SMI-S settings, including whether SLP and WBEM-HTTPS are enabled. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SMISApi', 'api256_smi_s_get_with_http_info', kwargs) + + def patch_smi_s( + self, + smi_s: 'models.Smis', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify SLP and SMI-S + + Modifies the Service Location Protocol (SLP) and the SMI-S provider, enabling or disabling them. + + :param smi_s: (required) + :type smi_s: Smis + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + smi_s=smi_s, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SMISApi', 'api256_smi_s_patch_with_http_info', kwargs) + + def get_smtp_servers( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SMTP server attributes + + Displays SMTP server attributes. Values include `user_name`, `password`, `relay_host`, `sender_domain`, `sender_username`, `subject_prefix`, `body_prefix`, `encryption_mode`, and `name`. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SMTPApi', 'api256_smtp_servers_get_with_http_info', kwargs) + + def patch_smtp_servers( + self, + smtp: 'models.SmtpServer', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify SMTP server attributes + + Modifies SMTP server attributes. Values include `user_name`, `password`, `relay_host`, `sender_domain`, `sender_username`, `subject_prefix`, `body_prefix`, `encryption_mode`, and `name`. + + :param smtp: (required) + :type smtp: SmtpServer + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + smtp=smtp, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SMTPApi', 'api256_smtp_servers_patch_with_http_info', kwargs) + + def get_snmp_agents( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SNMP agent + + Displays the SNMP agent name and protocol attributes. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SNMPAgentsApi', 'api256_snmp_agents_get_with_http_info', kwargs) + + def get_snmp_agents_mib( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SNMP agent MIB text + + Displays the SNMP MIB text. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SNMPAgentsApi', 'api256_snmp_agents_mib_get_with_http_info', kwargs) + + def patch_snmp_agents( + self, + snmp_agent: 'models.SnmpAgentPatch', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify SNMP agent + + Modifies the name or the protocol attributes of the SNMP agent. + + :param snmp_agent: (required) + :type snmp_agent: SnmpAgentPatch + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + snmp_agent=snmp_agent, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SNMPAgentsApi', 'api256_snmp_agents_patch_with_http_info', kwargs) + + def delete_snmp_managers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete SNMP manager + + Deletes the SNMP manager object and stops communication with specified managers. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('SNMPManagersApi', 'api256_snmp_managers_delete_with_http_info', kwargs) + + def get_snmp_managers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SNMP managers + + Displays designated SNMP managers and their communication and security attributes. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'sort'], kwargs) + return self._call_api('SNMPManagersApi', 'api256_snmp_managers_get_with_http_info', kwargs) + + def patch_snmp_managers( + self, + snmp_manager: 'models.SnmpManagerPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify SNMP manager + + Modifies the name or the protocol attributes of the specified SNMP manager. + + :param snmp_manager: (required) + :type snmp_manager: SnmpManagerPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + snmp_manager=snmp_manager, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('SNMPManagersApi', 'api256_snmp_managers_patch_with_http_info', kwargs) + + def post_snmp_managers( + self, + snmp_manager: 'models.SnmpManagerPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create SNMP manager + + Creates a Purity SNMP manager object that identifies a host (SNMP manager) and specifies the protocol attributes for communicating with it. Once a manager object is created, the transmission of SNMP traps is immediately enabled. + + :param snmp_manager: (required) + :type snmp_manager: SnmpManagerPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + snmp_manager=snmp_manager, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('SNMPManagersApi', 'api256_snmp_managers_post_with_http_info', kwargs) + + def get_snmp_managers_test( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List SNMP manager test results + + Displays SNMP manager test results (traps or informs). + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('SNMPManagersApi', 'api256_snmp_managers_test_get_with_http_info', kwargs) + + def delete_servers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + cascade_delete: Annotated[Optional[conlist(StrictStr)], Field(description="The resource types to delete when deleting the object. It will fail if the resources are referenced by other objects. Valid values include `directory-services`.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete server + + Deletes a server. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param cascade_delete: The resource types to delete when deleting the object. It will fail if the + resources are referenced by other objects. Valid values include `directory- + services`. + :type cascade_delete: List[str] + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + cascade_delete=cascade_delete, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['cascade_delete', 'context_names', 'ids', 'names'], kwargs) + return self._call_api('ServersApi', 'api256_servers_delete_with_http_info', kwargs) + + def get_servers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List servers + + Displays a list of servers. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('ServersApi', 'api256_servers_get_with_http_info', kwargs) + + def patch_servers( + self, + server: 'models.ServerPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify server + + Modifies server details. + + :param server: (required) + :type server: ServerPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + server=server, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('ServersApi', 'api256_servers_patch_with_http_info', kwargs) + + def delete_servers_policies_tls( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete membership between TLS policies and attached object + + The operation that deletes a `membership` between a `server` and a `TLS policy`. For this request, either `policy_ids` or `policy_names` must be provided, and either `member_ids` or `member_names` must be provided; however, the ID and name parameters for each respective category cannot be set together. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + policy_ids=policy_ids, + policy_names=policy_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names'], kwargs) + return self._call_api('ServersApi', 'api256_servers_policies_tls_delete_with_http_info', kwargs) + + def get_servers_policies_tls( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List TLS policies attached to servers + + The operation that displays a list of `TLS policies` that are attached to `servers`. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. The name is expected to be fully + qualified, meaning if the object is contained in some context, the + corresponding name would provide complete information about the containment + hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('ServersApi', 'api256_servers_policies_tls_get_with_http_info', kwargs) + + def post_servers_policies_tls( + self, + policies: 'models.PolicyAssignmentPost', + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a membership between a server and a TLS policy + + The operation that creates a `membership` between a `server` and a `TLS policy`. For this request, either the `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: (required) + :type policies: PolicyAssignmentPost + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + policies=policies, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('ServersApi', 'api256_servers_policies_tls_post_with_http_info', kwargs) + + def post_servers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + create_local_directory_service: Annotated[Optional[StrictStr], Field(description="The name of the local directory service object to be created and associated to the server. This parameter cannot be used together with `local_directory_service` property in the request entity.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + server: Optional['models.ServerPost'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create server + + Creates a server on the local array. The server must be given a unique name. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param create_local_directory_service: The name of the local directory service object to be created and associated to + the server. This parameter cannot be used together with + `local_directory_service` property in the request entity. + :type create_local_directory_service: str + :param names: Performs the operation on the unique name specified. Enter multiple names in + comma-separated format. The name is expected to be fully qualified, meaning + if the object is contained in some context, the corresponding name would + provide complete information about the containment hierarchy. For example, + `name01,pod01::name01`. + :type names: List[str] + :param server: + :type server: ServerPost + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + create_local_directory_service=create_local_directory_service, + names=names, + server=server, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('ServersApi', 'api256_servers_post_with_http_info', kwargs) + + def get_sessions( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List session data + + Displays session data for user login events performed in the Purity//FA GUI, CLI, and REST API. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('SessionsApi', 'api256_sessions_get_with_http_info', kwargs) + + def get_software_bundle( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List software-bundle + + Displays a list of software bundles. + + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids'], kwargs) + _fixup_list_type_params(['ids', 'sort'], kwargs) + return self._call_api('SoftwareApi', 'api256_software_bundle_get_with_http_info', kwargs) + + def post_software_bundle( + self, + source: 'models.SoftwareBundlePost', + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create software-bundle + + Creates and initiates a software bundle download. + + :param source: (required) + :type source: SoftwareBundlePost + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + source=source, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SoftwareApi', 'api256_software_bundle_post_with_http_info', kwargs) + + def delete_software_check( + self, + softwares: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + software_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of software names.")] = None, + software_versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of target software versions.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a software check task + + Deletes a software check task specified by software name and version. The check task must be queued. If the check task is running or passed/failed then the task cannot be deleted. + + :param softwares: A list of softwares to query for. Overrides software_names keyword argument. + :type softwares: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param software_names: A comma-separated list of software names. + :type software_names: List[str] + :param software_versions: A comma-separated list of target software versions. + :type software_versions: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + software_names=software_names, + software_versions=software_versions, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(softwares, ['software_names'], kwargs) + _fixup_list_type_params(['software_names', 'software_versions'], kwargs) + return self._call_api('SoftwareApi', 'api256_software_check_delete_with_http_info', kwargs) + + def get_software_check( + self, + softwares: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + software_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of software names.")] = None, + software_versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of target software versions.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List software check tasks + + Displays a list of software check tasks. + + :param softwares: A list of softwares to query for. Overrides software_names keyword argument. + :type softwares: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param software_names: A comma-separated list of software names. + :type software_names: List[str] + :param software_versions: A comma-separated list of target software versions. + :type software_versions: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + software_names=software_names, + software_versions=software_versions, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _process_references(softwares, ['software_names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'software_names', 'software_versions', 'sort'], kwargs) + return self._call_api('SoftwareApi', 'api256_software_check_get_with_http_info', kwargs) + + def post_software_check( + self, + softwares: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + software_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of software names.")] = None, + software_versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of target software versions.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a software check task + + Creates a software check task. If there are no previously queued or running software check tasks, the new task immediately starts. Otherwise, it is queued and starts once all previously queued or running software check tasks finish. To create a task, use a software name and version. + + :param softwares: A list of softwares to query for. Overrides software_names keyword argument. + :type softwares: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param software_names: A comma-separated list of software names. + :type software_names: List[str] + :param software_versions: A comma-separated list of target software versions. + :type software_versions: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + software_names=software_names, + software_versions=software_versions, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(softwares, ['software_names'], kwargs) + _fixup_list_type_params(['software_names', 'software_versions'], kwargs) + return self._call_api('SoftwareApi', 'api256_software_check_post_with_http_info', kwargs) + + def delete_software( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + software_versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of target software versions.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a software package + + Deletes a software package specified by software name and version. A software package being used for an installation can be deleted if the installation is `downloading`, `downloaded`, `aborted`, or `finished`. If the software package is currently `downloading`, the download will be cancelled. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param software_versions: A comma-separated list of target software versions. + :type software_versions: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + names=names, + software_versions=software_versions, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names', 'software_versions'], kwargs) + return self._call_api('SoftwareApi', 'api256_software_delete_with_http_info', kwargs) + + def get_software( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of versions.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List software packages + + Displays a list of available software packages. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param versions: A comma-separated list of versions. + :type versions: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + versions=versions, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort', 'versions'], kwargs) + return self._call_api('SoftwareApi', 'api256_software_get_with_http_info', kwargs) + + def get_software_installation_steps( + self, + software_installations: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + software_installation_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of software installation IDs.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List software upgrade steps + + Displays a list of currently running and completed software upgrade steps. + + :param software_installations: A list of software_installations to query for. Overrides software_installation_ids keyword argument. + :type software_installations: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param software_installation_ids: A comma-separated list of software installation IDs. + :type software_installation_ids: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + software_installation_ids=software_installation_ids, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _process_references(software_installations, ['software_installation_ids'], kwargs) + _fixup_list_type_params(['ids', 'names', 'software_installation_ids', 'sort'], kwargs) + return self._call_api('SoftwareApi', 'api256_software_installation_steps_get_with_http_info', kwargs) + + def get_software_installations( + self, + softwares: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + software_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of software IDs.")] = None, + software_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of software names.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List software upgrades + + Displays a list of software upgrades, including currently running and past upgrades. + + :param softwares: A list of softwares to query for. Overrides software_ids and software_names keyword arguments. + :type softwares: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param software_ids: A comma-separated list of software IDs. + :type software_ids: List[str] + :param software_names: A comma-separated list of software names. + :type software_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + software_ids=software_ids, + software_names=software_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _process_references(softwares, ['software_ids', 'software_names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'software_ids', 'software_names', 'sort'], kwargs) + return self._call_api('SoftwareApi', 'api256_software_installations_get_with_http_info', kwargs) + + def patch_software_installations( + self, + command: Annotated[StrictStr, Field(..., description="A user command that interacts with the upgrade. Commands may only be issued when the upgrade is paused. Valid values are `continue`, `retry`, and `abort`. The `continue` command continues a `paused` upgrade. The `retry` command retries the previous step. The `abort` command aborts the upgrade.")], + current_step_id: Annotated[StrictStr, Field(..., description="The current step `id` of the installation.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + software_installations: Optional['models.SoftwareInstallationPatch'] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify software upgrade + + Modifies a software upgrade by continuing, retrying, or aborting it. All `override_checks` are updated before the command is issued if `add_override_checks` is present. The `override_checks` parameter is valid when `command` is set to `continue` or `retry`. + + :param command: A user command that interacts with the upgrade. Commands may only be issued when + the upgrade is paused. Valid values are `continue`, `retry`, and `abort`. + The `continue` command continues a `paused` upgrade. The `retry` command + retries the previous step. The `abort` command aborts the upgrade. + (required) + :type command: str + :param current_step_id: The current step `id` of the installation. (required) + :type current_step_id: str + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param software_installations: + :type software_installations: SoftwareInstallationPatch + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + command=command, + current_step_id=current_step_id, + authorization=authorization, + x_request_id=x_request_id, + software_installations=software_installations, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SoftwareApi', 'api256_software_installations_patch_with_http_info', kwargs) + + def post_software_installations( + self, + software_ids: Annotated[conlist(StrictStr), Field(..., description="A comma-separated list of software IDs.")], + software_installations: 'models.SoftwareInstallationPost', + softwares: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a software upgrade + + Creates and initiates a software upgrade. + + :param software_ids: A comma-separated list of software IDs. (required) + :type software_ids: List[str] + :param software_installations: (required) + :type software_installations: SoftwareInstallationPost + :param softwares: A list of softwares to query for. Overrides software_ids keyword argument. + :type softwares: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + software_ids=software_ids, + software_installations=software_installations, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(softwares, ['software_ids'], kwargs) + _fixup_list_type_params(['software_ids'], kwargs) + return self._call_api('SoftwareApi', 'api256_software_installations_post_with_http_info', kwargs) + + def get_software_patches_catalog( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List available software patches + + Displays a list of available software patches. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SoftwareApi', 'api256_software_patches_catalog_get_with_http_info', kwargs) + + def get_software_patches( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List software patches + + Displays a list of software patches. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('SoftwareApi', 'api256_software_patches_get_with_http_info', kwargs) + + def post_software_patches( + self, + name: Annotated[StrictStr, Field(..., description="Name of software patch to install")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_ha_reduction: Annotated[Optional[StrictBool], Field(description="If Software Patch has ha_reduction_required set to true, `allow_ha_reduction` must be set to `true` for Software Patch installation.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a software patch + + Creates software patch download and installation. + + :param name: Name of software patch to install (required) + :type name: str + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_ha_reduction: If Software Patch has ha_reduction_required set to true, `allow_ha_reduction` + must be set to `true` for Software Patch installation. + :type allow_ha_reduction: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + name=name, + authorization=authorization, + x_request_id=x_request_id, + allow_ha_reduction=allow_ha_reduction, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SoftwareApi', 'api256_software_patches_post_with_http_info', kwargs) + + def post_software( + self, + software: 'models.SoftwarePost', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a software package + + Creates a software package download. + + :param software: (required) + :type software: SoftwarePost + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + software=software, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SoftwareApi', 'api256_software_post_with_http_info', kwargs) + + def get_software_versions( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List software versions + + Displays a list of software versions. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SoftwareApi', 'api256_software_versions_get_with_http_info', kwargs) + + def get_storage_classes_members( + self, + storage_classes: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + storage_class_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `storage class` `names` to select.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List storage class members + + A list of the `storage class members` in the `fleet`. + + :param storage_classes: A list of storage_classes to query for. Overrides storage_class_names keyword argument. + :type storage_classes: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param storage_class_names: The comma-separated list of `storage class` `names` to select. + :type storage_class_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + storage_class_names=storage_class_names, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(storage_classes, ['storage_class_names'], kwargs) + _fixup_list_type_params(['member_ids', 'member_names', 'sort', 'storage_class_names'], kwargs) + return self._call_api('StorageClassesApi', 'api256_storage_classes_members_get_with_http_info', kwargs) + + def delete_subnets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete subnet + + Deletes subnets. A subnet can only be deleted if it has no interfaces. Interfaces must be removed by using the `network-interfaces` endpoint. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('SubnetsApi', 'api256_subnets_delete_with_http_info', kwargs) + + def get_subnets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List subnets + + Displays a list of subnets with statuses and attributes. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('SubnetsApi', 'api256_subnets_get_with_http_info', kwargs) + + def patch_subnets( + self, + subnet: 'models.SubnetPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify subnet + + Modifies one or more specified subnet properties. + + :param subnet: (required) + :type subnet: SubnetPatch + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + subnet=subnet, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('SubnetsApi', 'api256_subnets_patch_with_http_info', kwargs) + + def post_subnets( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + subnet: 'models.SubnetPost', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create subnet + + Creates a subnet with the specified parameters. + + :param names: Performs the operation on the unique name specified. For example, `name01`. + Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param subnet: (required) + :type subnet: SubnetPost + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + subnet=subnet, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['names', 'context_names'], kwargs) + return self._call_api('SubnetsApi', 'api256_subnets_post_with_http_info', kwargs) + + def get_subscription_assets( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List subscription assets + + Displays information about subscription assets. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('SubscriptionAssetsApi', 'api256_subscription_assets_get_with_http_info', kwargs) + + def get_subscriptions( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List subscriptions + + Displays information about subscriptions. + + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids'], kwargs) + _fixup_list_type_params(['ids', 'sort'], kwargs) + return self._call_api('SubscriptionsApi', 'api256_subscriptions_get_with_http_info', kwargs) + + def get_support_diagnostics_details( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List diagnostics details + + Displays the diagnostics tests details. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SupportApi', 'api256_support_diagnostics_details_get_with_http_info', kwargs) + + def get_support_diagnostics_settings( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List diagnostics tools version and last updated date + + Displays diagnostics tools version and last updated date. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SupportApi', 'api256_support_diagnostics_settings_get_with_http_info', kwargs) + + def patch_support_diagnostics_settings( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + purity_default: Annotated[Optional[StrictBool], Field(description="Set diagnostics tool to default version.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update diagnostics tools + + Update diagnostics tools from downloaded bundle. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param purity_default: Set diagnostics tool to default version. + :type purity_default: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + purity_default=purity_default, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SupportApi', 'api256_support_diagnostics_settings_patch_with_http_info', kwargs) + + def get_support( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List connection paths + + Displays connection paths between the current array and each connected array. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SupportApi', 'api256_support_get_with_http_info', kwargs) + + def patch_support( + self, + support: 'models.SupportPatch', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create connection path + + Creates a connection path from the array to another array. + + :param support: (required) + :type support: SupportPatch + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + support=support, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SupportApi', 'api256_support_patch_with_http_info', kwargs) + + def get_support_remote_assist_sessions( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote assist session + + Displays settings for remote assist sessions. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SupportApi', 'api256_support_remote_assist_sessions_get_with_http_info', kwargs) + + def patch_support_remote_assist_sessions( + self, + support: 'models.SupportRemoteAssistSessionsPatch', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify remote assist session + + Modifies settings for remote assist sessions. + + :param support: (required) + :type support: SupportRemoteAssistSessionsPatch + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + support=support, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SupportApi', 'api256_support_remote_assist_sessions_patch_with_http_info', kwargs) + + def get_support_remote_assist_sessions_settings( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List remote assist session global settings + + Displays global settings for remote assist sessions. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SupportApi', 'api256_support_remote_assist_sessions_settings_get_with_http_info', kwargs) + + def patch_support_remote_assist_sessions_settings( + self, + support: 'models.SupportRemoteAssistSessionsSettings', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update remote assist session global settings + + Updates global settings for remote assist sessions. + + :param support: (required) + :type support: SupportRemoteAssistSessionsSettings + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + support=support, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('SupportApi', 'api256_support_remote_assist_sessions_settings_patch_with_http_info', kwargs) + + def get_support_system_manifest( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List the system manifest + + The creation and return of the system manifest as a `JSON` object. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SupportApi', 'api256_support_system_manifest_get_with_http_info', kwargs) + + def get_support_test( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + test_type: Annotated[Optional[StrictStr], Field(description="Specifies the type of test. Valid values are `all`, `phonehome`, and `remote-assist`. If not specified, defaults to `all`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List Pure Storage Support connection data + + Displays information about whether the array can connect to Pure Storage Support by establishing a secure shell or secure HTTP connection and verifies that messages can be exchanged. + + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param test_type: Specifies the type of test. Valid values are `all`, `phonehome`, and `remote- + assist`. If not specified, defaults to `all`. + :type test_type: str + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + test_type=test_type, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params(['sort'], kwargs) + return self._call_api('SupportApi', 'api256_support_test_get_with_http_info', kwargs) + + def delete_syslog_servers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete syslog server + + Deletes a configured syslog server and stops forwarding syslog messages. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('SyslogApi', 'api256_syslog_servers_delete_with_http_info', kwargs) + + def get_syslog_servers( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List syslog servers + + Displays a list of configured syslog servers. + + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'sort'], kwargs) + return self._call_api('SyslogApi', 'api256_syslog_servers_get_with_http_info', kwargs) + + def patch_syslog_servers( + self, + syslog_server: 'models.SyslogServer', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify syslog server + + Modifies the URI and services of a configured syslog server. + + :param syslog_server: (required) + :type syslog_server: SyslogServer + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + syslog_server=syslog_server, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('SyslogApi', 'api256_syslog_servers_patch_with_http_info', kwargs) + + def post_syslog_servers( + self, + syslog_server: 'models.SyslogServer', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create syslog server + + Creates a new syslog server. + + :param syslog_server: (required) + :type syslog_server: SyslogServer + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + syslog_server=syslog_server, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('SyslogApi', 'api256_syslog_servers_post_with_http_info', kwargs) + + def get_syslog_servers_settings( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List syslog settings + + Displays syslog settings. Values include `continuation_token`, `items`, `more_items_remaining`, and `total_item_count`. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('SyslogApi', 'api256_syslog_servers_settings_get_with_http_info', kwargs) + + def patch_syslog_servers_settings( + self, + syslog_server_settings: 'models.SyslogServerSettings', + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify syslog settings + + Modifies syslog settings. Values include `continuation_token`, `items`, `more_items_remaining`, and `total_item_count`. + + :param syslog_server_settings: (required) + :type syslog_server_settings: SyslogServerSettings + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + syslog_server_settings=syslog_server_settings, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names'], kwargs) + return self._call_api('SyslogApi', 'api256_syslog_servers_settings_patch_with_http_info', kwargs) + + def get_syslog_servers_test( + self, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List syslog server test results + + Displays syslog server test results, which indicate whether the syslog is working and configured correctly. + + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['context_names', 'sort'], kwargs) + return self._call_api('SyslogApi', 'api256_syslog_servers_test_get_with_http_info', kwargs) + + def get_topology_groups_arrays( + self, + topology_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + topology_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by ID. Multiple IDs must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + topology_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by name. Multiple names must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List topology group arrays + + The operation that lists `arrays` that are `members` of `topology groups`. Specific `topology groups` and `members` can be selected via `query parameters`. + + :param topology_groups: A list of topology_groups to query for. Overrides topology_group_ids and topology_group_names keyword arguments. + :type topology_groups: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param topology_group_ids: The parameter that selects `topology groups` by ID. Multiple IDs must be entered + in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_ids: List[str] + :param topology_group_names: The parameter that selects `topology groups` by name. Multiple names must be + entered in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + topology_group_ids=topology_group_ids, + topology_group_names=topology_group_names, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(topology_groups, ['topology_group_ids', 'topology_group_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'sort', 'topology_group_ids', 'topology_group_names'], kwargs) + return self._call_api('TopologyGroupsApi', 'api256_topology_groups_arrays_get_with_http_info', kwargs) + + def delete_topology_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete topology groups + + The operation that deletes `topology groups`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('TopologyGroupsApi', 'api256_topology_groups_delete_with_http_info', kwargs) + + def get_topology_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + list_all_parents: Annotated[Optional[StrictBool], Field(description="The flag that, when set to `true`, expands the results to include all ancestors of every `topology group` matching the provided `names` or `ids`. This parameter may only be specified if `names` or `ids` is also provided. If not specified, this value defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List topology groups + + The operation that lists `topology groups`. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param list_all_parents: The flag that, when set to `true`, expands the results to include all ancestors + of every `topology group` matching the provided `names` or `ids`. This + parameter may only be specified if `names` or `ids` is also provided. If + not specified, this value defaults to `false`. + :type list_all_parents: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + list_all_parents=list_all_parents, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('TopologyGroupsApi', 'api256_topology_groups_get_with_http_info', kwargs) + + def delete_topology_groups_members( + self, + topology_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + topology_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by ID. Multiple IDs must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + topology_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by name. Multiple names must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Remove topology group members + + The operation that removes `members` from `topology groups`. + + :param topology_groups: A list of topology_groups to query for. Overrides topology_group_ids and topology_group_names keyword arguments. + :type topology_groups: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param topology_group_ids: The parameter that selects `topology groups` by ID. Multiple IDs must be entered + in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_ids: List[str] + :param topology_group_names: The parameter that selects `topology groups` by name. Multiple names must be + entered in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + member_ids=member_ids, + member_names=member_names, + topology_group_ids=topology_group_ids, + topology_group_names=topology_group_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(topology_groups, ['topology_group_ids', 'topology_group_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'topology_group_ids', 'topology_group_names'], kwargs) + return self._call_api('TopologyGroupsApi', 'api256_topology_groups_members_delete_with_http_info', kwargs) + + def get_topology_groups_members( + self, + topology_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + recursive: Annotated[Optional[StrictBool], Field(description="The flag that, when set to `true`, recursively includes all members of a specified `topology group`. This parameter must be used in conjunction with `topology_group_names` or `topology_group_ids`. If not specified, this value defaults to `false`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + topology_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by ID. Multiple IDs must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + topology_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by name. Multiple names must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List topology group members + + The operation that lists `topology group members`. + + :param topology_groups: A list of topology_groups to query for. Overrides topology_group_ids and topology_group_names keyword arguments. + :type topology_groups: ReferenceType or List[ReferenceType], optional + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param recursive: The flag that, when set to `true`, recursively includes all members of a + specified `topology group`. This parameter must be used in conjunction with + `topology_group_names` or `topology_group_ids`. If not specified, this value + defaults to `false`. + :type recursive: bool + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param topology_group_ids: The parameter that selects `topology groups` by ID. Multiple IDs must be entered + in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_ids: List[str] + :param topology_group_names: The parameter that selects `topology groups` by name. Multiple names must be + entered in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + recursive=recursive, + sort=sort, + topology_group_ids=topology_group_ids, + topology_group_names=topology_group_names, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _process_references(topology_groups, ['topology_group_ids', 'topology_group_names'], kwargs) + _fixup_list_type_params(['context_names', 'member_ids', 'member_names', 'sort', 'topology_group_ids', 'topology_group_names'], kwargs) + return self._call_api('TopologyGroupsApi', 'api256_topology_groups_members_get_with_http_info', kwargs) + + def post_topology_groups_members( + self, + members: 'models.TgroupMembersPost', + topology_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + topology_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by ID. Multiple IDs must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + topology_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The parameter that selects `topology groups` by name. Multiple names must be entered in a comma-separated format. Either the `topology_group_ids` or `topology_group_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Add topology group members + + The operation that adds `members` to `topology groups`. The target `topology groups` are selected via `query parameters`, and the `members` must be provided in the `request body`. + + :param members: (required) + :type members: TgroupMembersPost + :param topology_groups: A list of topology_groups to query for. Overrides topology_group_ids and topology_group_names keyword arguments. + :type topology_groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param topology_group_ids: The parameter that selects `topology groups` by ID. Multiple IDs must be entered + in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_ids: List[str] + :param topology_group_names: The parameter that selects `topology groups` by name. Multiple names must be + entered in a comma-separated format. Either the `topology_group_ids` or + `topology_group_names` parameter is required, but they cannot be set + together. + :type topology_group_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + members=members, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + topology_group_ids=topology_group_ids, + topology_group_names=topology_group_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(topology_groups, ['topology_group_ids', 'topology_group_names'], kwargs) + _fixup_list_type_params(['context_names', 'topology_group_ids', 'topology_group_names'], kwargs) + return self._call_api('TopologyGroupsApi', 'api256_topology_groups_members_post_with_http_info', kwargs) + + def patch_topology_groups( + self, + topology_group: 'models.TgroupPatch', + to_parent_topology_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + to_parent_topology_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The operation that moves selected `topology groups` to a specified parent group by ID. Either the `to_parent_topology_group_ids` or `to_parent_topology_group_names` parameter is required, but they cannot be set together.")] = None, + to_parent_topology_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The operation that moves selected `topology groups` to a specified parent group by name. Either the `to_parent_topology_group_ids` or `to_parent_topology_group_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify topology groups + + The operation that modifies `topology groups`. The request body is used to rename a group, while the `to_parent_topology_group_names` or `to_parent_topology_group_ids` `query parameters` are used to move a group to a parent; however, renaming and moving cannot be performed at the same time. + + :param topology_group: (required) + :type topology_group: TgroupPatch + :param to_parent_topology_groups: A list of to_parent_topology_groups to query for. Overrides to_parent_topology_group_ids and to_parent_topology_group_names keyword arguments. + :type to_parent_topology_groups: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param to_parent_topology_group_ids: The operation that moves selected `topology groups` to a specified parent group + by ID. Either the `to_parent_topology_group_ids` or + `to_parent_topology_group_names` parameter is required, but they cannot + be set together. + :type to_parent_topology_group_ids: List[str] + :param to_parent_topology_group_names: The operation that moves selected `topology groups` to a specified parent group + by name. Either the `to_parent_topology_group_ids` or + `to_parent_topology_group_names` parameter is required, but they cannot + be set together. + :type to_parent_topology_group_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + topology_group=topology_group, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + to_parent_topology_group_ids=to_parent_topology_group_ids, + to_parent_topology_group_names=to_parent_topology_group_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(to_parent_topology_groups, ['to_parent_topology_group_ids', 'to_parent_topology_group_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'to_parent_topology_group_ids', 'to_parent_topology_group_names'], kwargs) + return self._call_api('TopologyGroupsApi', 'api256_topology_groups_patch_with_http_info', kwargs) + + def post_topology_groups( + self, + parent_topology_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + parent_topology_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The operation that assigns selected `topology groups` to a specified parent group. Either the `parent_topology_group_ids` or `parent_topology_group_names` parameter is required, but they cannot be set together.")] = None, + parent_topology_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The operation that assigns selected `topology groups` to the specified parent topology group by name. Either the `parent_topology_group_ids` or `parent_topology_group_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create topology groups + + The operation that creates `topology groups`. The `names` parameter is required, and the `parent_topology_group_names` or `parent_topology_group_ids` selectors may optionally be provided via `query parameters`. + + :param parent_topology_groups: A list of parent_topology_groups to query for. Overrides parent_topology_group_ids and parent_topology_group_names keyword arguments. + :type parent_topology_groups: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param parent_topology_group_ids: The operation that assigns selected `topology groups` to a specified parent + group. Either the `parent_topology_group_ids` or + `parent_topology_group_names` parameter is required, but they cannot be + set together. + :type parent_topology_group_ids: List[str] + :param parent_topology_group_names: The operation that assigns selected `topology groups` to the specified parent + topology group by name. Either the `parent_topology_group_ids` or + `parent_topology_group_names` parameter is required, but they cannot be + set together. + :type parent_topology_group_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + parent_topology_group_ids=parent_topology_group_ids, + parent_topology_group_names=parent_topology_group_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _process_references(parent_topology_groups, ['parent_topology_group_ids', 'parent_topology_group_names'], kwargs) + _fixup_list_type_params(['context_names', 'names', 'parent_topology_group_ids', 'parent_topology_group_names'], kwargs) + return self._call_api('TopologyGroupsApi', 'api256_topology_groups_post_with_http_info', kwargs) + + def get_directory_group_quotas( + self, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. For example, `fs:dir01,fs:dir02`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the groups that match the given list of gids. Enter names in a comma-separated format, e.g., `2001,2002`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List group quotas. + + Displays a list of groups and the group quota rules that affect their usage limits. + + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. For example, + `fs:dir01,fs:dir02`. + :type directory_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: Performs the operation on the groups that match the given list of gids. Enter + names in a comma-separated format, e.g., `2001,2002`. + :type group_ids: List[int] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in + comma-separated format. For example, + `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + directory_ids=directory_ids, + directory_names=directory_names, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + group_sids=group_sids, + limit=limit, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _fixup_list_type_params(['context_names', 'directory_ids', 'directory_names', 'group_ids', 'group_names', 'group_sids', 'policy_ids', 'policy_names', 'sort'], kwargs) + return self._call_api('UserGroupQuotasApi', 'api256_directory_group_quotas_get_with_http_info', kwargs) + + def get_directory_user_quotas( + self, + users: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + policies: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + directories: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + directory_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique managed directory IDs specified. Enter multiple managed directory IDs in comma-separated format. The `directory_ids` or `directory_names` parameter is required, but they cannot be set together.")] = None, + directory_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the managed directory names specified. Enter multiple full managed directory names in comma-separated format. For example, `fs:dir01,fs:dir02`.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + user_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the users that match the given list of uids. Enter names in a comma-separated format, for example, `1001,1002`.")] = None, + user_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the users that match the given list of user names. Enter names in a comma-separated format, for example, `u1,u2`.")] = None, + user_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the users that match the given list of user SIDs. Enter SIDs in a comma-separated format, for example, `S-1-1-20-1000,S-1-1-20-2002`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List user quotas. + + Displays a list of users and the user quota rules that affect their usage limits. + + :param users: A list of users to query for. Overrides user_ids and user_names keyword arguments. + :type users: ReferenceType or List[ReferenceType], optional + :param policies: A list of policies to query for. Overrides policy_ids and policy_names keyword arguments. + :type policies: ReferenceType or List[ReferenceType], optional + :param directories: A list of directories to query for. Overrides directory_ids and directory_names keyword arguments. + :type directories: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param directory_ids: Performs the operation on the unique managed directory IDs specified. Enter + multiple managed directory IDs in comma-separated format. The + `directory_ids` or `directory_names` parameter is required, but they cannot + be set together. + :type directory_ids: List[str] + :param directory_names: Performs the operation on the managed directory names specified. Enter multiple + full managed directory names in comma-separated format. For example, + `fs:dir01,fs:dir02`. + :type directory_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy + IDs in comma-separated format. The `policy_ids` or `policy_names` parameter + is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy + names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param user_ids: Performs the operation on the users that match the given list of uids. Enter + names in a comma-separated format, for example, `1001,1002`. + :type user_ids: List[int] + :param user_names: Performs the operation on the users that match the given list of user names. + Enter names in a comma-separated format, for example, `u1,u2`. + :type user_names: List[str] + :param user_sids: Performs the operation on the users that match the given list of user SIDs. + Enter SIDs in a comma-separated format, for example, + `S-1-1-20-1000,S-1-1-20-2002`. + :type user_sids: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + directory_ids=directory_ids, + directory_names=directory_names, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + policy_ids=policy_ids, + policy_names=policy_names, + sort=sort, + total_item_count=total_item_count, + user_ids=user_ids, + user_names=user_names, + user_sids=user_sids, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(directories, ['directory_ids', 'directory_names'], kwargs) + _process_references(policies, ['policy_ids', 'policy_names'], kwargs) + _process_references(users, ['user_ids', 'user_names'], kwargs) + _fixup_list_type_params(['context_names', 'directory_ids', 'directory_names', 'policy_ids', 'policy_names', 'sort', 'user_ids', 'user_names', 'user_sids'], kwargs) + return self._call_api('UserGroupQuotasApi', 'api256_directory_user_quotas_get_with_http_info', kwargs) + + def delete_vchost_connections( + self, + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + protocol_endpoints: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + all_vchosts: Annotated[Optional[StrictBool], Field(description="If set to `true`, the storage container represented by the protocol endpoint is accessible to all vchosts. Users should not specify `vchost_ids` or `vchost_names` in the request. If set to `false`, the storage container represented by the protocol endpoint is only accessible to the vchosts that have explicit vchost-connections with the protocol endpoint. Users need to specify `vchost_ids` or `vchost_names` in the request.")] = None, + protocol_endpoint_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of protocol endpoint IDs. Performs the operation on the protocol endpoints specified. For example, `peid01,peid02`. Cannot be used in conjunction with `protocol_endpoint_names`. If the list contains more than one value, then `vchost_ids` or `vchost_names` must have exactly one value.")] = None, + protocol_endpoint_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of protocol endpoint names. Performs the operation on the protocol endpoints specified. For example, `pe01,pe02`. Cannot be used in conjunction with `protocol_endpoint_ids`. If the list contains more than one value, then `vchost_ids` or `vchost_names` must have exactly one value.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of vchost IDs. Performs the operation on the vchosts specified. For example, `vchostid01,vchostid02`. Cannot be used in conjunction with `vchost_names`. If the list contains more than one value, then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one value.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of vchost names. Performs the operation on the vchosts specified. For example, `vchost01,vchost02`. Cannot be used in conjunction with `vchost_ids`. If the list contains more than one value, then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one value.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete the vchost-connection between a protocol endpoint and its vchost + + Deletes the vchost-connection between a protocol endpoint and its vchost. The storage container represented by the protocol endpoint will no longer be visible to the vCenter represented by the vchost. One of the `protocol_endpoint_names` or `protocol_endpoint_ids` query parameters, and one of the `vchost_names` or `vchost_ids` query parameters are required. But if `all_vchosts` is set to `true`, `vchost_names` and `vchost_ids` should not be specified. + + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param protocol_endpoints: A list of protocol_endpoints to query for. Overrides protocol_endpoint_ids and protocol_endpoint_names keyword arguments. + :type protocol_endpoints: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param all_vchosts: If set to `true`, the storage container represented by the protocol endpoint is + accessible to all vchosts. Users should not specify `vchost_ids` or + `vchost_names` in the request. If set to `false`, the storage container + represented by the protocol endpoint is only accessible to the vchosts that + have explicit vchost-connections with the protocol endpoint. Users need to + specify `vchost_ids` or `vchost_names` in the request. + :type all_vchosts: bool + :param protocol_endpoint_ids: A comma-separated list of protocol endpoint IDs. Performs the operation on the + protocol endpoints specified. For example, `peid01,peid02`. Cannot be + used in conjunction with `protocol_endpoint_names`. If the list contains + more than one value, then `vchost_ids` or `vchost_names` must have + exactly one value. + :type protocol_endpoint_ids: List[str] + :param protocol_endpoint_names: A comma-separated list of protocol endpoint names. Performs the operation on the + protocol endpoints specified. For example, `pe01,pe02`. Cannot be used + in conjunction with `protocol_endpoint_ids`. If the list contains more + than one value, then `vchost_ids` or `vchost_names` must have exactly + one value. + :type protocol_endpoint_names: List[str] + :param vchost_ids: A comma-separated list of vchost IDs. Performs the operation on the vchosts + specified. For example, `vchostid01,vchostid02`. Cannot be used in + conjunction with `vchost_names`. If the list contains more than one value, + then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly + one value. + :type vchost_ids: List[str] + :param vchost_names: A comma-separated list of vchost names. Performs the operation on the vchosts + specified. For example, `vchost01,vchost02`. Cannot be used in conjunction + with `vchost_ids`. If the list contains more than one value, then + `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one + value. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + all_vchosts=all_vchosts, + protocol_endpoint_ids=protocol_endpoint_ids, + protocol_endpoint_names=protocol_endpoint_names, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(protocol_endpoints, ['protocol_endpoint_ids', 'protocol_endpoint_names'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['protocol_endpoint_ids', 'protocol_endpoint_names', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostConnectionsApi', 'api256_vchost_connections_delete_with_http_info', kwargs) + + def get_vchost_connections( + self, + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + protocol_endpoints: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + all_vchosts: Annotated[Optional[StrictBool], Field(description="If set to `true`, the storage container represented by the protocol endpoint is accessible to all vchosts. Users should not specify `vchost_ids` or `vchost_names` in the request. If set to `false`, the storage container represented by the protocol endpoint is only accessible to the vchosts that have explicit vchost-connections with the protocol endpoint. Users need to specify `vchost_ids` or `vchost_names` in the request.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol_endpoint_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of protocol endpoint IDs. Performs the operation on the protocol endpoints specified. For example, `peid01,peid02`. Cannot be used in conjunction with `protocol_endpoint_names`. If the list contains more than one value, then `vchost_ids` or `vchost_names` must have exactly one value.")] = None, + protocol_endpoint_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of protocol endpoint names. Performs the operation on the protocol endpoints specified. For example, `pe01,pe02`. Cannot be used in conjunction with `protocol_endpoint_ids`. If the list contains more than one value, then `vchost_ids` or `vchost_names` must have exactly one value.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of vchost IDs. Performs the operation on the vchosts specified. For example, `vchostid01,vchostid02`. Cannot be used in conjunction with `vchost_names`. If the list contains more than one value, then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one value.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of vchost names. Performs the operation on the vchosts specified. For example, `vchost01,vchost02`. Cannot be used in conjunction with `vchost_ids`. If the list contains more than one value, then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one value.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List the vchost-connections between protocol endpoint and vchost. + + Displays a list of vchost-connections between the protocol endpoint and vchost. + + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param protocol_endpoints: A list of protocol_endpoints to query for. Overrides protocol_endpoint_ids and protocol_endpoint_names keyword arguments. + :type protocol_endpoints: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param all_vchosts: If set to `true`, the storage container represented by the protocol endpoint is + accessible to all vchosts. Users should not specify `vchost_ids` or + `vchost_names` in the request. If set to `false`, the storage container + represented by the protocol endpoint is only accessible to the vchosts that + have explicit vchost-connections with the protocol endpoint. Users need to + specify `vchost_ids` or `vchost_names` in the request. + :type all_vchosts: bool + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param protocol_endpoint_ids: A comma-separated list of protocol endpoint IDs. Performs the operation on the + protocol endpoints specified. For example, `peid01,peid02`. Cannot be + used in conjunction with `protocol_endpoint_names`. If the list contains + more than one value, then `vchost_ids` or `vchost_names` must have + exactly one value. + :type protocol_endpoint_ids: List[str] + :param protocol_endpoint_names: A comma-separated list of protocol endpoint names. Performs the operation on the + protocol endpoints specified. For example, `pe01,pe02`. Cannot be used + in conjunction with `protocol_endpoint_ids`. If the list contains more + than one value, then `vchost_ids` or `vchost_names` must have exactly + one value. + :type protocol_endpoint_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param vchost_ids: A comma-separated list of vchost IDs. Performs the operation on the vchosts + specified. For example, `vchostid01,vchostid02`. Cannot be used in + conjunction with `vchost_names`. If the list contains more than one value, + then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly + one value. + :type vchost_ids: List[str] + :param vchost_names: A comma-separated list of vchost names. Performs the operation on the vchosts + specified. For example, `vchost01,vchost02`. Cannot be used in conjunction + with `vchost_ids`. If the list contains more than one value, then + `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one + value. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + all_vchosts=all_vchosts, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + protocol_endpoint_ids=protocol_endpoint_ids, + protocol_endpoint_names=protocol_endpoint_names, + sort=sort, + total_item_count=total_item_count, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(protocol_endpoints, ['protocol_endpoint_ids', 'protocol_endpoint_names'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['protocol_endpoint_ids', 'protocol_endpoint_names', 'sort', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostConnectionsApi', 'api256_vchost_connections_get_with_http_info', kwargs) + + def post_vchost_connections( + self, + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + protocol_endpoints: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + all_vchosts: Annotated[Optional[StrictBool], Field(description="If set to `true`, the storage container represented by the protocol endpoint is accessible to all vchosts. Users should not specify `vchost_ids` or `vchost_names` in the request. If set to `false`, the storage container represented by the protocol endpoint is only accessible to the vchosts that have explicit vchost-connections with the protocol endpoint. Users need to specify `vchost_ids` or `vchost_names` in the request.")] = None, + allow_stretched_multi_vchost: Annotated[Optional[StrictBool], Field(description="If set to `true`, users are allowed to create a new vchost-connection to a stretched container that already has a vchost-connection. In principle, a stretched container can only have one vchost-connection at a time.")] = None, + protocol_endpoint_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of protocol endpoint IDs. Performs the operation on the protocol endpoints specified. For example, `peid01,peid02`. Cannot be used in conjunction with `protocol_endpoint_names`. If the list contains more than one value, then `vchost_ids` or `vchost_names` must have exactly one value.")] = None, + protocol_endpoint_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of protocol endpoint names. Performs the operation on the protocol endpoints specified. For example, `pe01,pe02`. Cannot be used in conjunction with `protocol_endpoint_ids`. If the list contains more than one value, then `vchost_ids` or `vchost_names` must have exactly one value.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of vchost IDs. Performs the operation on the vchosts specified. For example, `vchostid01,vchostid02`. Cannot be used in conjunction with `vchost_names`. If the list contains more than one value, then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one value.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of vchost names. Performs the operation on the vchosts specified. For example, `vchost01,vchost02`. Cannot be used in conjunction with `vchost_ids`. If the list contains more than one value, then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one value.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a vchost-connection between protocol endpoint and vchost. + + Creates a vchost-connection between protocol endpoint and vchost. Each vchost is associated with a vCenter. Each protocol endpoint is associated with a storage container. A vchost-connection makes the storage container accessible to the vCenter when the vCenter attempts to mount the container. One of `protocol_endpoint_names` or `protocol_endpoint_ids` query parameters and one of `vchost_names` or `vchost_ids` query parameters are required. But if `all_vchosts` is set to `true`, `vchost_names` and `vchost_ids` should not be specified. + + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param protocol_endpoints: A list of protocol_endpoints to query for. Overrides protocol_endpoint_ids and protocol_endpoint_names keyword arguments. + :type protocol_endpoints: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param all_vchosts: If set to `true`, the storage container represented by the protocol endpoint is + accessible to all vchosts. Users should not specify `vchost_ids` or + `vchost_names` in the request. If set to `false`, the storage container + represented by the protocol endpoint is only accessible to the vchosts that + have explicit vchost-connections with the protocol endpoint. Users need to + specify `vchost_ids` or `vchost_names` in the request. + :type all_vchosts: bool + :param allow_stretched_multi_vchost: If set to `true`, users are allowed to create a new vchost-connection to a + stretched container that already has a vchost-connection. In principle, + a stretched container can only have one vchost-connection at a time. + :type allow_stretched_multi_vchost: bool + :param protocol_endpoint_ids: A comma-separated list of protocol endpoint IDs. Performs the operation on the + protocol endpoints specified. For example, `peid01,peid02`. Cannot be + used in conjunction with `protocol_endpoint_names`. If the list contains + more than one value, then `vchost_ids` or `vchost_names` must have + exactly one value. + :type protocol_endpoint_ids: List[str] + :param protocol_endpoint_names: A comma-separated list of protocol endpoint names. Performs the operation on the + protocol endpoints specified. For example, `pe01,pe02`. Cannot be used + in conjunction with `protocol_endpoint_ids`. If the list contains more + than one value, then `vchost_ids` or `vchost_names` must have exactly + one value. + :type protocol_endpoint_names: List[str] + :param vchost_ids: A comma-separated list of vchost IDs. Performs the operation on the vchosts + specified. For example, `vchostid01,vchostid02`. Cannot be used in + conjunction with `vchost_names`. If the list contains more than one value, + then `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly + one value. + :type vchost_ids: List[str] + :param vchost_names: A comma-separated list of vchost names. Performs the operation on the vchosts + specified. For example, `vchost01,vchost02`. Cannot be used in conjunction + with `vchost_ids`. If the list contains more than one value, then + `protocol_endpoint_ids` or `protocol_endpoint_names` must have exactly one + value. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + all_vchosts=all_vchosts, + allow_stretched_multi_vchost=allow_stretched_multi_vchost, + protocol_endpoint_ids=protocol_endpoint_ids, + protocol_endpoint_names=protocol_endpoint_names, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(protocol_endpoints, ['protocol_endpoint_ids', 'protocol_endpoint_names'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['protocol_endpoint_ids', 'protocol_endpoint_names', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostConnectionsApi', 'api256_vchost_connections_post_with_http_info', kwargs) + + def delete_vchosts_certificates( + self, + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a vchost certificate + + Deletes an existing vchost certificate. The `ids` query parameter alone, or the `certificate_names` query parameter together with one of `vchost_names` or `vchost_ids`, is required. + + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param certificates: A list of certificates to query for. Overrides certificate_names keyword argument. + :type certificates: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_names=certificate_names, + ids=ids, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificates, ['certificate_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['certificate_names', 'ids', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api256_vchosts_certificates_delete_with_http_info', kwargs) + + def get_vchosts_certificates( + self, + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List vchost certificates + + Displays certificates that are attached to configured vchosts on at least one endpoint. + + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param certificates: A list of certificates to query for. Overrides certificate_names keyword argument. + :type certificates: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + certificate_names=certificate_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificates, ['certificate_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['certificate_names', 'ids', 'sort', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api256_vchosts_certificates_get_with_http_info', kwargs) + + def patch_vchosts_certificates( + self, + certificate: 'models.VchostCertificatePatch', + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + certificates: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="The names of one or more certificates. Enter multiple names in comma-separated format. For example, `cert01,cert02`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a vchost certificate + + Modifies an existing vchost certificate. The `ids` query parameter alone, or the `certificate_names` query parameter together with one of `vchost_names` or `vchost_ids`, is required. + + :param certificate: (required) + :type certificate: VchostCertificatePatch + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param certificates: A list of certificates to query for. Overrides certificate_names keyword argument. + :type certificates: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_names: The names of one or more certificates. Enter multiple names in comma-separated + format. For example, `cert01,cert02`. + :type certificate_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + certificate=certificate, + authorization=authorization, + x_request_id=x_request_id, + certificate_names=certificate_names, + ids=ids, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(certificates, ['certificate_names'], kwargs) + _process_references(references, ['ids'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['certificate_names', 'ids', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api256_vchosts_certificates_patch_with_http_info', kwargs) + + def post_vchosts_certificates( + self, + certificate: 'models.VchostCertificatePost', + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a vchost certificate + + Creates an association between a certificate and vchost on one or more endpoints. The `vchost_names` or `vchost_ids` query parameter is required. + + :param certificate: (required) + :type certificate: VchostCertificatePost + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + certificate=certificate, + authorization=authorization, + x_request_id=x_request_id, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api256_vchosts_certificates_post_with_http_info', kwargs) + + def delete_vchosts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a vchost + + Deletes an existing vchost. The `names` or `ids` query parameter is required. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('VchostsApi', 'api256_vchosts_delete_with_http_info', kwargs) + + def delete_vchosts_endpoints( + self, + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + endpoints: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique endpoints specified. Enter multiple endpoints in a comma-separated format.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a vchost endpoint + + Deletes an existing vchost endpoint The `ids` query parameter alone, or the `endpoints` query parameter together with one of `vchost_names` or `vchost_ids`, is required. + + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param endpoints: Performs the operation on the unique endpoints specified. Enter multiple + endpoints in a comma-separated format. + :type endpoints: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + endpoints=endpoints, + ids=ids, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['endpoints', 'ids', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api256_vchosts_endpoints_delete_with_http_info', kwargs) + + def get_vchosts_endpoints( + self, + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + endpoints: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique endpoints specified. Enter multiple endpoints in a comma-separated format.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List vchost endpoints + + Displays a list of vchost endpoints with their associated vchosts and certificates. + + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param endpoints: Performs the operation on the unique endpoints specified. Enter multiple + endpoints in a comma-separated format. + :type endpoints: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + endpoints=endpoints, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['endpoints', 'ids', 'sort', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api256_vchosts_endpoints_get_with_http_info', kwargs) + + def patch_vchosts_endpoints( + self, + endpoint: 'models.VchostEndpointPatch', + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + endpoints: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique endpoints specified. Enter multiple endpoints in a comma-separated format.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a vchost endpoint + + Modifies an existing vchost endpoint. The `ids` query parameter alone, or the `endpoints` query parameter together with one of `vchost_names` or `vchost_ids`, is required. + + :param endpoint: (required) + :type endpoint: VchostEndpointPatch + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param endpoints: Performs the operation on the unique endpoints specified. Enter multiple + endpoints in a comma-separated format. + :type endpoints: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + endpoint=endpoint, + authorization=authorization, + x_request_id=x_request_id, + endpoints=endpoints, + ids=ids, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids'], kwargs) + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['endpoints', 'ids', 'vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api256_vchosts_endpoints_patch_with_http_info', kwargs) + + def post_vchosts_endpoints( + self, + endpoint: 'models.VchostEndpointPost', + vchosts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + vchost_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost IDs specified. Enter multiple vchost IDs in a comma-separated format. For example, `vchostid01,vchostid02`.")] = None, + vchost_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique vchost name specified. Enter multiple names in a comma-separated format. For example, `vchost01,vchost02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a vchost endpoint + + Creates a vchost endpoint. Either the `vchost_names` or `vchost_ids` query parameter is required. + + :param endpoint: (required) + :type endpoint: VchostEndpointPost + :param vchosts: A list of vchosts to query for. Overrides vchost_ids and vchost_names keyword arguments. + :type vchosts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param vchost_ids: Performs the operation on the unique vchost IDs specified. Enter multiple vchost + IDs in a comma-separated format. For example, `vchostid01,vchostid02`. + :type vchost_ids: List[str] + :param vchost_names: Performs the operation on the unique vchost name specified. Enter multiple names + in a comma-separated format. For example, `vchost01,vchost02`. + :type vchost_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + endpoint=endpoint, + authorization=authorization, + x_request_id=x_request_id, + vchost_ids=vchost_ids, + vchost_names=vchost_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(vchosts, ['vchost_ids', 'vchost_names'], kwargs) + _fixup_list_type_params(['vchost_ids', 'vchost_names'], kwargs) + return self._call_api('VchostsApi', 'api256_vchosts_endpoints_post_with_http_info', kwargs) + + def get_vchosts( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List vchosts + + Displays a list of vchosts. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names', 'sort'], kwargs) + return self._call_api('VchostsApi', 'api256_vchosts_get_with_http_info', kwargs) + + def patch_vchosts( + self, + vchost: 'models.VchostPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a vchost + + Modifies an existing vchost. The `names` or `ids` query parameter is required. + + :param vchost: (required) + :type vchost: VchostPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + vchost=vchost, + authorization=authorization, + x_request_id=x_request_id, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['ids', 'names'], kwargs) + return self._call_api('VchostsApi', 'api256_vchosts_patch_with_http_info', kwargs) + + def post_vchosts( + self, + vchost: 'models.VchostPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a vchost + + Creates a vchost. The `names` query parameter is required. + + :param vchost: (required) + :type vchost: VchostPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + vchost=vchost, + authorization=authorization, + x_request_id=x_request_id, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['names'], kwargs) + return self._call_api('VchostsApi', 'api256_vchosts_post_with_http_info', kwargs) + + def get_virtual_machine_snapshots( + self, + vms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + vm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique virtual machine IDs specified. Enter multiple resource IDs in a comma-separated format.")] = None, + vm_type: Annotated[Optional[StrictStr], Field(description="The type of virtual machine. The only valid value is `vvol`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List Virtual Machine Snapshots + + Displays a list of virtual machine snapshots, including those pending eradication. If `vm_type` is `vvol`, the `recovery_context` in the response will represent a protection group snapshot containing the virtual machine. This must be used as the `source` in the `POST /virtual-machine` method when recovering or overwriting a virtual machine from a snapshot. + + :param vms: A list of vms to query for. Overrides vm_ids keyword argument. + :type vms: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param vm_ids: Performs the operation on the unique virtual machine IDs specified. Enter + multiple resource IDs in a comma-separated format. + :type vm_ids: List[str] + :param vm_type: The type of virtual machine. The only valid value is `vvol`. + :type vm_type: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + vm_ids=vm_ids, + vm_type=vm_type, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(vms, ['vm_ids'], kwargs) + _fixup_list_type_params(['sort', 'vm_ids'], kwargs) + return self._call_api('VirtualMachinesApi', 'api256_virtual_machine_snapshots_get_with_http_info', kwargs) + + def get_virtual_machine_volume_snapshots( + self, + vm_ids: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique virtual machine IDs specified. Enter multiple resource IDs in a comma-separated format.")], + vms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + vm_type: Annotated[Optional[StrictStr], Field(description="The type of virtual machine. The only valid value is `vvol`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List Virtual Machine Volume Snapshots + + Displays a list of virtual machine volume snapshots, including those pending eradication. If `vm_type` is `vvol`, the `recover_context` in the response will represent a protection group snapshot containing the virtual machine volume. + + :param vm_ids: Performs the operation on the unique virtual machine IDs specified. Enter + multiple resource IDs in a comma-separated format. (required) + :type vm_ids: List[str] + :param vms: A list of vms to query for. Overrides vm_ids keyword argument. + :type vms: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param vm_type: The type of virtual machine. The only valid value is `vvol`. + :type vm_type: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + vm_ids=vm_ids, + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + vm_type=vm_type, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(vms, ['vm_ids'], kwargs) + _fixup_list_type_params(['vm_ids', 'sort'], kwargs) + return self._call_api('VirtualMachinesApi', 'api256_virtual_machine_volume_snapshots_get_with_http_info', kwargs) + + def get_virtual_machines( + self, + vms: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + vm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique virtual machine IDs specified. Enter multiple virtual machine IDs in a comma-separated format.")] = None, + vm_type: Annotated[Optional[StrictStr], Field(description="The type of virtual machine. The only valid value is `vvol`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List Virtual Machines + + Displays a list of virtual machines, including those pending eradication. If `vm_type` is `vvol`, the `recovery_context` in the response will represent the most recent snapshot of the config vVol. This must be used as the `source` in the `PATCH` method when recovering a virtual machine from the destroyed state. + + :param vms: A list of vms to query for. Overrides vm_ids keyword argument. + :type vms: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param vm_ids: Performs the operation on the unique virtual machine IDs specified. Enter + multiple virtual machine IDs in a comma-separated format. + :type vm_ids: List[str] + :param vm_type: The type of virtual machine. The only valid value is `vvol`. + :type vm_type: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + offset=offset, + sort=sort, + total_item_count=total_item_count, + vm_ids=vm_ids, + vm_type=vm_type, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(vms, ['vm_ids'], kwargs) + _fixup_list_type_params(['sort', 'vm_ids'], kwargs) + return self._call_api('VirtualMachinesApi', 'api256_virtual_machines_get_with_http_info', kwargs) + + def patch_virtual_machines( + self, + virtual_machine: 'models.VirtualMachinePost', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update a virtual machine + + Updates a virtual machine, recovering it from the destroyed state. If the virtual machine is of type `vvol`, the `source` property of the request body must be a `recovery_context` value retrieved from the `GET /virtual-machines` endpoint. If recovering the virtual machine will cause a conflict with an existing virtual machine, the operation will fail. + + :param virtual_machine: (required) + :type virtual_machine: VirtualMachinePost + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + virtual_machine=virtual_machine, + authorization=authorization, + x_request_id=x_request_id, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('VirtualMachinesApi', 'api256_virtual_machines_patch_with_http_info', kwargs) + + def post_virtual_machines( + self, + virtual_machine: 'models.VirtualMachinePost', + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a virtual machine + + Creates one or more virtual machines from a protection group snapshot. If the virtual machine is of type `vvol`, the `source` property of the request body must be a `recovery_context` value retrieved from the `GET /virtual-machine-snapshots` endpoint. If `overwrite` is specified, an existing virtual machine will have its volumes overwritten by the snapshot. Otherwise, a new virtual machine will be created from the snapshot. If creating the new virtual machine will cause a conflict with an existing virtual machine, the operation will fail. + + :param virtual_machine: (required) + :type virtual_machine: VirtualMachinePost + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + virtual_machine=virtual_machine, + authorization=authorization, + x_request_id=x_request_id, + overwrite=overwrite, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _fixup_list_type_params([], kwargs) + return self._call_api('VirtualMachinesApi', 'api256_virtual_machines_post_with_http_info', kwargs) + + def delete_volume_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + eradicate_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to eradicate contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups). This enables you to eradicate containers with contents.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a volume group + + Deletes a volume group that has been destroyed and is pending eradication. Eradicated volume groups cannot be recovered. Volume groups are destroyed through the PATCH method. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param eradicate_contents: Set to `true` to eradicate contents (e.g., volumes, protection groups, + snapshots) and containers (e.g., realms, pods, volume groups). This + enables you to eradicate containers with contents. + :type eradicate_contents: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + eradicate_contents=eradicate_contents, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('VolumeGroupsApi', 'api256_volume_groups_delete_with_http_info', kwargs) + + def get_volume_groups( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume groups + + Displays a list of volume groups, including those pending eradication. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumeGroupsApi', 'api256_volume_groups_get_with_http_info', kwargs) + + def patch_volume_groups( + self, + volume_group: 'models.VolumeGroupPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + destroy_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups), including eradicating containers with content.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a volume group + + Modifies a volume group. You can rename, destroy, recover, or set QoS limits for a volume group. To rename a volume group, set `name` to the new name. To destroy a volume group, set `destroyed=true`. To recover a volume group that has been destroyed and is pending eradication, set `destroyed=false`. Sets the bandwidth and IOPS limits of a volume group through the respective `bandwidth_limit` and `iops_limit` parameter. The `ids` or `names` parameter is required, but they cannot be set together. Sets the priority adjustment for a volume group using the `priority_adjustment_operator` and `priority_adjustment_value` fields. + + :param volume_group: (required) + :type volume_group: VolumeGroupPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param destroy_contents: Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) + and containers (e.g., realms, pods, volume groups), including eradicating + containers with content. + :type destroy_contents: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume_group=volume_group, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + destroy_contents=destroy_contents, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('VolumeGroupsApi', 'api256_volume_groups_patch_with_http_info', kwargs) + + def get_volume_groups_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume group performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes for each volume group and and as a total of all volume groups across the entire array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumeGroupsApi', 'api256_volume_groups_performance_get_with_http_info', kwargs) + + def post_volume_groups( + self, + volume_group: 'models.VolumeGroupPost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a volume group and upsert tags. + + Creates a volume group. The volume group itself does not contain any meaningful content; instead, it acts as a container that is used to organize volumes. Once a volume group has been created, volumes can be created inside the volume group or moved into and out of the volume group. + + :param volume_group: (required) + :type volume_group: VolumeGroupPost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume_group=volume_group, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['context_names', 'names'], kwargs) + return self._call_api('VolumeGroupsApi', 'api256_volume_groups_post_with_http_info', kwargs) + + def get_volume_groups_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume group QoS config + + Displays real-time and historical QoS configuration data for each volume group. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumeGroupsApi', 'api256_volume_groups_qos_get_with_http_info', kwargs) + + def get_volume_groups_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume group space information + + Displays the provisioned size and physical storage consumption data for each volume group. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumeGroupsApi', 'api256_volume_groups_space_get_with_http_info', kwargs) + + def put_volume_groups_tags_batch( + self, + tag: Annotated[conlist('models.TagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if one already exists, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags for all specified objects. + + :param tag: A list of tags to be created or, if one already exists, updated. (required) + :type tag: List[TagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('VolumeGroupsApi', 'api256_volume_groups_tags_batch_put_with_http_info', kwargs) + + def delete_volume_groups_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('VolumeGroupsApi', 'api256_volume_groups_tags_delete_with_http_info', kwargs) + + def get_volume_groups_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('VolumeGroupsApi', 'api256_volume_groups_tags_get_with_http_info', kwargs) + + def get_volume_groups_volumes( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume groups with volumes + + Displays a list of volume groups that contain volumes. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names', 'sort'], kwargs) + return self._call_api('VolumeGroupsApi', 'api256_volume_groups_volumes_get_with_http_info', kwargs) + + def post_volume_snapshots_batch( + self, + volume_snapshot: Annotated[conlist('models.VolumeSnapshotBatchPost'), Field(..., description="The list of volume snapshots to be created.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows snapshot to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create volume snapshots and create tags. + + Creates point-in-time snapshots of the contents of volumes. The destroyed parameter, suffixes, and tags can be different for each snapshot. + + :param volume_snapshot: The list of volume snapshots to be created. (required) + :type volume_snapshot: List[VolumeSnapshotBatchPost] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows snapshot to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume_snapshot=volume_snapshot, + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + context_names=context_names, + on=on, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['volume_snapshot', 'context_names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api256_volume_snapshots_batch_post_with_http_info', kwargs) + + def delete_volume_snapshots( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + replication_snapshot: Annotated[Optional[StrictBool], Field(description="If set to `true`, allow destruction/eradication of snapshots in use by replication. If set to `false`, allow destruction/eradication of snapshots not in use by replication. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a volume snapshot + + Deletes a volume snapshot that has been destroyed and is pending eradication. Eradicated volume snapshots cannot be recovered. Volume snapshots are destroyed by using the `PATCH` method. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param replication_snapshot: If set to `true`, allow destruction/eradication of snapshots in use by + replication. If set to `false`, allow destruction/eradication of + snapshots not in use by replication. If not specified, defaults to + `false`. + :type replication_snapshot: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + replication_snapshot=replication_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api256_volume_snapshots_delete_with_http_info', kwargs) + + def get_volume_snapshots( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume snapshots + + Displays a list of volume snapshots, including those pending eradication. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api256_volume_snapshots_get_with_http_info', kwargs) + + def patch_volume_snapshots( + self, + volume_snapshot: 'models.VolumeSnapshotPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + replication_snapshot: Annotated[Optional[StrictBool], Field(description="If set to `true`, allow destruction/eradication of snapshots in use by replication. If set to `false`, allow destruction/eradication of snapshots not in use by replication. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a volume snapshot + + Modifies a volume snapshot by renaming, destroying, or recovering it. To rename the suffix of a volume snapshot, set `name` to the new suffix name. To recover a volume snapshot that has been destroyed and is pending eradication, set `destroyed=true`. The `ids` or `names` parameter is required, but they cannot be set together. + + :param volume_snapshot: (required) + :type volume_snapshot: VolumeSnapshotPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param replication_snapshot: If set to `true`, allow destruction/eradication of snapshots in use by + replication. If set to `false`, allow destruction/eradication of + snapshots not in use by replication. If not specified, defaults to + `false`. + :type replication_snapshot: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume_snapshot=volume_snapshot, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + replication_snapshot=replication_snapshot, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api256_volume_snapshots_patch_with_http_info', kwargs) + + def post_volume_snapshots( + self, + volume_snapshot: 'models.VolumeSnapshotPost', + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows snapshot to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a volume snapshot and tags + + Creates a point-in-time snapshot of the contents of a volume. The `source_ids` or `source_names` parameter is required, but they cannot be set together. + + :param volume_snapshot: (required) + :type volume_snapshot: VolumeSnapshotPost + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows snapshot to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume_snapshot=volume_snapshot, + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + context_names=context_names, + on=on, + source_ids=source_ids, + source_names=source_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api256_volume_snapshots_post_with_http_info', kwargs) + + def put_volume_snapshots_tags_batch( + self, + tag: Annotated[conlist('models.TagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or modified.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags. + + :param tag: A list of tags to be created or modified. (required) + :type tag: List[TagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api256_volume_snapshots_tags_batch_put_with_http_info', kwargs) + + def delete_volume_snapshots_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api256_volume_snapshots_tags_delete_with_http_info', kwargs) + + def get_volume_snapshots_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api256_volume_snapshots_tags_get_with_http_info', kwargs) + + def post_volume_snapshots_test( + self, + volume_snapshot: 'models.VolumeSnapshotPost', + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows snapshot to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + on: Annotated[Optional[StrictStr], Field(description="Performs the operation on the target name specified. For example, `targetName01`.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create the volume snapshot path + + Creates the volume snapshot path without actually taking a volume snapshot. + + :param volume_snapshot: (required) + :type volume_snapshot: VolumeSnapshotPost + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows snapshot to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param on: Performs the operation on the target name specified. For example, + `targetName01`. + :type on: str + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume_snapshot=volume_snapshot, + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + context_names=context_names, + on=on, + source_ids=source_ids, + source_names=source_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'source_ids', 'source_names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api256_volume_snapshots_test_post_with_http_info', kwargs) + + def get_volume_snapshots_transfer( + self, + sources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + source_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source ID specified. Enter multiple source IDs in comma-separated format.")] = None, + source_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the source name specified. Enter multiple source names in comma-separated format. For example, `name01,name02`.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume snapshots with transfer statistics + + Displays a list of volume snapshots and their transfer statistics. + + :param sources: A list of sources to query for. Overrides source_ids and source_names keyword arguments. + :type sources: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param source_ids: Performs the operation on the source ID specified. Enter multiple source IDs in + comma-separated format. + :type source_ids: List[str] + :param source_names: Performs the operation on the source name specified. Enter multiple source names + in comma-separated format. For example, `name01,name02`. + :type source_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + source_ids=source_ids, + source_names=source_names, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(sources, ['source_ids', 'source_names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort', 'source_ids', 'source_names'], kwargs) + return self._call_api('VolumeSnapshotsApi', 'api256_volume_snapshots_transfer_get_with_http_info', kwargs) + + def post_volumes_batch( + self, + volume: Annotated[conlist('models.VolumeBatchPost'), Field(..., description="A list of volumes to be created or copied.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows operation to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="The boolean value that, if `true`, indicates the initial `protection` of the newly created `volumes` will be the union of the `container` default `protection configuration` and `add_to_protection_group_names`. If `false`, the default `protection` of the `container` will not be applied automatically, and the initial `protection` of the newly created `volumes` will be configured solely by `add_to_protection_group_names`. If not specified, the value defaults to `true`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create or copy volumes and upsert tags + + Creates or copies a list of virtual storage volumes. Volumes of different sizes, vgroups, and tag upsertions can be copied this way. + + :param volume: A list of volumes to be created or copied. (required) + :type volume: List[VolumeBatchPost] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows operation to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :param with_default_protection: The boolean value that, if `true`, indicates the initial `protection` of the + newly created `volumes` will be the union of the `container` default + `protection configuration` and `add_to_protection_group_names`. If + `false`, the default `protection` of the `container` will not be applied + automatically, and the initial `protection` of the newly created + `volumes` will be configured solely by `add_to_protection_group_names`. + If not specified, the value defaults to `true`. + :type with_default_protection: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume=volume, + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + context_names=context_names, + overwrite=overwrite, + with_default_protection=with_default_protection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['volume', 'context_names'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_batch_post_with_http_info', kwargs) + + def post_volumes_batch_test( + self, + volume: Annotated[conlist('models.VolumeBatchPost'), Field(..., description="A list of volumes to be copied.")], + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows operation to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="The boolean value that, if `true`, indicates the initial `protection` of the newly created `volumes` will be the union of the `container` default `protection configuration` and `add_to_protection_group_names`. If `false`, the default `protection` of the `container` will not be applied automatically, and the initial `protection` of the newly created `volumes` will be configured solely by `add_to_protection_group_names`. If not specified, the value defaults to `true`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create an attempt to copy volumes and upsert tags + + Creates an attempt to copy virtual storage volumes of different sizes in different vgroups and also upserts tags, without actually creating them, to test if they can be successfully created. Only available for creating volumes via a copy, not direct volume creation. + + :param volume: A list of volumes to be copied. (required) + :type volume: List[VolumeBatchPost] + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows operation to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :param with_default_protection: The boolean value that, if `true`, indicates the initial `protection` of the + newly created `volumes` will be the union of the `container` default + `protection configuration` and `add_to_protection_group_names`. If + `false`, the default `protection` of the `container` will not be applied + automatically, and the initial `protection` of the newly created + `volumes` will be configured solely by `add_to_protection_group_names`. + If not specified, the value defaults to `true`. + :type with_default_protection: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume=volume, + authorization=authorization, + x_request_id=x_request_id, + allow_throttle=allow_throttle, + context_names=context_names, + overwrite=overwrite, + with_default_protection=with_default_protection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _fixup_list_type_params(['volume', 'context_names'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_batch_test_post_with_http_info', kwargs) + + def delete_volumes( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a volume + + Deletes a volume that has been destroyed and is pending eradication. Eradicated volumes cannot be recovered. Volumes are destroyed using the `PATCH` method. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_delete_with_http_info', kwargs) + + def get_volumes_diff( + self, + block_size: Annotated[StrictInt, Field(..., description="Granularity at which to compare, in bytes. Must be a multiple of 512.")], + segment_length: Annotated[StrictInt, Field(..., description="Length of the segment, in bytes, to compare.")], + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + base_id: Annotated[Optional[StrictStr], Field(description="ID of the volume or volume snapshot that the diff comparison is based on. If a base volume or volume snapshot is not specified, all mapped blocks for the volume or volume snapshot are displayed. The `base_name` or `base_id` parameter is required, but they cannot be set together.")] = None, + base_name: Annotated[Optional[StrictStr], Field(description="Name of the volume or volume snapshot that the diff comparison is based on. If a base volume or volume snapshot is not specified, all mapped blocks for the volume or volume snapshot are displayed. The `base_name` or `base_id` parameter is required, but they cannot be set together.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + next_allocated_block_hint: Annotated[Optional[StrictBool], Field(description="If set to `true`, appends offset of the next allocated block in bytes for the volume specified in `names` or `ids` to the output `items`. `base_name` or `base_id` must not be specified if this is set to `true`. If not specified, defaults to `false`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + segment_offset: Annotated[Optional[StrictInt], Field(description="Absolute offset, in bytes, of the segment to compare. Must be a multiple of block_size.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume diffs + + Displays block differences for the specified volumes. + + :param block_size: Granularity at which to compare, in bytes. Must be a multiple of 512. (required) + :type block_size: int + :param segment_length: Length of the segment, in bytes, to compare. (required) + :type segment_length: int + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param base_id: ID of the volume or volume snapshot that the diff comparison is based on. If a + base volume or volume snapshot is not specified, all mapped blocks for the + volume or volume snapshot are displayed. The `base_name` or `base_id` + parameter is required, but they cannot be set together. + :type base_id: str + :param base_name: Name of the volume or volume snapshot that the diff comparison is based on. If a + base volume or volume snapshot is not specified, all mapped blocks for the + volume or volume snapshot are displayed. The `base_name` or `base_id` + parameter is required, but they cannot be set together. + :type base_name: str + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param next_allocated_block_hint: If set to `true`, appends offset of the next allocated block in bytes for the + volume specified in `names` or `ids` to the output `items`. `base_name` + or `base_id` must not be specified if this is set to `true`. If not + specified, defaults to `false`. + :type next_allocated_block_hint: bool + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param segment_offset: Absolute offset, in bytes, of the segment to compare. Must be a multiple of + block_size. + :type segment_offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + block_size=block_size, + segment_length=segment_length, + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + base_id=base_id, + base_name=base_name, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + next_allocated_block_hint=next_allocated_block_hint, + offset=offset, + segment_offset=segment_offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_diff_get_with_http_info', kwargs) + + def get_volumes( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volumes + + Displays a list of volumes, including those pending eradication. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_get_with_http_info', kwargs) + + def patch_volumes( + self, + volume: 'models.VolumePatch', + remove_from_protection_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + add_to_protection_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + add_to_protection_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be added to the specified protection groups along with creation or movement across pods and array. When a volume is moved, the specified protection groups must be in the target pod or array. Enter multiple ids in comma-separated format.")] = None, + add_to_protection_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be added to the specified protection groups along with creation or movement across pods and array. When a volume is moved, the specified protection groups must be in the target pod or array. Enter multiple names in a comma-separated format.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + remove_from_protection_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be removed from the specified protection groups in the source pod or array along with the move. This can only be used when moving volumes across pods and arrays and must include all protection groups that the volumes are members of before the move. Enter multiple ids in a comma-separated format.")] = None, + remove_from_protection_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be removed from the specified protection groups in the source pod or array along with the move. This can only be used when moving volumes across pods and arrays and must include all protection groups that the volumes are members of before the move. Enter multiple names in a comma-separated format.")] = None, + truncate: Annotated[Optional[StrictBool], Field(description="If set to `true`, reduces the size of a volume during a volume resize operation. When a volume is truncated, Purity automatically takes an undo snapshot, providing a 24-hour window during which the previous contents can be retrieved. After truncating a volume, its provisioned size can be subsequently increased, but the data in truncated sectors cannot be retrieved. If set to `false` or not set at all and the volume is being reduced in size, the volume copy operation fails. Required if the `provisioned` parameter is set to a volume size that is smaller than the original size.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a volume + + Modifies a volume by renaming, destroying, or resizing it. To rename a volume, set `name` to the new name. To destroy a volume, set `destroyed=true`. To recover a volume that has been destroyed and is pending eradication, set `destroyed=false`. Set the bandwidth and IOPS limits of a volume through the respective `bandwidth_limit` and `iops_limit` parameter. This moves the volume into a pod or volume group through the respective `pod` or `volume_group` parameter. The `ids` or `names` parameter is required, but they cannot be set together. + + :param volume: (required) + :type volume: VolumePatch + :param remove_from_protection_groups: A list of remove_from_protection_groups to query for. Overrides remove_from_protection_group_ids and remove_from_protection_group_names keyword arguments. + :type remove_from_protection_groups: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param add_to_protection_groups: A list of add_to_protection_groups to query for. Overrides add_to_protection_group_ids and add_to_protection_group_names keyword arguments. + :type add_to_protection_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param add_to_protection_group_ids: The volumes will be added to the specified protection groups along with creation + or movement across pods and array. When a volume is moved, the + specified protection groups must be in the target pod or array. Enter + multiple ids in comma-separated format. + :type add_to_protection_group_ids: List[str] + :param add_to_protection_group_names: The volumes will be added to the specified protection groups along with creation + or movement across pods and array. When a volume is moved, the + specified protection groups must be in the target pod or array. Enter + multiple names in a comma-separated format. + :type add_to_protection_group_names: List[str] + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param remove_from_protection_group_ids: The volumes will be removed from the specified protection groups in the source + pod or array along with the move. This can only be used when moving + volumes across pods and arrays and must include all protection groups + that the volumes are members of before the move. Enter multiple ids in + a comma-separated format. + :type remove_from_protection_group_ids: List[str] + :param remove_from_protection_group_names: The volumes will be removed from the specified protection groups in the source + pod or array along with the move. This can only be used when moving + volumes across pods and arrays and must include all protection groups + that the volumes are members of before the move. Enter multiple names + in a comma-separated format. + :type remove_from_protection_group_names: List[str] + :param truncate: If set to `true`, reduces the size of a volume during a volume resize operation. + When a volume is truncated, Purity automatically takes an undo snapshot, + providing a 24-hour window during which the previous contents can be + retrieved. After truncating a volume, its provisioned size can be + subsequently increased, but the data in truncated sectors cannot be + retrieved. If set to `false` or not set at all and the volume is being + reduced in size, the volume copy operation fails. Required if the + `provisioned` parameter is set to a volume size that is smaller than the + original size. + :type truncate: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume=volume, + authorization=authorization, + x_request_id=x_request_id, + add_to_protection_group_ids=add_to_protection_group_ids, + add_to_protection_group_names=add_to_protection_group_names, + context_names=context_names, + ids=ids, + names=names, + remove_from_protection_group_ids=remove_from_protection_group_ids, + remove_from_protection_group_names=remove_from_protection_group_names, + truncate=truncate, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(add_to_protection_groups, ['add_to_protection_group_ids', 'add_to_protection_group_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _process_references(remove_from_protection_groups, ['remove_from_protection_group_ids', 'remove_from_protection_group_names'], kwargs) + _fixup_list_type_params(['add_to_protection_group_ids', 'add_to_protection_group_names', 'context_names', 'ids', 'names', 'remove_from_protection_group_ids', 'remove_from_protection_group_names'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_patch_with_http_info', kwargs) + + def get_volumes_performance_by_array( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume performance data by array + + Displays real-time and historical performance data, real-time latency data, and average I/O size data. The data returned is for each volume on the current array and for each volume on any remote arrays that are visible to the current array. The data is grouped by individual volumes and as a total across all volumes on each array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_performance_by_array_get_with_http_info', kwargs) + + def get_volumes_performance( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes for each volume and and as a total of all volumes across the entire array. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_performance_get_with_http_info', kwargs) + + def post_volumes( + self, + volume: 'models.VolumePost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + add_to_protection_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + add_to_protection_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be added to the specified protection groups along with creation or movement across pods and array. When a volume is moved, the specified protection groups must be in the target pod or array. Enter multiple ids in comma-separated format.")] = None, + add_to_protection_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be added to the specified protection groups along with creation or movement across pods and array. When a volume is moved, the specified protection groups must be in the target pod or array. Enter multiple names in a comma-separated format.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows operation to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="The boolean value that, if `true`, indicates the initial `protection` of the newly created `volumes` will be the union of the `container` default `protection configuration` and `add_to_protection_group_names`. If `false`, the default `protection` of the `container` will not be applied automatically, and the initial `protection` of the newly created `volumes` will be configured solely by `add_to_protection_group_names`. If not specified, the value defaults to `true`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create or copy a volume and upsert tags + + Creates one or more virtual storage volumes of the specified size. If `provisioned` is not specified, the size of the new volume defaults to 1 MB. The `names` query parameter is required. The `add_to_protection_group_names` query parameter specifies a list of protection group names that will compose the initial protection for the volume. The `with_default_protection` query parameter specifies whether to use the container default protection configuration for the volume. The `add_to_protection_group_names` and `with_default_protection` query parameters cannot be provided when `overwrite` is `true`. + + :param volume: (required) + :type volume: VolumePost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param add_to_protection_groups: A list of add_to_protection_groups to query for. Overrides add_to_protection_group_ids and add_to_protection_group_names keyword arguments. + :type add_to_protection_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param add_to_protection_group_ids: The volumes will be added to the specified protection groups along with creation + or movement across pods and array. When a volume is moved, the + specified protection groups must be in the target pod or array. Enter + multiple ids in comma-separated format. + :type add_to_protection_group_ids: List[str] + :param add_to_protection_group_names: The volumes will be added to the specified protection groups along with creation + or movement across pods and array. When a volume is moved, the + specified protection groups must be in the target pod or array. Enter + multiple names in a comma-separated format. + :type add_to_protection_group_names: List[str] + :param allow_throttle: If set to `true`, allows operation to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :param with_default_protection: The boolean value that, if `true`, indicates the initial `protection` of the + newly created `volumes` will be the union of the `container` default + `protection configuration` and `add_to_protection_group_names`. If + `false`, the default `protection` of the `container` will not be applied + automatically, and the initial `protection` of the newly created + `volumes` will be configured solely by `add_to_protection_group_names`. + If not specified, the value defaults to `true`. + :type with_default_protection: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume=volume, + authorization=authorization, + x_request_id=x_request_id, + add_to_protection_group_ids=add_to_protection_group_ids, + add_to_protection_group_names=add_to_protection_group_names, + allow_throttle=allow_throttle, + context_names=context_names, + names=names, + overwrite=overwrite, + with_default_protection=with_default_protection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(add_to_protection_groups, ['add_to_protection_group_ids', 'add_to_protection_group_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['add_to_protection_group_ids', 'add_to_protection_group_names', 'context_names', 'names'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_post_with_http_info', kwargs) + + def delete_volumes_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a volume from a protection group + + Deletes a volume member from a protection group. After the member has been deleted, it is no longer protected by the group. Any protection group snapshots that were taken before the member was deleted are not affected. Deleting a member from a protection group does not delete the member from the array or realm, and the member can be added back to the protection group at any time. The `group_names` parameter represents the name of the protection group, and the `member_names` and `member_ids` parameters represent the names or IDs of the volume. The `group_names` and only one of `member_names` or `member_ids` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_protection_groups_delete_with_http_info', kwargs) + + def get_volumes_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_destroyed: Annotated[Optional[StrictBool], Field(description="If true, returns only destroyed member objects. Returns an error if a name of a live member object is specified in the member_names query param. If false, returns only live member objects. Returns an error if a name of a destroyed member object is specified in the member_names query param.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volumes that are members of protection groups + + Displays a list of volume members that belong to one or more protection groups. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_destroyed: If true, returns only destroyed member objects. Returns an error if a name of a + live member object is specified in the member_names query param. If false, + returns only live member objects. Returns an error if a name of a + destroyed member object is specified in the member_names query param. + :type member_destroyed: bool + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_destroyed=member_destroyed, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_protection_groups_get_with_http_info', kwargs) + + def post_volumes_protection_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a volume and add it to a protection group + + Creates a volume member and adds it to a protection group. Members that are already in the protection group are not affected. For asynchronous replication, only members of the same type can belong to a protection group. The `group_names` parameter represents the name of the protection group, and the `member_names` and `member_ids` parameters represent the names or IDs of the volume. The `group_names` and only one of `member_names` or `member_ids` parameters are required and must be set together. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + group_ids=group_ids, + group_names=group_names, + member_ids=member_ids, + member_names=member_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_protection_groups_post_with_http_info', kwargs) + + def get_volumes_qos( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume QoS config + + Displays real-time and historical QoS configuration data for each volume. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_qos_get_with_http_info', kwargs) + + def get_volumes_space( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volume space information + + Displays the provisioned size and physical storage consumption data for each volume. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide + performance metrics (`/arrays/performance` endpoint), valid values are + `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 + minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 + hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 + seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), + `28800000` (8 hours), and `86400000` (24 hours). For space metrics, + (`/space` endpoint), valid values are `300000` (5 minutes), + `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and + `86400000` (24 hours). Include the `start_time` parameter to display the + performance data starting at the specified start time. If `start_time` is + not specified, the start time will default to one resolution before the end + time, meaning that the most recent sample of performance data will be + displayed. Include the `end_time` parameter to display the performance data + until the specified end time. If `end_time`is not specified, the end time + will default to the current time. If the `resolution` parameter is not + specified but either the `start_time` or `end_time` parameter is, then + `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where + `start_time` is the beginning of the time window, and `end_time` is the end + of the time window. The `start_time` and `end_time` parameters are specified + in milliseconds since the UNIX epoch. If `start_time` is not specified, the + start time will default to one resolution before the end time, meaning that + the most recent sample of performance data will be displayed. If + `end_time`is not specified, the end time will default to the current time. + Include the `resolution` parameter to display the performance data at the + specified resolution. If not specified, `resolution` defaults to the lowest + valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. + Where it makes more sense, the average value is displayed instead. The + values are displayed for each name where meaningful. If `total_only=true`, + the `items` list will be empty. + :type total_only: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + end_time=end_time, + filter=str(filter) if isinstance(filter, Filter) else filter, + ids=ids, + limit=limit, + names=names, + offset=offset, + resolution=resolution, + sort=sort, + start_time=start_time, + total_item_count=total_item_count, + total_only=total_only, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_space_get_with_http_info', kwargs) + + def put_volumes_tags_batch( + self, + tag: Annotated[conlist('models.TagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if one already exists, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates tags. + + :param tag: A list of tags to be created or, if one already exists, updated. (required) + :type tag: List[TagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_tags_batch_put_with_http_info', kwargs) + + def delete_volumes_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_tags_delete_with_http_info', kwargs) + + def get_volumes_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an + error if the name of a live resource is specified in the `resource_names` + query parameter. If set to `false`, returns only objects from live + resources. Returns an error if the name of a destroyed resource is + specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + limit=limit, + namespaces=namespaces, + offset=offset, + resource_destroyed=resource_destroyed, + resource_ids=resource_ids, + resource_names=resource_names, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_tags_get_with_http_info', kwargs) + + def post_volumes_test( + self, + volume: 'models.VolumePost', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + add_to_protection_groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + add_to_protection_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be added to the specified protection groups along with creation or movement across pods and array. When a volume is moved, the specified protection groups must be in the target pod or array. Enter multiple ids in comma-separated format.")] = None, + add_to_protection_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The volumes will be added to the specified protection groups along with creation or movement across pods and array. When a volume is moved, the specified protection groups must be in the target pod or array. Enter multiple names in a comma-separated format.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows operation to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="The boolean value that, if `true`, indicates the initial `protection` of the newly created `volumes` will be the union of the `container` default `protection configuration` and `add_to_protection_group_names`. If `false`, the default `protection` of the `container` will not be applied automatically, and the initial `protection` of the newly created `volumes` will be configured solely by `add_to_protection_group_names`. If not specified, the value defaults to `true`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a dry run attempt to copy a volume + + Creates a dry run attempt to see if copying a volume would succeed. No virtual volumes are actually copied or created in this process. + + :param volume: (required) + :type volume: VolumePost + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param add_to_protection_groups: A list of add_to_protection_groups to query for. Overrides add_to_protection_group_ids and add_to_protection_group_names keyword arguments. + :type add_to_protection_groups: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param add_to_protection_group_ids: The volumes will be added to the specified protection groups along with creation + or movement across pods and array. When a volume is moved, the + specified protection groups must be in the target pod or array. Enter + multiple ids in comma-separated format. + :type add_to_protection_group_ids: List[str] + :param add_to_protection_group_names: The volumes will be added to the specified protection groups along with creation + or movement across pods and array. When a volume is moved, the + specified protection groups must be in the target pod or array. Enter + multiple names in a comma-separated format. + :type add_to_protection_group_names: List[str] + :param allow_throttle: If set to `true`, allows operation to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. + If set to `false` or not set at all and the target name is an existing + object, the copy operation fails. Required if the `source` body parameter is + set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :param with_default_protection: The boolean value that, if `true`, indicates the initial `protection` of the + newly created `volumes` will be the union of the `container` default + `protection configuration` and `add_to_protection_group_names`. If + `false`, the default `protection` of the `container` will not be applied + automatically, and the initial `protection` of the newly created + `volumes` will be configured solely by `add_to_protection_group_names`. + If not specified, the value defaults to `true`. + :type with_default_protection: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + volume=volume, + authorization=authorization, + x_request_id=x_request_id, + add_to_protection_group_ids=add_to_protection_group_ids, + add_to_protection_group_names=add_to_protection_group_names, + allow_throttle=allow_throttle, + context_names=context_names, + names=names, + overwrite=overwrite, + with_default_protection=with_default_protection, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(add_to_protection_groups, ['add_to_protection_group_ids', 'add_to_protection_group_names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['names'], kwargs) + _fixup_list_type_params(['add_to_protection_group_ids', 'add_to_protection_group_names', 'context_names', 'names'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_test_post_with_http_info', kwargs) + + def get_volumes_volume_groups( + self, + members: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + groups: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[Union[StrictStr, Filter]], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List volumes that are in volume groups + + Displays a list of volumes that are in a volume group. + + :param members: A list of members to query for. Overrides member_ids and member_names keyword arguments. + :type members: ReferenceType or List[ReferenceType], optional + :param groups: A list of groups to query for. Overrides group_ids and group_names keyword arguments. + :type groups: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter + criteria. + :type filter: Union[str, Filter] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups + include host groups, pods, protection groups, and volume groups. Enter + multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member + IDs in comma-separated format. The `member_ids` or `member_names` parameter + is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members + include volumes, hosts, host groups, and directories. Enter multiple names + in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full + set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to + any field name in the response, in ascending order by default, or in + descending order by prefixing the field name with a minus sign (-). Multiple + fields can be specified as a comma-separated list (e.g., sort volumes by + size descending, then by name ascending). If sort is provided, the response + will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters + is calculated and returned in the response. If set to `false`, the + `total_item_count` is `null` in the response. This may speed up queries + where the `total_item_count` is large. If not specified, defaults to + `false`. + :type total_item_count: bool + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + filter=str(filter) if isinstance(filter, Filter) else filter, + group_ids=group_ids, + group_names=group_names, + limit=limit, + member_ids=member_ids, + member_names=member_names, + offset=offset, + sort=sort, + total_item_count=total_item_count, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(groups, ['group_ids', 'group_names'], kwargs) + _process_references(members, ['member_ids', 'member_names'], kwargs) + _fixup_list_type_params(['context_names', 'group_ids', 'group_names', 'member_ids', 'member_names', 'sort'], kwargs) + return self._call_api('VolumesApi', 'api256_volumes_volume_groups_get_with_http_info', kwargs) + + def delete_workloads( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete a workload + + Deletes a workload that has been destroyed and is pending eradication. Eradicated workloads cannot be recovered. Workloads are destroyed using the `PATCH` method. The `ids` or `names` parameter is required, but they cannot be set together. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Only one value is + supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('WorkloadsApi', 'api256_workloads_delete_with_http_info', kwargs) + + def get_workloads( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List workloads + + Displays a list of workloads. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication + pending state. If set to `false`, lists only objects that are not destroyed. + If not set, lists both objects that are destroyed and those that are not + destroyed. For destroyed objects, the time remaining is displayed in + milliseconds. If object name(s) or id(s) are specified, then each object + referenced must exist. If `destroyed` is set to `true`, then each object + referenced must also be destroyed. If `destroyed` is set to `false`, then + each object referenced must also not be destroyed. An error is returned if + any of these conditions are not met. + :type destroyed: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + destroyed=destroyed, + ids=ids, + limit=limit, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('WorkloadsApi', 'api256_workloads_get_with_http_info', kwargs) + + def patch_workloads( + self, + workload: 'models.WorkloadPatch', + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Modify a workload + + Modifies a workload by renaming or destroying it. To rename a workload, set `name` to the new name. To destroy a workload, set `destroyed=true`. To recover a workload that has been destroyed and is pending eradication, set `destroyed=false`. The `ids` or `names` parameter is required, but they cannot be set together. + + :param workload: (required) + :type workload: WorkloadPatch + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Only one value is + supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + workload=workload, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + ids=ids, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('WorkloadsApi', 'api256_workloads_patch_with_http_info', kwargs) + + def get_workloads_placement_recommendations( + self, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List workload placement recommendations + + Displays a list of placement recommendations for workloads. + + :param references: A list of references to query for. Overrides ids and names keyword arguments. + :type references: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. + The token is a Base64 encoded value. Set `continuation_token` to the + system-generated token taken from the `x-next-token` header field of the + response. A query has reached its last page when the response does not + include a token. Pagination requires the `limit` and `continuation_token` + query parameters. + :type continuation_token: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match + each specified ID, otherwise an error is returned. This parameter is required + if ids or names is not provided, but it cannot be used together with name or + names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. + To return the total number of resources, set `limit=0`. The total number of + resources is returned as a `total_item_count` value. If the page size + requested is larger than the system maximum limit, the server returns the + maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in + comma-separated format. For example, `name01,name02`. If there is not at + least one resource that matches each of the elements of `names`, then an + error is returned, except when creating new resources. + :type names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + continuation_token=continuation_token, + ids=ids, + limit=limit, + names=names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(references, ['ids', 'names'], kwargs) + _fixup_list_type_params(['context_names', 'ids', 'names'], kwargs) + return self._call_api('WorkloadsApi', 'api256_workloads_placement_recommendations_get_with_http_info', kwargs) + + def post_workloads_placement_recommendations( + self, + inputs: 'models.WorkloadPlacementRecommendation', + presets: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + placements: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + placement_names: Annotated[Optional[conlist(StrictStr)], Field(description="Placements from the preset which should be used to compute recommendation. Optional parameter if preset has just one placement.")] = None, + preset_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Creates the workload placement recommendations using the presets specified by ids. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together.")] = None, + preset_names: Annotated[Optional[conlist(StrictStr)], Field(description="Creates the workload placement recommendations using the presets specified by names. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a request for a workload placement recommendation. + + Creates a recommendation for the placement of the specified workload. The computation might take a few minutes. + + :param inputs: (required) + :type inputs: WorkloadPlacementRecommendation + :param presets: A list of presets to query for. Overrides preset_ids and preset_names keyword arguments. + :type presets: ReferenceType or List[ReferenceType], optional + :param placements: A list of placements to query for. Overrides placement_names keyword argument. + :type placements: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param placement_names: Placements from the preset which should be used to compute recommendation. + Optional parameter if preset has just one placement. + :type placement_names: List[str] + :param preset_ids: Creates the workload placement recommendations using the presets specified by + ids. Only one preset can be specified. One of the `preset_ids` or + `preset_names` parameters are required, but they cannot be set together. + :type preset_ids: List[str] + :param preset_names: Creates the workload placement recommendations using the presets specified by + names. Only one preset can be specified. One of the `preset_ids` or + `preset_names` parameters are required, but they cannot be set together. + :type preset_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + inputs=inputs, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + placement_names=placement_names, + preset_ids=preset_ids, + preset_names=preset_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(placements, ['placement_names'], kwargs) + _process_references(presets, ['preset_ids', 'preset_names'], kwargs) + _fixup_list_type_params(['context_names', 'placement_names', 'preset_ids', 'preset_names'], kwargs) + return self._call_api('WorkloadsApi', 'api256_workloads_placement_recommendations_post_with_http_info', kwargs) + + def post_workloads( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique resource names specified. Only one value is supported.")], + workload: 'models.WorkloadPost', + presets: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + references: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + preset_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Create the resource using the preset specified by the ID. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together.")] = None, + preset_names: Annotated[Optional[conlist(StrictStr)], Field(description="Create the resource using the preset specified by name. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Create a workload + + Creates one workload. + + :param names: Performs the operation on the unique resource names specified. Only one value is + supported. (required) + :type names: List[str] + :param workload: (required) + :type workload: WorkloadPost + :param presets: A list of presets to query for. Overrides preset_ids and preset_names keyword arguments. + :type presets: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param references: A list of references to query for. Overrides names keyword argument. + :type references: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param preset_ids: Create the resource using the preset specified by the ID. Only one preset can be + specified. One of the `preset_ids` or `preset_names` parameters are + required, but they cannot be set together. + :type preset_ids: List[str] + :param preset_names: Create the resource using the preset specified by name. Only one preset can be + specified. One of the `preset_ids` or `preset_names` parameters are + required, but they cannot be set together. + :type preset_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + names=names, + workload=workload, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + preset_ids=preset_ids, + preset_names=preset_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(references, ['names'], kwargs) + _process_references(contexts, ['context_names'], kwargs) + _process_references(presets, ['preset_ids', 'preset_names'], kwargs) + _fixup_list_type_params(['names', 'context_names', 'preset_ids', 'preset_names'], kwargs) + return self._call_api('WorkloadsApi', 'api256_workloads_post_with_http_info', kwargs) + + def put_workloads_tags_batch( + self, + tag: Annotated[conlist('models.TagBatch', max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if they already exist, updated.")], + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource ID specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource name specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Update tags + + Updates or creates tags for all specified objects. + + :param tag: A list of tags to be created or, if they already exist, updated. (required) + :type tag: List[TagBatch] + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: Performs the operation on the unique resource ID specified. Only one value is + supported. The `resource_ids` or `resource_names` parameter is required, + but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: Performs the operation on the unique resource name specified. Only one value is + supported. The `resource_ids` or `resource_names` parameter is required, + but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + tag=tag, + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['tag', 'context_names', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('WorkloadsApi', 'api256_workloads_tags_batch_put_with_http_info', kwargs) + + def delete_workloads_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource ID specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource name specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """Delete tags + + Deletes specified tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names + must be an array of size 1, and the single element must be the name of an + array in the same fleet or the name of the fleet itself. If not specified, + the context will default to the array that received this request. Other + parameters provided with the request, such as names of volumes or + snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete + request. + :type namespaces: List[str] + :param resource_ids: Performs the operation on the unique resource ID specified. Only one value is + supported. The `resource_ids` or `resource_names` parameter is required, + but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: Performs the operation on the unique resource name specified. Only one value is + supported. The `resource_ids` or `resource_names` parameter is required, + but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + context_names=context_names, + keys=keys, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'keys', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('WorkloadsApi', 'api256_workloads_tags_delete_with_http_info', kwargs) + + def get_workloads_tags( + self, + resources: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + contexts: Optional[Union[ReferenceType, List[ReferenceType]]] = None, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + _preload_content: bool = True, + _return_http_data_only: Optional[bool] = None, + _request_timeout: Optional[Union[float, Tuple[float, float]]] = None + ) -> Union[ValidResponse, ErrorResponse]: + """List tags + + Displays the list of tags. + + :param resources: A list of resources to query for. Overrides resource_ids and resource_names keyword arguments. + :type resources: ReferenceType or List[ReferenceType], optional + :param contexts: A list of contexts to query for. Overrides context_names keyword argument. + :type contexts: ReferenceType or List[ReferenceType], optional + :param authorization: Deprecated. Please use Client level authorization + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are + errors. Any errors will be returned in the `errors` field of the response. + If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each + context name must be the name of an array in the same fleet or the name of + the fleet itself. If not specified, the context will default to the array + that received this request. Other parameters provided with the request, + such as names of volumes or snapshots, are resolved relative to the + provided `context`. Enter multiple names in comma-separated format. For + example, `name01,name02`. + :type context_names: List[str] + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` + parameter is required, but they cannot be set together. + :type resource_names: List[str] + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int or (float, float), optional + + :return: ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + :rtype: Union[ValidResponse, ErrorResponse] + + :raises: PureError: If calling the API fails. + :raises: ValueError: If a parameter is of an invalid type. + :raises: TypeError: If invalid or missing parameters are used. + """ # noqa: E501 + + kwargs = dict( + authorization=authorization, + x_request_id=x_request_id, + allow_errors=allow_errors, + context_names=context_names, + namespaces=namespaces, + resource_ids=resource_ids, + resource_names=resource_names, + _preload_content=_preload_content, + _return_http_data_only=_return_http_data_only, + _request_timeout=_request_timeout, + ) + kwargs = {k: v for k, v in kwargs.items() if v is not None or k in [Parameters.x_request_id, Parameters.limit]} + _process_references(contexts, ['context_names'], kwargs) + _process_references(resources, ['resource_ids', 'resource_names'], kwargs) + _fixup_list_type_params(['context_names', 'namespaces', 'resource_ids', 'resource_names'], kwargs) + return self._call_api('WorkloadsApi', 'api256_workloads_tags_get_with_http_info', kwargs) + + def _set_auth_header(self, refresh=False): + """ + Set the authorization or x-auth-token header of the internal client with the access + token. + + Args: + refresh (bool, optional): Whether to retrieve a new access token. + Defaults to False. + + Raises: + PureError: If there was an error retrieving the access token. + """ + if isinstance(self._token_man, TokenManager): + self._api_client.set_default_header(Headers.authorization, + self._token_man.get_header(refresh=refresh)) + else: + self._api_client.set_default_header(Headers.x_auth_token, + self._token_man.get_session_token(refresh=refresh)) + + def _call_api(self, api_class_name, api_function_name, kwargs): + """ + Call the API function and process the response. May call the API + repeatedly if the request failed for a reason that may not persist in + the next call. + + Args: + api_class_name (str): Swagger-generated api class to call. + api_function_name (str): Swagger-generated function to call. + kwargs (dict): kwargs to pass to the function. + + Returns: + ValidResponse: If the call was successful. + ErrorResponse: If the call was not successful. + + Raises: + PureError: If calling the API fails. + ValueError: If a parameter is of an invalid type. + TypeError: If invalid or missing parameters are used. + """ + kwargs['_request_timeout'] = self._timeout + if Parameters.x_request_id in kwargs and not kwargs[Parameters.x_request_id]: + kwargs[Parameters.x_request_id] = str(uuid.uuid4()) + + _iterator_stop_on_limit = True + if Parameters.limit in kwargs and not kwargs[Parameters.limit] and self.__auto_pagination_limit: + kwargs[Parameters.limit] = self.__auto_pagination_limit + _iterator_stop_on_limit = False + + if kwargs.get('authorization') is not None: + warnings.warn("authorization parameter is deprecated, and will be removed soon.", DeprecationWarning) + retries = self._retries + original_auth_error = None + api_function = getattr(self.__get_api_instance(api_class_name), api_function_name) + while True: + try: + response = api_function(**kwargs) + # Call was successful (200) + return self._create_valid_response(response, api_function, _iterator_stop_on_limit, kwargs) + except ApiException as error: + # If no chance for retries, return the error + if retries == 0: + return self._create_error_response(original_auth_error or error) + # If bad request, forbidden, or not found, return the error (it will never work) + elif error.status in [400, 403, 404]: + return self._create_error_response(error) + # If authentication error, reset access token and retry once + elif error.status == 401: + original_auth_error = error + retries = 1 + self._set_auth_header(refresh=True) + # If rate limit error, wait the proper time and try again + elif error.status == 429: + # If the the minute limit hit, wait that long + if (int(error.headers.get(Headers.x_ratelimit_remaining_min)) + == int(error.headers.get(Headers.x_ratelimit_min))): + time.sleep(60) + # Otherwise it was the second limit and only wait a second + time.sleep(1) + # If some internal server error we know nothing about, return + elif error.status == 500: + return self._create_error_response(error) + # If internal server errors that has to do with timeouts, try again + elif error.status > 500: + pass + # If error with the swagger client, raise the error + else: + raise PureError(error) + retries = retries - 1 + + def __get_api_instance(self, api_class): + """ + Get the API instance for the given class. + + Args: + api_class (class): Swagger-generated api class. + + Returns: + class: API instance for the given class. + """ + if api_class not in self.__apis_instances: + self.__apis_instances[api_class] = getattr(api, api_class)(self._api_client) + return self.__apis_instances[api_class] + + def _create_valid_response(self, response: ApiResponse, endpoint, iterator_stop_on_limit: bool, kwargs): + """ + Create a ValidResponse from a Swagger response. + + Args: + response (ApiResponse): + Body, status, header tuple as returned from Swagger client. + endpoint (function): + The function of the Swagger client that was called. + kwargs (dict): + The processed kwargs that were passed to the endpoint function. + + Returns: + ValidResponse + """ + body = response.data + headers = response.headers + continuation_token = getattr(body, "continuation_token", None) + total_item_count = getattr(body, "total_item_count", None) + total = getattr(body, "total", None) + more_items_remaining = getattr(body, "more_items_remaining", None) + errors = getattr(body, "errors", None) + items = None + if body is not None: + items = iter(ItemIterator(endpoint, kwargs, + continuation_token, total_item_count, + body.items, + headers.get(Headers.x_request_id, None), + more_items_remaining or False, + iterator_stop_on_limit)) + return ValidResponse(response.status_code, continuation_token, total_item_count, + items, headers, total, more_items_remaining, errors=errors) + + def _create_error_response(self, error): + """ + Create an ErrorResponse from a Swagger error. + + Args: + error (ApiException): + Error returned by Swagger client. + + Returns: + ErrorResponse + """ + status = error.status + try: + body = json.loads(error.body) + except Exception: + errors = [ApiError(None, "Response is not a valid JSON")] + return ErrorResponse(status, errors, headers=error.headers) + + if not isinstance(body, dict): + errors = [ApiError(None, "Response is not an Error object")] + return ErrorResponse(status, errors, headers=error.headers) + + if status in [403, 429]: + # Parse differently if the error message came from kong + errors = [ApiError(None, body.get(Responses.message, None), None)] + else: + errors = [ApiError(err.get(Responses.context, None), + err.get(Responses.message, None), + err.get(Responses.location_context, None)) + for err in body.get(Responses.errors, [])] + return ErrorResponse(status, errors, headers=error.headers) + + +def _process_references( + references: Optional[Union[ReferenceType, List[ReferenceType]]], + params: List[str], + kwargs: Dict[str, Any] +) -> None: + + """Process reference objects into a list of ids or names. + Removes ids and names arguments. + + :param references: The references from which to extract ids or names. + :type references: ReferenceType or List[ReferenceType], optional + + :param params: The parameters to be overridden. + :type params: List[str] + + :param kwargs: The kwargs to process. + :type kwargs: Dict[str, Any] + + :raise PureError: If a reference does not have an id or name. + + """ + if references is not None: + if not isinstance(references, list): + references = [references] + for param in params: + kwargs.pop(param, None) + all_have_id = all(ref.id is not None for ref in references) + all_have_name = all(ref.name is not None for ref in references) + id_param = [param for param in params if param.endswith("ids")] + name_param = [param for param in params if param.endswith("names")] + if all_have_id and len(id_param) > 0: + kwargs[id_param[0]] = [ref.id for ref in references] + elif all_have_name and len(name_param) > 0: + kwargs[name_param[0]] = [ref.name for ref in references] + else: + raise PureError('Invalid reference for {}'.format(", ".join(params))) + + +def _fixup_list_type_params( + params: List[str], + kwargs: Dict[str, Any] +) -> None: + + """Process object into a list if it expected to be list type. + + :param params: The parameters to be overridden. + :type params: List[str] + + :param kwargs: The kwargs to process. + :type kwargs: Dict[str, Any] + + """ + for _param in params: + _value = kwargs.get(_param, None) + if _value is not None and not isinstance(_value, list): + _param_type = type(_value).__name__.replace("'", '') + warnings.warn(f"'{_param}' parameter, invalid type: expected List[{_param_type}] but received {_param_type}, converting to list. Please revisit code.", SyntaxWarning) + kwargs[_param] = [_value] + diff --git a/pypureclient/flasharray/FA_2_56/models/__init__.py b/pypureclient/flasharray/FA_2_56/models/__init__.py new file mode 100644 index 0000000000..16805600f8 --- /dev/null +++ b/pypureclient/flasharray/FA_2_56/models/__init__.py @@ -0,0 +1,1046 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.56 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +_attribute_error_on_none = True + +class __LazyModelLoader: + def __init__(self, modname, attr): + self._modname = modname + self._attr = attr + self._mod = None + + def load(self): + import importlib + if self._mod is None: + self._mod = importlib.import_module(self._modname, package=__package__) + return getattr(self._mod, self._attr) + +__class_model_dict = { + 'ActiveDirectory': __LazyModelLoader('..._common.models.active_directory_v_2_55', 'ActiveDirectory'), + 'ActiveDirectoryGetResponse': __LazyModelLoader('..._common.models.active_directory_get_response_v_2_55', 'ActiveDirectoryGetResponse'), + 'ActiveDirectoryPatch': __LazyModelLoader('..._common.models.active_directory_patch_v_2_49', 'ActiveDirectoryPatch'), + 'ActiveDirectoryPost': __LazyModelLoader('..._common.models.active_directory_post_v_2_49', 'ActiveDirectoryPost'), + 'ActiveDirectoryResponse': __LazyModelLoader('..._common.models.active_directory_response_v_2_55', 'ActiveDirectoryResponse'), + 'Admin': __LazyModelLoader('..._common.models.admin_v_2_54', 'Admin'), + 'AdminApiToken': __LazyModelLoader('..._common.models.admin_api_token_v_2_54', 'AdminApiToken'), + 'AdminApiTokenGetResponse': __LazyModelLoader('..._common.models.admin_api_token_get_response_v_2_54', 'AdminApiTokenGetResponse'), + 'AdminApiTokenResponse': __LazyModelLoader('..._common.models.admin_api_token_response_v_2_54', 'AdminApiTokenResponse'), + 'AdminCache': __LazyModelLoader('..._common.models.admin_cache_v_2_54', 'AdminCache'), + 'AdminCacheGetResponse': __LazyModelLoader('..._common.models.admin_cache_get_response_v_2_54', 'AdminCacheGetResponse'), + 'AdminCacheResponse': __LazyModelLoader('..._common.models.admin_cache_response_v_2_54', 'AdminCacheResponse'), + 'AdminGetResponse': __LazyModelLoader('..._common.models.admin_get_response_v_2_54', 'AdminGetResponse'), + 'AdminPatch': __LazyModelLoader('..._common.models.admin_patch_v_2_54', 'AdminPatch'), + 'AdminPost': __LazyModelLoader('..._common.models.admin_post_v_2_54', 'AdminPost'), + 'AdminResponse': __LazyModelLoader('..._common.models.admin_response_v_2_54', 'AdminResponse'), + 'AdminRole': __LazyModelLoader('..._common.models.admin_role_v_2_36', 'AdminRole'), + 'AdminSettings': __LazyModelLoader('..._common.models.admin_settings_v_2_32', 'AdminSettings'), + 'AdminSettingsGetResponse': __LazyModelLoader('..._common.models.admin_settings_get_response_v_2_32', 'AdminSettingsGetResponse'), + 'AdminSettingsRequiredAuthenticationMethods': __LazyModelLoader('..._common.models.admin_settings_required_authentication_methods_v_2_32', 'AdminSettingsRequiredAuthenticationMethods'), + 'AdminSettingsResponse': __LazyModelLoader('..._common.models.admin_settings_response_v_2_32', 'AdminSettingsResponse'), + 'AggregateReplicationPerformance': __LazyModelLoader('..._common.models.aggregate_replication_performance_v_2_1', 'AggregateReplicationPerformance'), + 'Alert': __LazyModelLoader('..._common.models.alert_v_2_51', 'Alert'), + 'AlertEvent': __LazyModelLoader('..._common.models.alert_event_v_2_50', 'AlertEvent'), + 'AlertEventGetResponse': __LazyModelLoader('..._common.models.alert_event_get_response_v_2_50', 'AlertEventGetResponse'), + 'AlertEventResponse': __LazyModelLoader('..._common.models.alert_event_response_v_2_50', 'AlertEventResponse'), + 'AlertGetResponse': __LazyModelLoader('..._common.models.alert_get_response_v_2_51', 'AlertGetResponse'), + 'AlertResponse': __LazyModelLoader('..._common.models.alert_response_v_2_51', 'AlertResponse'), + 'AlertRules': __LazyModelLoader('..._common.models.alert_rules_v_2_50', 'AlertRules'), + 'AlertRulesCatalog': __LazyModelLoader('..._common.models.alert_rules_catalog_v_2_50', 'AlertRulesCatalog'), + 'AlertRulesCatalogGetResponse': __LazyModelLoader('..._common.models.alert_rules_catalog_get_response_v_2_50', 'AlertRulesCatalogGetResponse'), + 'AlertRulesCatalogResponse': __LazyModelLoader('..._common.models.alert_rules_catalog_response_v_2_50', 'AlertRulesCatalogResponse'), + 'AlertRulesGetResponse': __LazyModelLoader('..._common.models.alert_rules_get_response_v_2_50', 'AlertRulesGetResponse'), + 'AlertRulesResponse': __LazyModelLoader('..._common.models.alert_rules_response_v_2_50', 'AlertRulesResponse'), + 'AlertWatcher': __LazyModelLoader('..._common.models.alert_watcher_v_2_4', 'AlertWatcher'), + 'AlertWatcherGetResponse': __LazyModelLoader('..._common.models.alert_watcher_get_response_v_2_4', 'AlertWatcherGetResponse'), + 'AlertWatcherPatch': __LazyModelLoader('..._common.models.alert_watcher_patch_v_2_4', 'AlertWatcherPatch'), + 'AlertWatcherPost': __LazyModelLoader('..._common.models.alert_watcher_post_v_2_4', 'AlertWatcherPost'), + 'AlertWatcherResponse': __LazyModelLoader('..._common.models.alert_watcher_response_v_2_4', 'AlertWatcherResponse'), + 'ApiClient': __LazyModelLoader('..._common.models.api_client_v_2_49', 'ApiClient'), + 'ApiClientGetResponse': __LazyModelLoader('..._common.models.api_client_get_response_v_2_49', 'ApiClientGetResponse'), + 'ApiClientPatch': __LazyModelLoader('..._common.models.api_client_patch_v_2_1', 'ApiClientPatch'), + 'ApiClientPost': __LazyModelLoader('..._common.models.api_client_post_v_2_54', 'ApiClientPost'), + 'ApiClientResponse': __LazyModelLoader('..._common.models.api_client_response_v_2_49', 'ApiClientResponse'), + 'ApiToken': __LazyModelLoader('..._common.models.api_token_v_2_2', 'ApiToken'), + 'ApiVersionResponse': __LazyModelLoader('..._common.models.api_version_response_v_2_50', 'ApiVersionResponse'), + 'App': __LazyModelLoader('..._common.models.app_v_2_2', 'App'), + 'AppGetResponse': __LazyModelLoader('..._common.models.app_get_response_v_2_2', 'AppGetResponse'), + 'AppNode': __LazyModelLoader('..._common.models.app_node_v_2_49', 'AppNode'), + 'AppNodeGetResponse': __LazyModelLoader('..._common.models.app_node_get_response_v_2_49', 'AppNodeGetResponse'), + 'AppNodeResponse': __LazyModelLoader('..._common.models.app_node_response_v_2_49', 'AppNodeResponse'), + 'AppResponse': __LazyModelLoader('..._common.models.app_response_v_2_2', 'AppResponse'), + 'ArrayAvailability': __LazyModelLoader('..._common.models.array_availability_v_2_55', 'ArrayAvailability'), + 'ArrayConnection': __LazyModelLoader('..._common.models.array_connection_v_2_54', 'ArrayConnection'), + 'ArrayConnectionGetResponse': __LazyModelLoader('..._common.models.array_connection_get_response_v_2_54', 'ArrayConnectionGetResponse'), + 'ArrayConnectionKey': __LazyModelLoader('..._common.models.array_connection_key_v_2_55', 'ArrayConnectionKey'), + 'ArrayConnectionKeyGetResponse': __LazyModelLoader('..._common.models.array_connection_key_get_response_v_2_55', 'ArrayConnectionKeyGetResponse'), + 'ArrayConnectionPatch': __LazyModelLoader('..._common.models.array_connection_patch_v_2_44', 'ArrayConnectionPatch'), + 'ArrayConnectionPath': __LazyModelLoader('..._common.models.array_connection_path_v_2_54', 'ArrayConnectionPath'), + 'ArrayConnectionPathGetResponse': __LazyModelLoader('..._common.models.array_connection_path_get_response_v_2_54', 'ArrayConnectionPathGetResponse'), + 'ArrayConnectionPathResponse': __LazyModelLoader('..._common.models.array_connection_path_response_v_2_54', 'ArrayConnectionPathResponse'), + 'ArrayConnectionPost': __LazyModelLoader('..._common.models.array_connection_post_v_2_33', 'ArrayConnectionPost'), + 'ArrayConnectionResponse': __LazyModelLoader('..._common.models.array_connection_response_v_2_54', 'ArrayConnectionResponse'), + 'ArrayEncryption': __LazyModelLoader('..._common.models.array_encryption_v_2_6', 'ArrayEncryption'), + 'ArrayErasure': __LazyModelLoader('..._common.models.array_erasure_v_2_49', 'ArrayErasure'), + 'ArrayErasureGetResponse': __LazyModelLoader('..._common.models.array_erasure_get_response_v_2_49', 'ArrayErasureGetResponse'), + 'ArrayErasurePatch': __LazyModelLoader('..._common.models.array_erasure_patch_v_2_34', 'ArrayErasurePatch'), + 'ArrayErasureResponse': __LazyModelLoader('..._common.models.array_erasure_response_v_2_49', 'ArrayErasureResponse'), + 'ArrayFactoryResetToken': __LazyModelLoader('..._common.models.array_factory_reset_token_v_2_49', 'ArrayFactoryResetToken'), + 'ArrayFactoryResetTokenGetResponse': __LazyModelLoader('..._common.models.array_factory_reset_token_get_response_v_2_49', 'ArrayFactoryResetTokenGetResponse'), + 'ArrayFactoryResetTokenResponse': __LazyModelLoader('..._common.models.array_factory_reset_token_response_v_2_49', 'ArrayFactoryResetTokenResponse'), + 'ArrayGetResponse': __LazyModelLoader('..._common.models.array_get_response_v_2_54', 'ArrayGetResponse'), + 'ArrayPerformance': __LazyModelLoader('..._common.models.array_performance_v_2_52', 'ArrayPerformance'), + 'ArrayPerformanceByLink': __LazyModelLoader('..._common.models.array_performance_by_link_v_2_52', 'ArrayPerformanceByLink'), + 'ArrayPerformanceByLinkGetResponse': __LazyModelLoader('..._common.models.array_performance_by_link_get_response_v_2_52', 'ArrayPerformanceByLinkGetResponse'), + 'ArrayPerformanceByLinkResponse': __LazyModelLoader('..._common.models.array_performance_by_link_response_v_2_52', 'ArrayPerformanceByLinkResponse'), + 'ArrayPerformanceGetResponse': __LazyModelLoader('..._common.models.array_performance_get_response_v_2_52', 'ArrayPerformanceGetResponse'), + 'ArrayResponse': __LazyModelLoader('..._common.models.array_response_v_2_54', 'ArrayResponse'), + 'ArraySpace': __LazyModelLoader('..._common.models.array_space_v_2_50', 'ArraySpace'), + 'ArraySpaceGetResponse': __LazyModelLoader('..._common.models.array_space_get_response_v_2_50', 'ArraySpaceGetResponse'), + 'ArrayencryptionDataAtRest': __LazyModelLoader('..._common.models.arrayencryption_data_at_rest_v_2_6', 'ArrayencryptionDataAtRest'), + 'Arrays': __LazyModelLoader('..._common.models.arrays_v_2_54', 'Arrays'), + 'Audit': __LazyModelLoader('..._common.models.audit_v_2_51', 'Audit'), + 'AuditGetResponse': __LazyModelLoader('..._common.models.audit_get_response_v_2_51', 'AuditGetResponse'), + 'AuditResponse': __LazyModelLoader('..._common.models.audit_response_v_2_51', 'AuditResponse'), + 'BasePort': __LazyModelLoader('..._common.models.base_port_v_2_38', 'BasePort'), + 'Bucket': __LazyModelLoader('..._common.models.bucket_v_2_51', 'Bucket'), + 'BucketBase': __LazyModelLoader('..._common.models.bucket_base_v_2_51', 'BucketBase'), + 'BucketGetResponse': __LazyModelLoader('..._common.models.bucket_get_response_v_2_51', 'BucketGetResponse'), + 'BucketPatchBase': __LazyModelLoader('..._common.models.bucket_patch_base_v_2_51', 'BucketPatchBase'), + 'BucketPerformance': __LazyModelLoader('..._common.models.bucket_performance_v_2_52', 'BucketPerformance'), + 'BucketPerformanceBase': __LazyModelLoader('..._common.models.bucket_performance_base_v_2_52', 'BucketPerformanceBase'), + 'BucketPerformanceGetResponse': __LazyModelLoader('..._common.models.bucket_performance_get_response_v_2_52', 'BucketPerformanceGetResponse'), + 'BucketPostBase': __LazyModelLoader('..._common.models.bucket_post_base_v_2_54', 'BucketPostBase'), + 'BucketResponse': __LazyModelLoader('..._common.models.bucket_response_v_2_51', 'BucketResponse'), + 'BuiltIn': __LazyModelLoader('..._common.models.built_in_v_2_0', 'BuiltIn'), + 'BuiltInRelationship': __LazyModelLoader('..._common.models.built_in_relationship_v_2_2', 'BuiltInRelationship'), + 'BuiltInResourceNoId': __LazyModelLoader('..._common.models.built_in_resource_no_id_v_2_1', 'BuiltInResourceNoId'), + 'Cache': __LazyModelLoader('..._common.models.cache_v_2_51', 'Cache'), + 'CacheGetResponse': __LazyModelLoader('..._common.models.cache_get_response_v_2_51', 'CacheGetResponse'), + 'CacheSpace': __LazyModelLoader('..._common.models.cache_space_v_2_51', 'CacheSpace'), + 'Certificate': __LazyModelLoader('..._common.models.certificate_v_2_49', 'Certificate'), + 'CertificateBase': __LazyModelLoader('..._common.models.certificate_base_v_2_49', 'CertificateBase'), + 'CertificateCertificateGroupGetResponse': __LazyModelLoader('..._common.models.certificate_certificate_group_get_response_v_2_54', 'CertificateCertificateGroupGetResponse'), + 'CertificateCertificateGroupResponse': __LazyModelLoader('..._common.models.certificate_certificate_group_response_v_2_54', 'CertificateCertificateGroupResponse'), + 'CertificateGetResponse': __LazyModelLoader('..._common.models.certificate_get_response_v_2_49', 'CertificateGetResponse'), + 'CertificateGroup': __LazyModelLoader('..._common.models.certificate_group_v_2_36', 'CertificateGroup'), + 'CertificateGroupCertificateGetResponse': __LazyModelLoader('..._common.models.certificate_group_certificate_get_response_v_2_54', 'CertificateGroupCertificateGetResponse'), + 'CertificateGroupCertificateResponse': __LazyModelLoader('..._common.models.certificate_group_certificate_response_v_2_54', 'CertificateGroupCertificateResponse'), + 'CertificateGroupGetResponse': __LazyModelLoader('..._common.models.certificate_group_get_response_v_2_36', 'CertificateGroupGetResponse'), + 'CertificateGroupResponse': __LazyModelLoader('..._common.models.certificate_group_response_v_2_36', 'CertificateGroupResponse'), + 'CertificateGroupUse': __LazyModelLoader('..._common.models.certificate_group_use_v_2_49', 'CertificateGroupUse'), + 'CertificateGroupUseGetResponse': __LazyModelLoader('..._common.models.certificate_group_use_get_response_v_2_49', 'CertificateGroupUseGetResponse'), + 'CertificatePost': __LazyModelLoader('..._common.models.certificate_post_v_2_49', 'CertificatePost'), + 'CertificateResponse': __LazyModelLoader('..._common.models.certificate_response_v_2_49', 'CertificateResponse'), + 'CertificateSigningRequest': __LazyModelLoader('..._common.models.certificate_signing_request_v_2_4', 'CertificateSigningRequest'), + 'CertificateSigningRequestPost': __LazyModelLoader('..._common.models.certificate_signing_request_post_v_2_41', 'CertificateSigningRequestPost'), + 'CertificateSigningRequestResponse': __LazyModelLoader('..._common.models.certificate_signing_request_response_v_2_4', 'CertificateSigningRequestResponse'), + 'CertificateUse': __LazyModelLoader('..._common.models.certificate_use_v_2_49', 'CertificateUse'), + 'CertificateUseGetResponse': __LazyModelLoader('..._common.models.certificate_use_get_response_v_2_49', 'CertificateUseGetResponse'), + 'Chap': __LazyModelLoader('..._common.models.chap_v_2_0', 'Chap'), + 'CloudCapacityGetResponse': __LazyModelLoader('..._common.models.cloud_capacity_get_response_v_2_29', 'CloudCapacityGetResponse'), + 'CloudCapacityPatchResponse': __LazyModelLoader('..._common.models.cloud_capacity_patch_response_v_2_29', 'CloudCapacityPatchResponse'), + 'CloudCapacityStatus': __LazyModelLoader('..._common.models.cloud_capacity_status_v_2_29', 'CloudCapacityStatus'), + 'CloudCapacityStep': __LazyModelLoader('..._common.models.cloud_capacity_step_v_2_29', 'CloudCapacityStep'), + 'CloudCapacityStepsGetResponse': __LazyModelLoader('..._common.models.cloud_capacity_steps_get_response_v_2_29', 'CloudCapacityStepsGetResponse'), + 'CloudConfig': __LazyModelLoader('..._common.models.cloud_config_v_2_44', 'CloudConfig'), + 'CloudConfigAutomaticCapacityUpgrade': __LazyModelLoader('..._common.models.cloud_config_automatic_capacity_upgrade_v_2_44', 'CloudConfigAutomaticCapacityUpgrade'), + 'CloudConfigAutomaticCapacityUpgradePatch': __LazyModelLoader('..._common.models.cloud_config_automatic_capacity_upgrade_patch_v_2_44', 'CloudConfigAutomaticCapacityUpgradePatch'), + 'CloudConfigGetResponse': __LazyModelLoader('..._common.models.cloud_config_get_response_v_2_44', 'CloudConfigGetResponse'), + 'CloudConfigModel': __LazyModelLoader('..._common.models.cloud_config_model_v_2_40', 'CloudConfigModel'), + 'CloudConfigModelPatch': __LazyModelLoader('..._common.models.cloud_config_model_patch_v_2_40', 'CloudConfigModelPatch'), + 'CloudConfigPatch': __LazyModelLoader('..._common.models.cloud_config_patch_v_2_44', 'CloudConfigPatch'), + 'CloudConfigPatchResponse': __LazyModelLoader('..._common.models.cloud_config_patch_response_v_2_44', 'CloudConfigPatchResponse'), + 'CloudConfigSupported': __LazyModelLoader('..._common.models.cloud_config_supported_v_2_40', 'CloudConfigSupported'), + 'CloudConfigSupportedConfigsGetResponse': __LazyModelLoader('..._common.models.cloud_config_supported_configs_get_response_v_2_40', 'CloudConfigSupportedConfigsGetResponse'), + 'CloudProviderTag': __LazyModelLoader('..._common.models.cloud_provider_tag_v_2_6', 'CloudProviderTag'), + 'CloudProviderTagGetResponse': __LazyModelLoader('..._common.models.cloud_provider_tag_get_response_v_2_6', 'CloudProviderTagGetResponse'), + 'CloudProviderTagResponse': __LazyModelLoader('..._common.models.cloud_provider_tag_response_v_2_6', 'CloudProviderTagResponse'), + 'Connection': __LazyModelLoader('..._common.models.connection_v_2_50', 'Connection'), + 'ConnectionGetResponse': __LazyModelLoader('..._common.models.connection_get_response_v_2_50', 'ConnectionGetResponse'), + 'ConnectionPost': __LazyModelLoader('..._common.models.connection_post_v_2_49', 'ConnectionPost'), + 'ConnectionResponse': __LazyModelLoader('..._common.models.connection_response_v_2_50', 'ConnectionResponse'), + 'ContainerDefaultProtection': __LazyModelLoader('..._common.models.container_default_protection_v_2_55', 'ContainerDefaultProtection'), + 'ContainerDefaultProtectionGetResponse': __LazyModelLoader('..._common.models.container_default_protection_get_response_v_2_55', 'ContainerDefaultProtectionGetResponse'), + 'ContainerDefaultProtectionResponse': __LazyModelLoader('..._common.models.container_default_protection_response_v_2_55', 'ContainerDefaultProtectionResponse'), + 'ContainerEradicationConfig': __LazyModelLoader('..._common.models.container_eradication_config_v_2_49', 'ContainerEradicationConfig'), + 'ContainerPerformance': __LazyModelLoader('..._common.models.container_performance_v_2_52', 'ContainerPerformance'), + 'ContainerPerformanceGetResponse': __LazyModelLoader('..._common.models.container_performance_get_response_v_2_52', 'ContainerPerformanceGetResponse'), + 'ContainerPerformanceReplication': __LazyModelLoader('..._common.models.container_performance_replication_v_2_55', 'ContainerPerformanceReplication'), + 'ContainerQos': __LazyModelLoader('..._common.models.container_qos_v_2_47', 'ContainerQos'), + 'ContainerQosBandwidthLimitPatch': __LazyModelLoader('..._common.models.container_qos_bandwidth_limit_patch_v_2_52', 'ContainerQosBandwidthLimitPatch'), + 'ContainerQosCeilings': __LazyModelLoader('..._common.models.container_qos_ceilings_v_2_47', 'ContainerQosCeilings'), + 'ContainerQosCeilingsBandwidthLimitPatch': __LazyModelLoader('..._common.models.container_qos_ceilings_bandwidth_limit_patch_v_2_54', 'ContainerQosCeilingsBandwidthLimitPatch'), + 'ContainerQosCeilingsIopsLimitPatch': __LazyModelLoader('..._common.models.container_qos_ceilings_iops_limit_patch_v_2_54', 'ContainerQosCeilingsIopsLimitPatch'), + 'ContainerQosCeilingsPatch': __LazyModelLoader('..._common.models.container_qos_ceilings_patch_v_2_54', 'ContainerQosCeilingsPatch'), + 'ContainerQosFileCeilings': __LazyModelLoader('..._common.models.container_qos_file_ceilings_v_2_54', 'ContainerQosFileCeilings'), + 'ContainerQosIopsLimitPatch': __LazyModelLoader('..._common.models.container_qos_iops_limit_patch_v_2_52', 'ContainerQosIopsLimitPatch'), + 'ContainerQosPatch': __LazyModelLoader('..._common.models.container_qos_patch_v_2_54', 'ContainerQosPatch'), + 'Context': __LazyModelLoader('..._common.models.context_v_2_50', 'Context'), + 'Controller': __LazyModelLoader('..._common.models.controller_v_2_30', 'Controller'), + 'ControllerGetResponse': __LazyModelLoader('..._common.models.controller_get_response_v_2_30', 'ControllerGetResponse'), + 'DataSealingKey': __LazyModelLoader('..._common.models.data_sealing_key_v_2_55', 'DataSealingKey'), + 'DataSealingKeyGetResponse': __LazyModelLoader('..._common.models.data_sealing_key_get_response_v_2_55', 'DataSealingKeyGetResponse'), + 'DataSealingKeyPatch': __LazyModelLoader('..._common.models.data_sealing_key_patch_v_2_55', 'DataSealingKeyPatch'), + 'DataSealingKeyPost': __LazyModelLoader('..._common.models.data_sealing_key_post_v_2_55', 'DataSealingKeyPost'), + 'DataSealingKeyResponse': __LazyModelLoader('..._common.models.data_sealing_key_response_v_2_55', 'DataSealingKeyResponse'), + 'DataSealingKeyRotate': __LazyModelLoader('..._common.models.data_sealing_key_rotate_v_2_55', 'DataSealingKeyRotate'), + 'DefaultProtectionReference': __LazyModelLoader('..._common.models.default_protection_reference_v_2_49', 'DefaultProtectionReference'), + 'DestroyedPatchPost': __LazyModelLoader('..._common.models.destroyed_patch_post_v_2_0', 'DestroyedPatchPost'), + 'DirectoriesGroupsGetResponse': __LazyModelLoader('..._common.models.directories_groups_get_response_v_2_50', 'DirectoriesGroupsGetResponse'), + 'DirectoriesGroupsResponse': __LazyModelLoader('..._common.models.directories_groups_response_v_2_50', 'DirectoriesGroupsResponse'), + 'DirectoriesPerformanceByArray': __LazyModelLoader('..._common.models.directories_performance_by_array_v_2_55', 'DirectoriesPerformanceByArray'), + 'DirectoriesPerformanceByArrayGetResponse': __LazyModelLoader('..._common.models.directories_performance_by_array_get_response_v_2_55', 'DirectoriesPerformanceByArrayGetResponse'), + 'DirectoriesUsersGetResponse': __LazyModelLoader('..._common.models.directories_users_get_response_v_2_50', 'DirectoriesUsersGetResponse'), + 'DirectoriesUsersResponse': __LazyModelLoader('..._common.models.directories_users_response_v_2_50', 'DirectoriesUsersResponse'), + 'Directory': __LazyModelLoader('..._common.models.directory_v_2_55', 'Directory'), + 'DirectoryExport': __LazyModelLoader('..._common.models.directory_export_v_2_55', 'DirectoryExport'), + 'DirectoryExportGetResponse': __LazyModelLoader('..._common.models.directory_export_get_response_v_2_55', 'DirectoryExportGetResponse'), + 'DirectoryExportPatch': __LazyModelLoader('..._common.models.directory_export_patch_v_2_32', 'DirectoryExportPatch'), + 'DirectoryExportPost': __LazyModelLoader('..._common.models.directory_export_post_v_2_49', 'DirectoryExportPost'), + 'DirectoryExportResponse': __LazyModelLoader('..._common.models.directory_export_response_v_2_55', 'DirectoryExportResponse'), + 'DirectoryGetResponse': __LazyModelLoader('..._common.models.directory_get_response_v_2_55', 'DirectoryGetResponse'), + 'DirectoryGroup': __LazyModelLoader('..._common.models.directory_group_v_2_50', 'DirectoryGroup'), + 'DirectoryGroupQuota': __LazyModelLoader('..._common.models.directory_group_quota_v_2_50', 'DirectoryGroupQuota'), + 'DirectoryGroupQuotasGetResponse': __LazyModelLoader('..._common.models.directory_group_quotas_get_response_v_2_50', 'DirectoryGroupQuotasGetResponse'), + 'DirectoryGroupQuotasResponse': __LazyModelLoader('..._common.models.directory_group_quotas_response_v_2_50', 'DirectoryGroupQuotasResponse'), + 'DirectoryLockNlmReclamation': __LazyModelLoader('..._common.models.directory_lock_nlm_reclamation_v_2_50', 'DirectoryLockNlmReclamation'), + 'DirectoryLockNlmReclamationResponse': __LazyModelLoader('..._common.models.directory_lock_nlm_reclamation_response_v_2_50', 'DirectoryLockNlmReclamationResponse'), + 'DirectoryPatch': __LazyModelLoader('..._common.models.directory_patch_v_2_55', 'DirectoryPatch'), + 'DirectoryPerformance': __LazyModelLoader('..._common.models.directory_performance_v_2_55', 'DirectoryPerformance'), + 'DirectoryPerformanceGetResponse': __LazyModelLoader('..._common.models.directory_performance_get_response_v_2_55', 'DirectoryPerformanceGetResponse'), + 'DirectoryPolicyExportPost': __LazyModelLoader('..._common.models.directory_policy_export_post_v_2_49', 'DirectoryPolicyExportPost'), + 'DirectoryPolicyPost': __LazyModelLoader('..._common.models.directory_policy_post_v_2_49', 'DirectoryPolicyPost'), + 'DirectoryPost': __LazyModelLoader('..._common.models.directory_post_v_2_55', 'DirectoryPost'), + 'DirectoryQosGetResponse': __LazyModelLoader('..._common.models.directory_qos_get_response_v_2_54', 'DirectoryQosGetResponse'), + 'DirectoryQuota': __LazyModelLoader('..._common.models.directory_quota_v_2_50', 'DirectoryQuota'), + 'DirectoryQuotasGetResponse': __LazyModelLoader('..._common.models.directory_quotas_get_response_v_2_50', 'DirectoryQuotasGetResponse'), + 'DirectoryQuotasResponse': __LazyModelLoader('..._common.models.directory_quotas_response_v_2_50', 'DirectoryQuotasResponse'), + 'DirectoryResponse': __LazyModelLoader('..._common.models.directory_response_v_2_55', 'DirectoryResponse'), + 'DirectoryService': __LazyModelLoader('..._common.models.directory_service_v_2_55', 'DirectoryService'), + 'DirectoryServiceCommon': __LazyModelLoader('..._common.models.directory_service_common_v_2_50', 'DirectoryServiceCommon'), + 'DirectoryServiceGetResponse': __LazyModelLoader('..._common.models.directory_service_get_response_v_2_55', 'DirectoryServiceGetResponse'), + 'DirectoryServiceManagement': __LazyModelLoader('..._common.models.directory_service_management_v_2_32', 'DirectoryServiceManagement'), + 'DirectoryServicePatch': __LazyModelLoader('..._common.models.directory_service_patch_v_2_54', 'DirectoryServicePatch'), + 'DirectoryServicePost': __LazyModelLoader('..._common.models.directory_service_post_v_2_50', 'DirectoryServicePost'), + 'DirectoryServiceResponse': __LazyModelLoader('..._common.models.directory_service_response_v_2_55', 'DirectoryServiceResponse'), + 'DirectoryServiceRole': __LazyModelLoader('..._common.models.directory_service_role_v_2_50', 'DirectoryServiceRole'), + 'DirectoryServiceRoleGetResponse': __LazyModelLoader('..._common.models.directory_service_role_get_response_v_2_50', 'DirectoryServiceRoleGetResponse'), + 'DirectoryServiceRolePost': __LazyModelLoader('..._common.models.directory_service_role_post_v_2_54', 'DirectoryServiceRolePost'), + 'DirectoryServiceRoleResponse': __LazyModelLoader('..._common.models.directory_service_role_response_v_2_50', 'DirectoryServiceRoleResponse'), + 'DirectorySnapshot': __LazyModelLoader('..._common.models.directory_snapshot_v_2_50', 'DirectorySnapshot'), + 'DirectorySnapshotEradicationConfig': __LazyModelLoader('..._common.models.directory_snapshot_eradication_config_v_2_49', 'DirectorySnapshotEradicationConfig'), + 'DirectorySnapshotGetResponse': __LazyModelLoader('..._common.models.directory_snapshot_get_response_v_2_50', 'DirectorySnapshotGetResponse'), + 'DirectorySnapshotPatch': __LazyModelLoader('..._common.models.directory_snapshot_patch_v_2_49', 'DirectorySnapshotPatch'), + 'DirectorySnapshotPost': __LazyModelLoader('..._common.models.directory_snapshot_post_v_2_4', 'DirectorySnapshotPost'), + 'DirectorySnapshotResponse': __LazyModelLoader('..._common.models.directory_snapshot_response_v_2_50', 'DirectorySnapshotResponse'), + 'DirectoryUser': __LazyModelLoader('..._common.models.directory_user_v_2_50', 'DirectoryUser'), + 'DirectoryUserQuota': __LazyModelLoader('..._common.models.directory_user_quota_v_2_50', 'DirectoryUserQuota'), + 'DirectoryUserQuotaRule': __LazyModelLoader('..._common.models.directory_user_quota_rule_v_2_49', 'DirectoryUserQuotaRule'), + 'DirectoryUserQuotasGetResponse': __LazyModelLoader('..._common.models.directory_user_quotas_get_response_v_2_50', 'DirectoryUserQuotasGetResponse'), + 'DirectoryUserQuotasResponse': __LazyModelLoader('..._common.models.directory_user_quotas_response_v_2_50', 'DirectoryUserQuotasResponse'), + 'DirectorypolicyexportpostPolicies': __LazyModelLoader('..._common.models.directorypolicyexportpost_policies_v_2_49', 'DirectorypolicyexportpostPolicies'), + 'DirectorypolicypostPolicies': __LazyModelLoader('..._common.models.directorypolicypost_policies_v_2_49', 'DirectorypolicypostPolicies'), + 'Dns': __LazyModelLoader('..._common.models.dns_v_2_55', 'Dns'), + 'DnsGetResponse': __LazyModelLoader('..._common.models.dns_get_response_v_2_55', 'DnsGetResponse'), + 'DnsPatch': __LazyModelLoader('..._common.models.dns_patch_v_2_54', 'DnsPatch'), + 'DnsPost': __LazyModelLoader('..._common.models.dns_post_v_2_54', 'DnsPost'), + 'DnsResponse': __LazyModelLoader('..._common.models.dns_response_v_2_55', 'DnsResponse'), + 'Drive': __LazyModelLoader('..._common.models.drive_v_2_42', 'Drive'), + 'DriveGetResponse': __LazyModelLoader('..._common.models.drive_get_response_v_2_42', 'DriveGetResponse'), + 'DriveResponse': __LazyModelLoader('..._common.models.drive_response_v_2_42', 'DriveResponse'), + 'EradicationConfig': __LazyModelLoader('..._common.models.eradication_config_v_2_26', 'EradicationConfig'), + 'ErrorContextResponse': __LazyModelLoader('..._common.models.error_context_response_v_2_49', 'ErrorContextResponse'), + 'ErrorcontextresponseErrors': __LazyModelLoader('..._common.models.errorcontextresponse_errors_v_2_49', 'ErrorcontextresponseErrors'), + 'Eula': __LazyModelLoader('..._common.models.eula_v_2_30', 'Eula'), + 'EulaGetResponse': __LazyModelLoader('..._common.models.eula_get_response_v_2_30', 'EulaGetResponse'), + 'EulaResponse': __LazyModelLoader('..._common.models.eula_response_v_2_30', 'EulaResponse'), + 'EulaSignature': __LazyModelLoader('..._common.models.eula_signature_v_2_30', 'EulaSignature'), + 'ExportPolicyAttachmentMixin': __LazyModelLoader('..._common.models.export_policy_attachment_mixin_v_2_32', 'ExportPolicyAttachmentMixin'), + 'FilePost': __LazyModelLoader('..._common.models.file_post_v_2_54', 'FilePost'), + 'FileSystem': __LazyModelLoader('..._common.models.file_system_v_2_55', 'FileSystem'), + 'FileSystemGetResponse': __LazyModelLoader('..._common.models.file_system_get_response_v_2_55', 'FileSystemGetResponse'), + 'FileSystemPatch': __LazyModelLoader('..._common.models.file_system_patch_v_2_55', 'FileSystemPatch'), + 'FileSystemPost': __LazyModelLoader('..._common.models.file_system_post_v_2_55', 'FileSystemPost'), + 'FileSystemResponse': __LazyModelLoader('..._common.models.file_system_response_v_2_55', 'FileSystemResponse'), + 'FixedNameResourceNoId': __LazyModelLoader('..._common.models.fixed_name_resource_no_id_v_2_2', 'FixedNameResourceNoId'), + 'FixedReference': __LazyModelLoader('..._common.models.fixed_reference_v_2_49', 'FixedReference'), + 'FixedReferenceNoId': __LazyModelLoader('..._common.models.fixed_reference_no_id_v_2_0', 'FixedReferenceNoId'), + 'FixedReferenceWithType': __LazyModelLoader('..._common.models.fixed_reference_with_type_v_2_49', 'FixedReferenceWithType'), + 'FixedReferenceWithTypeAndLocation': __LazyModelLoader('..._common.models.fixed_reference_with_type_and_location_v_2_49', 'FixedReferenceWithTypeAndLocation'), + 'FixedReferenceWithoutId': __LazyModelLoader('..._common.models.fixed_reference_without_id_v_2_56', 'FixedReferenceWithoutId'), + 'Fleet': __LazyModelLoader('..._common.models.fleet_v_2_49', 'Fleet'), + 'FleetGetResponse': __LazyModelLoader('..._common.models.fleet_get_response_v_2_49', 'FleetGetResponse'), + 'FleetKey': __LazyModelLoader('..._common.models.fleet_key_v_2_36', 'FleetKey'), + 'FleetKeyGetResponse': __LazyModelLoader('..._common.models.fleet_key_get_response_v_2_36', 'FleetKeyGetResponse'), + 'FleetKeyResponse': __LazyModelLoader('..._common.models.fleet_key_response_v_2_36', 'FleetKeyResponse'), + 'FleetMember': __LazyModelLoader('..._common.models.fleet_member_v_2_49', 'FleetMember'), + 'FleetMemberGetResponse': __LazyModelLoader('..._common.models.fleet_member_get_response_v_2_49', 'FleetMemberGetResponse'), + 'FleetMemberPost': __LazyModelLoader('..._common.models.fleet_member_post_v_2_49', 'FleetMemberPost'), + 'FleetMemberResponse': __LazyModelLoader('..._common.models.fleet_member_response_v_2_49', 'FleetMemberResponse'), + 'FleetPatch': __LazyModelLoader('..._common.models.fleet_patch_v_2_38', 'FleetPatch'), + 'FleetResponse': __LazyModelLoader('..._common.models.fleet_response_v_2_49', 'FleetResponse'), + 'FleetmemberpostMember': __LazyModelLoader('..._common.models.fleetmemberpost_member_v_2_49', 'FleetmemberpostMember'), + 'FleetmemberpostMembers': __LazyModelLoader('..._common.models.fleetmemberpost_members_v_2_49', 'FleetmemberpostMembers'), + 'Hardware': __LazyModelLoader('..._common.models.hardware_v_2_51', 'Hardware'), + 'HardwareGetResponse': __LazyModelLoader('..._common.models.hardware_get_response_v_2_51', 'HardwareGetResponse'), + 'HardwarePatch': __LazyModelLoader('..._common.models.hardware_patch_v_2_2', 'HardwarePatch'), + 'HardwareResponse': __LazyModelLoader('..._common.models.hardware_response_v_2_51', 'HardwareResponse'), + 'Host': __LazyModelLoader('..._common.models.host_v_2_52', 'Host'), + 'HostGetResponse': __LazyModelLoader('..._common.models.host_get_response_v_2_52', 'HostGetResponse'), + 'HostGroup': __LazyModelLoader('..._common.models.host_group_v_2_50', 'HostGroup'), + 'HostGroupGetResponse': __LazyModelLoader('..._common.models.host_group_get_response_v_2_50', 'HostGroupGetResponse'), + 'HostGroupPatch': __LazyModelLoader('..._common.models.host_group_patch_v_2_54', 'HostGroupPatch'), + 'HostGroupPost': __LazyModelLoader('..._common.models.host_group_post_v_2_50', 'HostGroupPost'), + 'HostGroupQosGetResponse': __LazyModelLoader('..._common.models.host_group_qos_get_response_v_2_50', 'HostGroupQosGetResponse'), + 'HostGroupResponse': __LazyModelLoader('..._common.models.host_group_response_v_2_50', 'HostGroupResponse'), + 'HostPatch': __LazyModelLoader('..._common.models.host_patch_v_2_54', 'HostPatch'), + 'HostPerformanceBalance': __LazyModelLoader('..._common.models.host_performance_balance_v_2_50', 'HostPerformanceBalance'), + 'HostPerformanceBalanceGetResponse': __LazyModelLoader('..._common.models.host_performance_balance_get_response_v_2_50', 'HostPerformanceBalanceGetResponse'), + 'HostPortConnectivity': __LazyModelLoader('..._common.models.host_port_connectivity_v_2_0', 'HostPortConnectivity'), + 'HostPost': __LazyModelLoader('..._common.models.host_post_v_2_52', 'HostPost'), + 'HostQosGetResponse': __LazyModelLoader('..._common.models.host_qos_get_response_v_2_50', 'HostQosGetResponse'), + 'HostResponse': __LazyModelLoader('..._common.models.host_response_v_2_52', 'HostResponse'), + 'Kmip': __LazyModelLoader('..._common.models.kmip_v_2_24', 'Kmip'), + 'KmipCertificate': __LazyModelLoader('..._common.models.kmip_certificate_v_2_24', 'KmipCertificate'), + 'KmipGetResponse': __LazyModelLoader('..._common.models.kmip_get_response_v_2_24', 'KmipGetResponse'), + 'KmipObject': __LazyModelLoader('..._common.models.kmip_object_v_2_24', 'KmipObject'), + 'KmipPatch': __LazyModelLoader('..._common.models.kmip_patch_v_2_2', 'KmipPatch'), + 'KmipPost': __LazyModelLoader('..._common.models.kmip_post_v_2_2', 'KmipPost'), + 'KmipResponse': __LazyModelLoader('..._common.models.kmip_response_v_2_24', 'KmipResponse'), + 'KmipTestResult': __LazyModelLoader('..._common.models.kmip_test_result_v_2_2', 'KmipTestResult'), + 'KmipTestResultGetResponse': __LazyModelLoader('..._common.models.kmip_test_result_get_response_v_2_2', 'KmipTestResultGetResponse'), + 'LifecycleRule': __LazyModelLoader('..._common.models.lifecycle_rule_v_2_51', 'LifecycleRule'), + 'LifecycleRuleBase': __LazyModelLoader('..._common.models.lifecycle_rule_base_v_2_51', 'LifecycleRuleBase'), + 'LifecycleRuleConfigBase': __LazyModelLoader('..._common.models.lifecycle_rule_config_base_v_2_51', 'LifecycleRuleConfigBase'), + 'LifecycleRuleGetResponse': __LazyModelLoader('..._common.models.lifecycle_rule_get_response_v_2_51', 'LifecycleRuleGetResponse'), + 'LifecycleRulePatchBase': __LazyModelLoader('..._common.models.lifecycle_rule_patch_base_v_2_51', 'LifecycleRulePatchBase'), + 'LifecycleRulePostBase': __LazyModelLoader('..._common.models.lifecycle_rule_post_base_v_2_54', 'LifecycleRulePostBase'), + 'LifecycleRuleResponse': __LazyModelLoader('..._common.models.lifecycle_rule_response_v_2_51', 'LifecycleRuleResponse'), + 'LimitedBy': __LazyModelLoader('..._common.models.limited_by_v_2_49', 'LimitedBy'), + 'LocalDirectoryService': __LazyModelLoader('..._common.models.local_directory_service_v_2_55', 'LocalDirectoryService'), + 'LocalDirectoryServiceGetResponse': __LazyModelLoader('..._common.models.local_directory_service_get_response_v_2_55', 'LocalDirectoryServiceGetResponse'), + 'LocalDirectoryServicePost': __LazyModelLoader('..._common.models.local_directory_service_post_v_2_44', 'LocalDirectoryServicePost'), + 'LocalDirectoryServiceReference': __LazyModelLoader('..._common.models.local_directory_service_reference_v_2_49', 'LocalDirectoryServiceReference'), + 'LocalDirectoryServiceResponse': __LazyModelLoader('..._common.models.local_directory_service_response_v_2_55', 'LocalDirectoryServiceResponse'), + 'LocalGroup': __LazyModelLoader('..._common.models.local_group_v_2_55', 'LocalGroup'), + 'LocalGroupGetResponse': __LazyModelLoader('..._common.models.local_group_get_response_v_2_55', 'LocalGroupGetResponse'), + 'LocalGroupMembershipPost': __LazyModelLoader('..._common.models.local_group_membership_post_v_2_54', 'LocalGroupMembershipPost'), + 'LocalGroupPatch': __LazyModelLoader('..._common.models.local_group_patch_v_2_50', 'LocalGroupPatch'), + 'LocalGroupPost': __LazyModelLoader('..._common.models.local_group_post_v_2_21', 'LocalGroupPost'), + 'LocalGroupResponse': __LazyModelLoader('..._common.models.local_group_response_v_2_55', 'LocalGroupResponse'), + 'LocalMember': __LazyModelLoader('..._common.models.local_member_v_2_55', 'LocalMember'), + 'LocalMembershipGetResponse': __LazyModelLoader('..._common.models.local_membership_get_response_v_2_55', 'LocalMembershipGetResponse'), + 'LocalMembershipResponse': __LazyModelLoader('..._common.models.local_membership_response_v_2_55', 'LocalMembershipResponse'), + 'LocalUser': __LazyModelLoader('..._common.models.local_user_v_2_55', 'LocalUser'), + 'LocalUserGetResponse': __LazyModelLoader('..._common.models.local_user_get_response_v_2_55', 'LocalUserGetResponse'), + 'LocalUserMembershipPost': __LazyModelLoader('..._common.models.local_user_membership_post_v_2_54', 'LocalUserMembershipPost'), + 'LocalUserPatch': __LazyModelLoader('..._common.models.local_user_patch_v_2_54', 'LocalUserPatch'), + 'LocalUserPost': __LazyModelLoader('..._common.models.local_user_post_v_2_54', 'LocalUserPost'), + 'LocalUserResponse': __LazyModelLoader('..._common.models.local_user_response_v_2_55', 'LocalUserResponse'), + 'LocalgroupmembershippostMembers': __LazyModelLoader('..._common.models.localgroupmembershippost_members_v_2_54', 'LocalgroupmembershippostMembers'), + 'LocalusermembershippostGroups': __LazyModelLoader('..._common.models.localusermembershippost_groups_v_2_54', 'LocalusermembershippostGroups'), + 'LogTarget': __LazyModelLoader('..._common.models.log_target_v_2_50', 'LogTarget'), + 'LogTargetFile': __LazyModelLoader('..._common.models.log_target_file_v_2_54', 'LogTargetFile'), + 'LogTargetFileGetResponse': __LazyModelLoader('..._common.models.log_target_file_get_response_v_2_54', 'LogTargetFileGetResponse'), + 'LogTargetFileResponse': __LazyModelLoader('..._common.models.log_target_file_response_v_2_54', 'LogTargetFileResponse'), + 'LogTargetsGetResponse': __LazyModelLoader('..._common.models.log_targets_get_response_v_2_50', 'LogTargetsGetResponse'), + 'LogTargetsResponse': __LazyModelLoader('..._common.models.log_targets_response_v_2_50', 'LogTargetsResponse'), + 'LoginPost': __LazyModelLoader('..._common.models.login_post_v_2_47', 'LoginPost'), + 'MaintenanceWindow': __LazyModelLoader('..._common.models.maintenance_window_v_2_2', 'MaintenanceWindow'), + 'MaintenanceWindowPost': __LazyModelLoader('..._common.models.maintenance_window_post_v_2_2', 'MaintenanceWindowPost'), + 'MaintenanceWindowsGetResponse': __LazyModelLoader('..._common.models.maintenance_windows_get_response_v_2_2', 'MaintenanceWindowsGetResponse'), + 'MaintenanceWindowsResponse': __LazyModelLoader('..._common.models.maintenance_windows_response_v_2_2', 'MaintenanceWindowsResponse'), + 'MappingPolicy': __LazyModelLoader('..._common.models.mapping_policy_v_2_54', 'MappingPolicy'), + 'MappingPolicyPatch': __LazyModelLoader('..._common.models.mapping_policy_patch_v_2_32', 'MappingPolicyPatch'), + 'Member': __LazyModelLoader('..._common.models.member_v_2_50', 'Member'), + 'MemberGetResponse': __LazyModelLoader('..._common.models.member_get_response_v_2_50', 'MemberGetResponse'), + 'MemberNoIdAll': __LazyModelLoader('..._common.models.member_no_id_all_v_2_50', 'MemberNoIdAll'), + 'MemberNoIdAllGetResponse': __LazyModelLoader('..._common.models.member_no_id_all_get_response_v_2_50', 'MemberNoIdAllGetResponse'), + 'MemberNoIdAllResponse': __LazyModelLoader('..._common.models.member_no_id_all_response_v_2_50', 'MemberNoIdAllResponse'), + 'MemberNoIdMember': __LazyModelLoader('..._common.models.member_no_id_member_v_2_50', 'MemberNoIdMember'), + 'MemberNoIdMemberGetResponse': __LazyModelLoader('..._common.models.member_no_id_member_get_response_v_2_50', 'MemberNoIdMemberGetResponse'), + 'MemberNoIdMemberResponse': __LazyModelLoader('..._common.models.member_no_id_member_response_v_2_50', 'MemberNoIdMemberResponse'), + 'MemberResponse': __LazyModelLoader('..._common.models.member_response_v_2_50', 'MemberResponse'), + 'MemberWithType': __LazyModelLoader('..._common.models.member_with_type_v_2_54', 'MemberWithType'), + 'NamingPattern': __LazyModelLoader('..._common.models.naming_pattern_v_2_51', 'NamingPattern'), + 'NetworkInterface': __LazyModelLoader('..._common.models.network_interface_v_2_55', 'NetworkInterface'), + 'NetworkInterfaceEth': __LazyModelLoader('..._common.models.network_interface_eth_v_2_55', 'NetworkInterfaceEth'), + 'NetworkInterfaceFc': __LazyModelLoader('..._common.models.network_interface_fc_v_2_4', 'NetworkInterfaceFc'), + 'NetworkInterfaceGetResponse': __LazyModelLoader('..._common.models.network_interface_get_response_v_2_55', 'NetworkInterfaceGetResponse'), + 'NetworkInterfaceNeighbor': __LazyModelLoader('..._common.models.network_interface_neighbor_v_2_22', 'NetworkInterfaceNeighbor'), + 'NetworkInterfaceNeighborCapability': __LazyModelLoader('..._common.models.network_interface_neighbor_capability_v_2_22', 'NetworkInterfaceNeighborCapability'), + 'NetworkInterfaceNeighborGetResponse': __LazyModelLoader('..._common.models.network_interface_neighbor_get_response_v_2_22', 'NetworkInterfaceNeighborGetResponse'), + 'NetworkInterfaceNeighborNeighborChassis': __LazyModelLoader('..._common.models.network_interface_neighbor_neighbor_chassis_v_2_22', 'NetworkInterfaceNeighborNeighborChassis'), + 'NetworkInterfaceNeighborNeighborChassisId': __LazyModelLoader('..._common.models.network_interface_neighbor_neighbor_chassis_id_v_2_22', 'NetworkInterfaceNeighborNeighborChassisId'), + 'NetworkInterfaceNeighborNeighborPort': __LazyModelLoader('..._common.models.network_interface_neighbor_neighbor_port_v_2_22', 'NetworkInterfaceNeighborNeighborPort'), + 'NetworkInterfaceNeighborNeighborPortId': __LazyModelLoader('..._common.models.network_interface_neighbor_neighbor_port_id_v_2_22', 'NetworkInterfaceNeighborNeighborPortId'), + 'NetworkInterfaceNeighborResponse': __LazyModelLoader('..._common.models.network_interface_neighbor_response_v_2_22', 'NetworkInterfaceNeighborResponse'), + 'NetworkInterfacePatch': __LazyModelLoader('..._common.models.network_interface_patch_v_2_55', 'NetworkInterfacePatch'), + 'NetworkInterfacePerformance': __LazyModelLoader('..._common.models.network_interface_performance_v_2_36', 'NetworkInterfacePerformance'), + 'NetworkInterfacePerformanceEth': __LazyModelLoader('..._common.models.network_interface_performance_eth_v_2_36', 'NetworkInterfacePerformanceEth'), + 'NetworkInterfacePerformanceFc': __LazyModelLoader('..._common.models.network_interface_performance_fc_v_2_4', 'NetworkInterfacePerformanceFc'), + 'NetworkInterfacePerformanceGetResponse': __LazyModelLoader('..._common.models.network_interface_performance_get_response_v_2_36', 'NetworkInterfacePerformanceGetResponse'), + 'NetworkInterfacePortDetailsRxLos': __LazyModelLoader('..._common.models.network_interface_port_details_rx_los_v_2_16', 'NetworkInterfacePortDetailsRxLos'), + 'NetworkInterfacePortDetailsRxPower': __LazyModelLoader('..._common.models.network_interface_port_details_rx_power_v_2_16', 'NetworkInterfacePortDetailsRxPower'), + 'NetworkInterfacePortDetailsStatic': __LazyModelLoader('..._common.models.network_interface_port_details_static_v_2_16', 'NetworkInterfacePortDetailsStatic'), + 'NetworkInterfacePortDetailsStaticRxPowerThresholds': __LazyModelLoader('..._common.models.network_interface_port_details_static_rx_power_thresholds_v_2_16', 'NetworkInterfacePortDetailsStaticRxPowerThresholds'), + 'NetworkInterfacePortDetailsStaticTemperatureThresholds': __LazyModelLoader('..._common.models.network_interface_port_details_static_temperature_thresholds_v_2_16', 'NetworkInterfacePortDetailsStaticTemperatureThresholds'), + 'NetworkInterfacePortDetailsStaticTxBiasThresholds': __LazyModelLoader('..._common.models.network_interface_port_details_static_tx_bias_thresholds_v_2_16', 'NetworkInterfacePortDetailsStaticTxBiasThresholds'), + 'NetworkInterfacePortDetailsStaticTxPowerThresholds': __LazyModelLoader('..._common.models.network_interface_port_details_static_tx_power_thresholds_v_2_16', 'NetworkInterfacePortDetailsStaticTxPowerThresholds'), + 'NetworkInterfacePortDetailsStaticVoltageThresholds': __LazyModelLoader('..._common.models.network_interface_port_details_static_voltage_thresholds_v_2_16', 'NetworkInterfacePortDetailsStaticVoltageThresholds'), + 'NetworkInterfacePortDetailsTemperature': __LazyModelLoader('..._common.models.network_interface_port_details_temperature_v_2_16', 'NetworkInterfacePortDetailsTemperature'), + 'NetworkInterfacePortDetailsTxBias': __LazyModelLoader('..._common.models.network_interface_port_details_tx_bias_v_2_16', 'NetworkInterfacePortDetailsTxBias'), + 'NetworkInterfacePortDetailsTxFault': __LazyModelLoader('..._common.models.network_interface_port_details_tx_fault_v_2_16', 'NetworkInterfacePortDetailsTxFault'), + 'NetworkInterfacePortDetailsTxPower': __LazyModelLoader('..._common.models.network_interface_port_details_tx_power_v_2_16', 'NetworkInterfacePortDetailsTxPower'), + 'NetworkInterfacePortDetailsVoltage': __LazyModelLoader('..._common.models.network_interface_port_details_voltage_v_2_16', 'NetworkInterfacePortDetailsVoltage'), + 'NetworkInterfacePost': __LazyModelLoader('..._common.models.network_interface_post_v_2_55', 'NetworkInterfacePost'), + 'NetworkInterfaceResponse': __LazyModelLoader('..._common.models.network_interface_response_v_2_55', 'NetworkInterfaceResponse'), + 'NetworkInterfacesPortDetails': __LazyModelLoader('..._common.models.network_interfaces_port_details_v_2_16', 'NetworkInterfacesPortDetails'), + 'NetworkInterfacesPortDetailsGetResponse': __LazyModelLoader('..._common.models.network_interfaces_port_details_get_response_v_2_16', 'NetworkInterfacesPortDetailsGetResponse'), + 'NetworkInterfacesPortDetailsResponse': __LazyModelLoader('..._common.models.network_interfaces_port_details_response_v_2_16', 'NetworkInterfacesPortDetailsResponse'), + 'NetworkinterfacepatchEth': __LazyModelLoader('..._common.models.networkinterfacepatch_eth_v_2_55', 'NetworkinterfacepatchEth'), + 'NetworkinterfacepostEth': __LazyModelLoader('..._common.models.networkinterfacepost_eth_v_2_55', 'NetworkinterfacepostEth'), + 'NewFqname': __LazyModelLoader('..._common.models.new_fqname_v_2_44', 'NewFqname'), + 'NewName': __LazyModelLoader('..._common.models.new_name_v_2_0', 'NewName'), + 'NonCopyableTag': __LazyModelLoader('..._common.models.non_copyable_tag_v_2_49', 'NonCopyableTag'), + 'NonCopyableTagBatch': __LazyModelLoader('..._common.models.non_copyable_tag_batch_v_2_49', 'NonCopyableTagBatch'), + 'Oauth210TokenPost400Response': __LazyModelLoader('..._common.models.oauth210_token_post400_response_v_2_0', 'Oauth210TokenPost400Response'), + 'Oauth210TokenPost401Response': __LazyModelLoader('..._common.models.oauth210_token_post401_response_v_2_0', 'Oauth210TokenPost401Response'), + 'OauthTokenResponse': __LazyModelLoader('..._common.models.oauth_token_response_v_2_0', 'OauthTokenResponse'), + 'ObjectStoreAccessKey': __LazyModelLoader('..._common.models.object_store_access_key_v_2_51', 'ObjectStoreAccessKey'), + 'ObjectStoreAccessKeyBase': __LazyModelLoader('..._common.models.object_store_access_key_base_v_2_51', 'ObjectStoreAccessKeyBase'), + 'ObjectStoreAccessKeyGetResponse': __LazyModelLoader('..._common.models.object_store_access_key_get_response_v_2_51', 'ObjectStoreAccessKeyGetResponse'), + 'ObjectStoreAccessKeyPostBase': __LazyModelLoader('..._common.models.object_store_access_key_post_base_v_2_55', 'ObjectStoreAccessKeyPostBase'), + 'ObjectStoreAccessKeyResponse': __LazyModelLoader('..._common.models.object_store_access_key_response_v_2_51', 'ObjectStoreAccessKeyResponse'), + 'ObjectStoreAccessPolicy': __LazyModelLoader('..._common.models.object_store_access_policy_v_2_54', 'ObjectStoreAccessPolicy'), + 'ObjectStoreAccessPolicyGetResponse': __LazyModelLoader('..._common.models.object_store_access_policy_get_response_v_2_54', 'ObjectStoreAccessPolicyGetResponse'), + 'ObjectStoreAccessPolicyResponse': __LazyModelLoader('..._common.models.object_store_access_policy_response_v_2_54', 'ObjectStoreAccessPolicyResponse'), + 'ObjectStoreAccessPolicyRuleGetResponse': __LazyModelLoader('..._common.models.object_store_access_policy_rule_get_response_v_2_54', 'ObjectStoreAccessPolicyRuleGetResponse'), + 'ObjectStoreAccessPolicyRuleResponse': __LazyModelLoader('..._common.models.object_store_access_policy_rule_response_v_2_54', 'ObjectStoreAccessPolicyRuleResponse'), + 'ObjectStoreAccount': __LazyModelLoader('..._common.models.object_store_account_v_2_51', 'ObjectStoreAccount'), + 'ObjectStoreAccountBase': __LazyModelLoader('..._common.models.object_store_account_base_v_2_51', 'ObjectStoreAccountBase'), + 'ObjectStoreAccountGetResponse': __LazyModelLoader('..._common.models.object_store_account_get_response_v_2_51', 'ObjectStoreAccountGetResponse'), + 'ObjectStoreAccountResponse': __LazyModelLoader('..._common.models.object_store_account_response_v_2_51', 'ObjectStoreAccountResponse'), + 'ObjectStoreUser': __LazyModelLoader('..._common.models.object_store_user_v_2_51', 'ObjectStoreUser'), + 'ObjectStoreUserBase': __LazyModelLoader('..._common.models.object_store_user_base_v_2_51', 'ObjectStoreUserBase'), + 'ObjectStoreUserGetResponse': __LazyModelLoader('..._common.models.object_store_user_get_response_v_2_51', 'ObjectStoreUserGetResponse'), + 'ObjectStoreUserResponse': __LazyModelLoader('..._common.models.object_store_user_response_v_2_51', 'ObjectStoreUserResponse'), + 'ObjectStoreVirtualHost': __LazyModelLoader('..._common.models.object_store_virtual_host_v_2_51', 'ObjectStoreVirtualHost'), + 'ObjectStoreVirtualHostGetResponse': __LazyModelLoader('..._common.models.object_store_virtual_host_get_response_v_2_51', 'ObjectStoreVirtualHostGetResponse'), + 'ObjectStoreVirtualHostResponse': __LazyModelLoader('..._common.models.object_store_virtual_host_response_v_2_51', 'ObjectStoreVirtualHostResponse'), + 'Offload': __LazyModelLoader('..._common.models.offload_v_2_50', 'Offload'), + 'OffloadAzure': __LazyModelLoader('..._common.models.offload_azure_v_2_50', 'OffloadAzure'), + 'OffloadAzurePatch': __LazyModelLoader('..._common.models.offload_azure_patch_v_2_50', 'OffloadAzurePatch'), + 'OffloadGetResponse': __LazyModelLoader('..._common.models.offload_get_response_v_2_50', 'OffloadGetResponse'), + 'OffloadGoogleCloud': __LazyModelLoader('..._common.models.offload_google_cloud_v_2_25', 'OffloadGoogleCloud'), + 'OffloadNfs': __LazyModelLoader('..._common.models.offload_nfs_v_2_25', 'OffloadNfs'), + 'OffloadPatch': __LazyModelLoader('..._common.models.offload_patch_v_2_50', 'OffloadPatch'), + 'OffloadPost': __LazyModelLoader('..._common.models.offload_post_v_2_50', 'OffloadPost'), + 'OffloadResponse': __LazyModelLoader('..._common.models.offload_response_v_2_50', 'OffloadResponse'), + 'OffloadS3': __LazyModelLoader('..._common.models.offload_s3_v_2_25', 'OffloadS3'), + 'OverrideCheck': __LazyModelLoader('..._common.models.override_check_v_2_4', 'OverrideCheck'), + 'PageInfo': __LazyModelLoader('..._common.models.page_info_v_2_1', 'PageInfo'), + 'PageInfoWithoutTotalItemCountResponse': __LazyModelLoader('..._common.models.page_info_without_total_item_count_response_v_2_40', 'PageInfoWithoutTotalItemCountResponse'), + 'Performance': __LazyModelLoader('..._common.models.performance_v_2_51', 'Performance'), + 'PerformanceOthers': __LazyModelLoader('..._common.models.performance_others_v_2_52', 'PerformanceOthers'), + 'Pod': __LazyModelLoader('..._common.models.pod_v_2_55', 'Pod'), + 'PodArrayAndMember': __LazyModelLoader('..._common.models.pod_array_and_member_v_2_54', 'PodArrayAndMember'), + 'PodArrayStatus': __LazyModelLoader('..._common.models.pod_array_status_v_2_54', 'PodArrayStatus'), + 'PodGetResponse': __LazyModelLoader('..._common.models.pod_get_response_v_2_55', 'PodGetResponse'), + 'PodMember': __LazyModelLoader('..._common.models.pod_member_v_2_54', 'PodMember'), + 'PodMemberGetResponse': __LazyModelLoader('..._common.models.pod_member_get_response_v_2_54', 'PodMemberGetResponse'), + 'PodMemberResponse': __LazyModelLoader('..._common.models.pod_member_response_v_2_54', 'PodMemberResponse'), + 'PodPatch': __LazyModelLoader('..._common.models.pod_patch_v_2_55', 'PodPatch'), + 'PodPerformance': __LazyModelLoader('..._common.models.pod_performance_v_2_52', 'PodPerformance'), + 'PodPerformanceByArray': __LazyModelLoader('..._common.models.pod_performance_by_array_v_2_52', 'PodPerformanceByArray'), + 'PodPerformanceByArrayGetResponse': __LazyModelLoader('..._common.models.pod_performance_by_array_get_response_v_2_52', 'PodPerformanceByArrayGetResponse'), + 'PodPerformanceReplication': __LazyModelLoader('..._common.models.pod_performance_replication_v_2_55', 'PodPerformanceReplication'), + 'PodPerformanceReplicationByArray': __LazyModelLoader('..._common.models.pod_performance_replication_by_array_v_2_55', 'PodPerformanceReplicationByArray'), + 'PodPerformanceReplicationByArrayGetResponse': __LazyModelLoader('..._common.models.pod_performance_replication_by_array_get_response_v_2_55', 'PodPerformanceReplicationByArrayGetResponse'), + 'PodPerformanceReplicationByArrayResponse': __LazyModelLoader('..._common.models.pod_performance_replication_by_array_response_v_2_55', 'PodPerformanceReplicationByArrayResponse'), + 'PodPerformanceReplicationGetResponse': __LazyModelLoader('..._common.models.pod_performance_replication_get_response_v_2_55', 'PodPerformanceReplicationGetResponse'), + 'PodPerformanceReplicationResponse': __LazyModelLoader('..._common.models.pod_performance_replication_response_v_2_55', 'PodPerformanceReplicationResponse'), + 'PodPost': __LazyModelLoader('..._common.models.pod_post_v_2_55', 'PodPost'), + 'PodRemoteArrayStatus': __LazyModelLoader('..._common.models.pod_remote_array_status_v_2_54', 'PodRemoteArrayStatus'), + 'PodReplicaLink': __LazyModelLoader('..._common.models.pod_replica_link_v_2_52', 'PodReplicaLink'), + 'PodReplicaLinkGetResponse': __LazyModelLoader('..._common.models.pod_replica_link_get_response_v_2_52', 'PodReplicaLinkGetResponse'), + 'PodReplicaLinkLag': __LazyModelLoader('..._common.models.pod_replica_link_lag_v_2_52', 'PodReplicaLinkLag'), + 'PodReplicaLinkLagGetResponse': __LazyModelLoader('..._common.models.pod_replica_link_lag_get_response_v_2_52', 'PodReplicaLinkLagGetResponse'), + 'PodReplicaLinkLagResponse': __LazyModelLoader('..._common.models.pod_replica_link_lag_response_v_2_52', 'PodReplicaLinkLagResponse'), + 'PodReplicaLinkMappingPolicyGetResponse': __LazyModelLoader('..._common.models.pod_replica_link_mapping_policy_get_response_v_2_54', 'PodReplicaLinkMappingPolicyGetResponse'), + 'PodReplicaLinkMappingPolicyResponse': __LazyModelLoader('..._common.models.pod_replica_link_mapping_policy_response_v_2_54', 'PodReplicaLinkMappingPolicyResponse'), + 'PodReplicaLinkPatch': __LazyModelLoader('..._common.models.pod_replica_link_patch_v_2_2', 'PodReplicaLinkPatch'), + 'PodReplicaLinkPerformanceReplication': __LazyModelLoader('..._common.models.pod_replica_link_performance_replication_v_2_52', 'PodReplicaLinkPerformanceReplication'), + 'PodReplicaLinkPerformanceReplicationArray': __LazyModelLoader('..._common.models.pod_replica_link_performance_replication_array_v_2_54', 'PodReplicaLinkPerformanceReplicationArray'), + 'PodReplicaLinkPerformanceReplicationArrayGetResponse': __LazyModelLoader('..._common.models.pod_replica_link_performance_replication_array_get_response_v_2_54', 'PodReplicaLinkPerformanceReplicationArrayGetResponse'), + 'PodReplicaLinkPerformanceReplicationArrayResponse': __LazyModelLoader('..._common.models.pod_replica_link_performance_replication_array_response_v_2_54', 'PodReplicaLinkPerformanceReplicationArrayResponse'), + 'PodReplicaLinkPerformanceReplicationGetResponse': __LazyModelLoader('..._common.models.pod_replica_link_performance_replication_get_response_v_2_52', 'PodReplicaLinkPerformanceReplicationGetResponse'), + 'PodReplicaLinkPerformanceReplicationResponse': __LazyModelLoader('..._common.models.pod_replica_link_performance_replication_response_v_2_52', 'PodReplicaLinkPerformanceReplicationResponse'), + 'PodReplicaLinkReference': __LazyModelLoader('..._common.models.pod_replica_link_reference_v_2_52', 'PodReplicaLinkReference'), + 'PodReplicaLinkResponse': __LazyModelLoader('..._common.models.pod_replica_link_response_v_2_52', 'PodReplicaLinkResponse'), + 'PodResponse': __LazyModelLoader('..._common.models.pod_response_v_2_55', 'PodResponse'), + 'PodSpace': __LazyModelLoader('..._common.models.pod_space_v_2_50', 'PodSpace'), + 'Policy': __LazyModelLoader('..._common.models.policy_v_2_55', 'Policy'), + 'PolicyAssignmentPost': __LazyModelLoader('..._common.models.policy_assignment_post_v_2_49', 'PolicyAssignmentPost'), + 'PolicyAssignmentPostPolicy': __LazyModelLoader('..._common.models.policy_assignment_post_policy_v_2_49', 'PolicyAssignmentPostPolicy'), + 'PolicyAuditFile': __LazyModelLoader('..._common.models.policy_audit_file_v_2_55', 'PolicyAuditFile'), + 'PolicyAuditFileGetResponse': __LazyModelLoader('..._common.models.policy_audit_file_get_response_v_2_55', 'PolicyAuditFileGetResponse'), + 'PolicyAuditFilePatch': __LazyModelLoader('..._common.models.policy_audit_file_patch_v_2_55', 'PolicyAuditFilePatch'), + 'PolicyAuditFilePost': __LazyModelLoader('..._common.models.policy_audit_file_post_v_2_55', 'PolicyAuditFilePost'), + 'PolicyAuditFileResponse': __LazyModelLoader('..._common.models.policy_audit_file_response_v_2_55', 'PolicyAuditFileResponse'), + 'PolicyBase': __LazyModelLoader('..._common.models.policy_base_v_2_52', 'PolicyBase'), + 'PolicyGetResponse': __LazyModelLoader('..._common.models.policy_get_response_v_2_55', 'PolicyGetResponse'), + 'PolicyLockable': __LazyModelLoader('..._common.models.policy_lockable_v_2_55', 'PolicyLockable'), + 'PolicyLockableEradicationConfig': __LazyModelLoader('..._common.models.policy_lockable_eradication_config_v_2_49', 'PolicyLockableEradicationConfig'), + 'PolicyLockableGetResponse': __LazyModelLoader('..._common.models.policy_lockable_get_response_v_2_55', 'PolicyLockableGetResponse'), + 'PolicyLockablePatch': __LazyModelLoader('..._common.models.policy_lockable_patch_v_2_49', 'PolicyLockablePatch'), + 'PolicyLockableResponse': __LazyModelLoader('..._common.models.policy_lockable_response_v_2_55', 'PolicyLockableResponse'), + 'PolicyManagementAccess': __LazyModelLoader('..._common.models.policy_management_access_v_2_54', 'PolicyManagementAccess'), + 'PolicyManagementAccessGetResponse': __LazyModelLoader('..._common.models.policy_management_access_get_response_v_2_54', 'PolicyManagementAccessGetResponse'), + 'PolicyManagementAccessPatch': __LazyModelLoader('..._common.models.policy_management_access_patch_v_2_54', 'PolicyManagementAccessPatch'), + 'PolicyManagementAccessPost': __LazyModelLoader('..._common.models.policy_management_access_post_v_2_54', 'PolicyManagementAccessPost'), + 'PolicyManagementAccessResponse': __LazyModelLoader('..._common.models.policy_management_access_response_v_2_54', 'PolicyManagementAccessResponse'), + 'PolicyMember': __LazyModelLoader('..._common.models.policy_member_v_2_51', 'PolicyMember'), + 'PolicyMemberBase': __LazyModelLoader('..._common.models.policy_member_base_v_2_51', 'PolicyMemberBase'), + 'PolicyMemberClean': __LazyModelLoader('..._common.models.policy_member_clean_v_2_50', 'PolicyMemberClean'), + 'PolicyMemberCleanGetResponse': __LazyModelLoader('..._common.models.policy_member_clean_get_response_v_2_50', 'PolicyMemberCleanGetResponse'), + 'PolicyMemberCleanResponse': __LazyModelLoader('..._common.models.policy_member_clean_response_v_2_50', 'PolicyMemberCleanResponse'), + 'PolicyMemberExport': __LazyModelLoader('..._common.models.policy_member_export_v_2_55', 'PolicyMemberExport'), + 'PolicyMemberExportGetResponse': __LazyModelLoader('..._common.models.policy_member_export_get_response_v_2_55', 'PolicyMemberExportGetResponse'), + 'PolicyMemberExportPost': __LazyModelLoader('..._common.models.policy_member_export_post_v_2_54', 'PolicyMemberExportPost'), + 'PolicyMemberExportResponse': __LazyModelLoader('..._common.models.policy_member_export_response_v_2_55', 'PolicyMemberExportResponse'), + 'PolicyMemberGetResponse': __LazyModelLoader('..._common.models.policy_member_get_response_v_2_51', 'PolicyMemberGetResponse'), + 'PolicyMemberObjectStoreAccessGetResponse': __LazyModelLoader('..._common.models.policy_member_object_store_access_get_response_v_2_51', 'PolicyMemberObjectStoreAccessGetResponse'), + 'PolicyMemberObjectStoreAccessResponse': __LazyModelLoader('..._common.models.policy_member_object_store_access_response_v_2_51', 'PolicyMemberObjectStoreAccessResponse'), + 'PolicyMemberPost': __LazyModelLoader('..._common.models.policy_member_post_v_2_54', 'PolicyMemberPost'), + 'PolicyMemberResponse': __LazyModelLoader('..._common.models.policy_member_response_v_2_51', 'PolicyMemberResponse'), + 'PolicyNfs': __LazyModelLoader('..._common.models.policy_nfs_v_2_55', 'PolicyNfs'), + 'PolicyNfsGetResponse': __LazyModelLoader('..._common.models.policy_nfs_get_response_v_2_55', 'PolicyNfsGetResponse'), + 'PolicyNfsPatch': __LazyModelLoader('..._common.models.policy_nfs_patch_v_2_29', 'PolicyNfsPatch'), + 'PolicyNfsPolicyMapping': __LazyModelLoader('..._common.models.policy_nfs_policy_mapping_v_2_32', 'PolicyNfsPolicyMapping'), + 'PolicyNfsPost': __LazyModelLoader('..._common.models.policy_nfs_post_v_2_32', 'PolicyNfsPost'), + 'PolicyNfsResponse': __LazyModelLoader('..._common.models.policy_nfs_response_v_2_55', 'PolicyNfsResponse'), + 'PolicyPassword': __LazyModelLoader('..._common.models.policy_password_v_2_50', 'PolicyPassword'), + 'PolicyPasswordGetResponse': __LazyModelLoader('..._common.models.policy_password_get_response_v_2_50', 'PolicyPasswordGetResponse'), + 'PolicyPasswordResponse': __LazyModelLoader('..._common.models.policy_password_response_v_2_50', 'PolicyPasswordResponse'), + 'PolicyPatch': __LazyModelLoader('..._common.models.policy_patch_v_2_3', 'PolicyPatch'), + 'PolicyPost': __LazyModelLoader('..._common.models.policy_post_v_2_3', 'PolicyPost'), + 'PolicyQos': __LazyModelLoader('..._common.models.policy_qos_v_2_55', 'PolicyQos'), + 'PolicyQosGetResponse': __LazyModelLoader('..._common.models.policy_qos_get_response_v_2_55', 'PolicyQosGetResponse'), + 'PolicyQosPatch': __LazyModelLoader('..._common.models.policy_qos_patch_v_2_54', 'PolicyQosPatch'), + 'PolicyQosPost': __LazyModelLoader('..._common.models.policy_qos_post_v_2_54', 'PolicyQosPost'), + 'PolicyQosResponse': __LazyModelLoader('..._common.models.policy_qos_response_v_2_55', 'PolicyQosResponse'), + 'PolicyQuota': __LazyModelLoader('..._common.models.policy_quota_v_2_55', 'PolicyQuota'), + 'PolicyQuotaGetResponse': __LazyModelLoader('..._common.models.policy_quota_get_response_v_2_55', 'PolicyQuotaGetResponse'), + 'PolicyQuotaPatch': __LazyModelLoader('..._common.models.policy_quota_patch_v_2_51', 'PolicyQuotaPatch'), + 'PolicyQuotaResponse': __LazyModelLoader('..._common.models.policy_quota_response_v_2_55', 'PolicyQuotaResponse'), + 'PolicyResponse': __LazyModelLoader('..._common.models.policy_response_v_2_55', 'PolicyResponse'), + 'PolicyRuleAlertWatcher': __LazyModelLoader('..._common.models.policy_rule_alert_watcher_v_2_52', 'PolicyRuleAlertWatcher'), + 'PolicyRuleAlertWatcherGetResponse': __LazyModelLoader('..._common.models.policy_rule_alert_watcher_get_response_v_2_52', 'PolicyRuleAlertWatcherGetResponse'), + 'PolicyRuleAlertWatcherPatch': __LazyModelLoader('..._common.models.policy_rule_alert_watcher_patch_v_2_52', 'PolicyRuleAlertWatcherPatch'), + 'PolicyRuleAlertWatcherPost': __LazyModelLoader('..._common.models.policy_rule_alert_watcher_post_v_2_52', 'PolicyRuleAlertWatcherPost'), + 'PolicyRuleAlertWatcherResponse': __LazyModelLoader('..._common.models.policy_rule_alert_watcher_response_v_2_52', 'PolicyRuleAlertWatcherResponse'), + 'PolicyRuleNetworkAccess': __LazyModelLoader('..._common.models.policy_rule_network_access_v_2_52', 'PolicyRuleNetworkAccess'), + 'PolicyRuleNetworkAccessGetResponse': __LazyModelLoader('..._common.models.policy_rule_network_access_get_response_v_2_52', 'PolicyRuleNetworkAccessGetResponse'), + 'PolicyRuleNetworkAccessPatch': __LazyModelLoader('..._common.models.policy_rule_network_access_patch_v_2_52', 'PolicyRuleNetworkAccessPatch'), + 'PolicyRuleNetworkAccessPost': __LazyModelLoader('..._common.models.policy_rule_network_access_post_v_2_52', 'PolicyRuleNetworkAccessPost'), + 'PolicyRuleNetworkAccessResponse': __LazyModelLoader('..._common.models.policy_rule_network_access_response_v_2_52', 'PolicyRuleNetworkAccessResponse'), + 'PolicyRuleNfsClient': __LazyModelLoader('..._common.models.policy_rule_nfs_client_v_2_50', 'PolicyRuleNfsClient'), + 'PolicyRuleNfsClientGetResponse': __LazyModelLoader('..._common.models.policy_rule_nfs_client_get_response_v_2_50', 'PolicyRuleNfsClientGetResponse'), + 'PolicyRuleNfsClientPatch': __LazyModelLoader('..._common.models.policy_rule_nfs_client_patch_v_2_51', 'PolicyRuleNfsClientPatch'), + 'PolicyRuleNfsClientPost': __LazyModelLoader('..._common.models.policy_rule_nfs_client_post_v_2_29', 'PolicyRuleNfsClientPost'), + 'PolicyRuleNfsClientResponse': __LazyModelLoader('..._common.models.policy_rule_nfs_client_response_v_2_50', 'PolicyRuleNfsClientResponse'), + 'PolicyRuleObjectStoreAccess': __LazyModelLoader('..._common.models.policy_rule_object_store_access_v_2_54', 'PolicyRuleObjectStoreAccess'), + 'PolicyRuleObjectStoreAccessBase': __LazyModelLoader('..._common.models.policy_rule_object_store_access_base_v_2_54', 'PolicyRuleObjectStoreAccessBase'), + 'PolicyRuleQuota': __LazyModelLoader('..._common.models.policy_rule_quota_v_2_50', 'PolicyRuleQuota'), + 'PolicyRuleQuotaGetResponse': __LazyModelLoader('..._common.models.policy_rule_quota_get_response_v_2_50', 'PolicyRuleQuotaGetResponse'), + 'PolicyRuleQuotaPatch': __LazyModelLoader('..._common.models.policy_rule_quota_patch_v_2_52', 'PolicyRuleQuotaPatch'), + 'PolicyRuleQuotaPost': __LazyModelLoader('..._common.models.policy_rule_quota_post_v_2_21', 'PolicyRuleQuotaPost'), + 'PolicyRuleQuotaResponse': __LazyModelLoader('..._common.models.policy_rule_quota_response_v_2_50', 'PolicyRuleQuotaResponse'), + 'PolicyRuleSmbClient': __LazyModelLoader('..._common.models.policy_rule_smb_client_v_2_50', 'PolicyRuleSmbClient'), + 'PolicyRuleSmbClientGetResponse': __LazyModelLoader('..._common.models.policy_rule_smb_client_get_response_v_2_50', 'PolicyRuleSmbClientGetResponse'), + 'PolicyRuleSmbClientPost': __LazyModelLoader('..._common.models.policy_rule_smb_client_post_v_2_3', 'PolicyRuleSmbClientPost'), + 'PolicyRuleSmbClientResponse': __LazyModelLoader('..._common.models.policy_rule_smb_client_response_v_2_50', 'PolicyRuleSmbClientResponse'), + 'PolicyRuleSnapshot': __LazyModelLoader('..._common.models.policy_rule_snapshot_v_2_50', 'PolicyRuleSnapshot'), + 'PolicyRuleSnapshotGetResponse': __LazyModelLoader('..._common.models.policy_rule_snapshot_get_response_v_2_50', 'PolicyRuleSnapshotGetResponse'), + 'PolicyRuleSnapshotPatch': __LazyModelLoader('..._common.models.policy_rule_snapshot_patch_v_2_49', 'PolicyRuleSnapshotPatch'), + 'PolicyRuleSnapshotPost': __LazyModelLoader('..._common.models.policy_rule_snapshot_post_v_2_21', 'PolicyRuleSnapshotPost'), + 'PolicyRuleSnapshotResponse': __LazyModelLoader('..._common.models.policy_rule_snapshot_response_v_2_50', 'PolicyRuleSnapshotResponse'), + 'PolicyRuleUserGroupQuota': __LazyModelLoader('..._common.models.policy_rule_user_group_quota_v_2_50', 'PolicyRuleUserGroupQuota'), + 'PolicyRuleUserGroupQuotaGetResponse': __LazyModelLoader('..._common.models.policy_rule_user_group_quota_get_response_v_2_50', 'PolicyRuleUserGroupQuotaGetResponse'), + 'PolicyRuleUserGroupQuotaLimitPatch': __LazyModelLoader('..._common.models.policy_rule_user_group_quota_limit_patch_v_2_52', 'PolicyRuleUserGroupQuotaLimitPatch'), + 'PolicyRuleUserGroupQuotaPatch': __LazyModelLoader('..._common.models.policy_rule_user_group_quota_patch_v_2_52', 'PolicyRuleUserGroupQuotaPatch'), + 'PolicyRuleUserGroupQuotaPost': __LazyModelLoader('..._common.models.policy_rule_user_group_quota_post_v_2_44', 'PolicyRuleUserGroupQuotaPost'), + 'PolicyRuleUserGroupQuotaResponse': __LazyModelLoader('..._common.models.policy_rule_user_group_quota_response_v_2_50', 'PolicyRuleUserGroupQuotaResponse'), + 'PolicyRuleUserGroupQuotaSubject': __LazyModelLoader('..._common.models.policy_rule_user_group_quota_subject_v_2_44', 'PolicyRuleUserGroupQuotaSubject'), + 'PolicySmb': __LazyModelLoader('..._common.models.policy_smb_v_2_55', 'PolicySmb'), + 'PolicySmbGetResponse': __LazyModelLoader('..._common.models.policy_smb_get_response_v_2_55', 'PolicySmbGetResponse'), + 'PolicySmbPatch': __LazyModelLoader('..._common.models.policy_smb_patch_v_2_43', 'PolicySmbPatch'), + 'PolicySmbPost': __LazyModelLoader('..._common.models.policy_smb_post_v_2_43', 'PolicySmbPost'), + 'PolicySmbResponse': __LazyModelLoader('..._common.models.policy_smb_response_v_2_55', 'PolicySmbResponse'), + 'PolicyTls': __LazyModelLoader('..._common.models.policy_tls_v_2_55', 'PolicyTls'), + 'PolicyTlsBase': __LazyModelLoader('..._common.models.policy_tls_base_v_2_54', 'PolicyTlsBase'), + 'PolicyTlsGetResponse': __LazyModelLoader('..._common.models.policy_tls_get_response_v_2_55', 'PolicyTlsGetResponse'), + 'PolicyTlsPatch': __LazyModelLoader('..._common.models.policy_tls_patch_v_2_54', 'PolicyTlsPatch'), + 'PolicyTlsPost': __LazyModelLoader('..._common.models.policy_tls_post_v_2_54', 'PolicyTlsPost'), + 'PolicyTlsResponse': __LazyModelLoader('..._common.models.policy_tls_response_v_2_55', 'PolicyTlsResponse'), + 'PolicymemberexportpostMembers': __LazyModelLoader('..._common.models.policymemberexportpost_members_v_2_54', 'PolicymemberexportpostMembers'), + 'PolicymemberpostMembers': __LazyModelLoader('..._common.models.policymemberpost_members_v_2_54', 'PolicymemberpostMembers'), + 'PolicynfspostPolicyMapping': __LazyModelLoader('..._common.models.policynfspost_policy_mapping_v_2_32', 'PolicynfspostPolicyMapping'), + 'PolicyqosRatelimit': __LazyModelLoader('..._common.models.policyqos_ratelimit_v_2_54', 'PolicyqosRatelimit'), + 'PolicyrulealertwatcherpatchRules': __LazyModelLoader('..._common.models.policyrulealertwatcherpatch_rules_v_2_52', 'PolicyrulealertwatcherpatchRules'), + 'PolicyrulealertwatcherpostRules': __LazyModelLoader('..._common.models.policyrulealertwatcherpost_rules_v_2_52', 'PolicyrulealertwatcherpostRules'), + 'PolicyrulemanagementaccessRules': __LazyModelLoader('..._common.models.policyrulemanagementaccess_rules_v_2_54', 'PolicyrulemanagementaccessRules'), + 'PolicyrulenetworkaccesspatchRules': __LazyModelLoader('..._common.models.policyrulenetworkaccesspatch_rules_v_2_52', 'PolicyrulenetworkaccesspatchRules'), + 'PolicyrulenetworkaccesspostRules': __LazyModelLoader('..._common.models.policyrulenetworkaccesspost_rules_v_2_52', 'PolicyrulenetworkaccesspostRules'), + 'PolicyrulenfsclientpatchRules': __LazyModelLoader('..._common.models.policyrulenfsclientpatch_rules_v_2_51', 'PolicyrulenfsclientpatchRules'), + 'PolicyrulenfsclientpostRules': __LazyModelLoader('..._common.models.policyrulenfsclientpost_rules_v_2_29', 'PolicyrulenfsclientpostRules'), + 'PolicyrulequotapatchRules': __LazyModelLoader('..._common.models.policyrulequotapatch_rules_v_2_52', 'PolicyrulequotapatchRules'), + 'PolicyrulequotapostRules': __LazyModelLoader('..._common.models.policyrulequotapost_rules_v_2_21', 'PolicyrulequotapostRules'), + 'PolicyrulesmbclientpostRules': __LazyModelLoader('..._common.models.policyrulesmbclientpost_rules_v_2_3', 'PolicyrulesmbclientpostRules'), + 'PolicyrulesnapshotpatchRules': __LazyModelLoader('..._common.models.policyrulesnapshotpatch_rules_v_2_49', 'PolicyrulesnapshotpatchRules'), + 'PolicyrulesnapshotpostRules': __LazyModelLoader('..._common.models.policyrulesnapshotpost_rules_v_2_21', 'PolicyrulesnapshotpostRules'), + 'PolicyruleusergroupquotaSubject': __LazyModelLoader('..._common.models.policyruleusergroupquota_subject_v_2_44', 'PolicyruleusergroupquotaSubject'), + 'PolicyruleusergroupquotapatchRules': __LazyModelLoader('..._common.models.policyruleusergroupquotapatch_rules_v_2_52', 'PolicyruleusergroupquotapatchRules'), + 'PolicyruleusergroupquotapostRules': __LazyModelLoader('..._common.models.policyruleusergroupquotapost_rules_v_2_44', 'PolicyruleusergroupquotapostRules'), + 'Port': __LazyModelLoader('..._common.models.port_v_2_50', 'Port'), + 'PortCommon': __LazyModelLoader('..._common.models.port_common_v_2_2', 'PortCommon'), + 'PortGetResponse': __LazyModelLoader('..._common.models.port_get_response_v_2_50', 'PortGetResponse'), + 'PortInitiator': __LazyModelLoader('..._common.models.port_initiator_v_2_50', 'PortInitiator'), + 'PortInitiatorEncryption': __LazyModelLoader('..._common.models.port_initiator_encryption_v_2_49', 'PortInitiatorEncryption'), + 'PortInitiatorTarget': __LazyModelLoader('..._common.models.port_initiator_target_v_2_38', 'PortInitiatorTarget'), + 'PortInitiatorsGetResponse': __LazyModelLoader('..._common.models.port_initiators_get_response_v_2_50', 'PortInitiatorsGetResponse'), + 'PresetWorkload': __LazyModelLoader('..._common.models.preset_workload_v_2_54', 'PresetWorkload'), + 'PresetWorkloadBase': __LazyModelLoader('..._common.models.preset_workload_base_v_2_54', 'PresetWorkloadBase'), + 'PresetWorkloadConstraints': __LazyModelLoader('..._common.models.preset_workload_constraints_v_2_54', 'PresetWorkloadConstraints'), + 'PresetWorkloadConstraintsBoolean': __LazyModelLoader('..._common.models.preset_workload_constraints_boolean_v_2_40', 'PresetWorkloadConstraintsBoolean'), + 'PresetWorkloadConstraintsInteger': __LazyModelLoader('..._common.models.preset_workload_constraints_integer_v_2_40', 'PresetWorkloadConstraintsInteger'), + 'PresetWorkloadConstraintsResourceReference': __LazyModelLoader('..._common.models.preset_workload_constraints_resource_reference_v_2_54', 'PresetWorkloadConstraintsResourceReference'), + 'PresetWorkloadConstraintsResourceReferenceAllowedValues': __LazyModelLoader('..._common.models.preset_workload_constraints_resource_reference_allowed_values_v_2_51', 'PresetWorkloadConstraintsResourceReferenceAllowedValues'), + 'PresetWorkloadConstraintsString': __LazyModelLoader('..._common.models.preset_workload_constraints_string_v_2_40', 'PresetWorkloadConstraintsString'), + 'PresetWorkloadDirectoryConfiguration': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_v_2_51', 'PresetWorkloadDirectoryConfiguration'), + 'PresetWorkloadDirectoryConfigurationExportConfigurations': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_export_configurations_v_2_51', 'PresetWorkloadDirectoryConfigurationExportConfigurations'), + 'PresetWorkloadDirectoryConfigurationExports': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_exports_v_2_51', 'PresetWorkloadDirectoryConfigurationExports'), + 'PresetWorkloadDirectoryConfigurationMultiProtocol': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_multi_protocol_v_2_51', 'PresetWorkloadDirectoryConfigurationMultiProtocol'), + 'PresetWorkloadDirectoryConfigurationName': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_name_v_2_51', 'PresetWorkloadDirectoryConfigurationName'), + 'PresetWorkloadDirectoryConfigurationParent': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_parent_v_2_51', 'PresetWorkloadDirectoryConfigurationParent'), + 'PresetWorkloadDirectoryConfigurationPath': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_path_v_2_51', 'PresetWorkloadDirectoryConfigurationPath'), + 'PresetWorkloadDirectoryConfigurationSpecialDirectories': __LazyModelLoader('..._common.models.preset_workload_directory_configuration_special_directories_v_2_51', 'PresetWorkloadDirectoryConfigurationSpecialDirectories'), + 'PresetWorkloadExportConfigurationNfs': __LazyModelLoader('..._common.models.preset_workload_export_configuration_nfs_v_2_51', 'PresetWorkloadExportConfigurationNfs'), + 'PresetWorkloadExportConfigurationNfsPolicy': __LazyModelLoader('..._common.models.preset_workload_export_configuration_nfs_policy_v_2_51', 'PresetWorkloadExportConfigurationNfsPolicy'), + 'PresetWorkloadExportConfigurationNfsRule': __LazyModelLoader('..._common.models.preset_workload_export_configuration_nfs_rule_v_2_51', 'PresetWorkloadExportConfigurationNfsRule'), + 'PresetWorkloadExportConfigurationSmb': __LazyModelLoader('..._common.models.preset_workload_export_configuration_smb_v_2_51', 'PresetWorkloadExportConfigurationSmb'), + 'PresetWorkloadExportConfigurationSmbPolicy': __LazyModelLoader('..._common.models.preset_workload_export_configuration_smb_policy_v_2_51', 'PresetWorkloadExportConfigurationSmbPolicy'), + 'PresetWorkloadExportConfigurationSmbRule': __LazyModelLoader('..._common.models.preset_workload_export_configuration_smb_rule_v_2_51', 'PresetWorkloadExportConfigurationSmbRule'), + 'PresetWorkloadExportConfigurationSmbShare': __LazyModelLoader('..._common.models.preset_workload_export_configuration_smb_share_v_2_51', 'PresetWorkloadExportConfigurationSmbShare'), + 'PresetWorkloadExportConfigurationSmbSharePolicy': __LazyModelLoader('..._common.models.preset_workload_export_configuration_smb_share_policy_v_2_51', 'PresetWorkloadExportConfigurationSmbSharePolicy'), + 'PresetWorkloadExportConfigurationSmbShareRule': __LazyModelLoader('..._common.models.preset_workload_export_configuration_smb_share_rule_v_2_51', 'PresetWorkloadExportConfigurationSmbShareRule'), + 'PresetWorkloadExportConfigurations': __LazyModelLoader('..._common.models.preset_workload_export_configurations_v_2_51', 'PresetWorkloadExportConfigurations'), + 'PresetWorkloadGetResponse': __LazyModelLoader('..._common.models.preset_workload_get_response_v_2_54', 'PresetWorkloadGetResponse'), + 'PresetWorkloadMetadata': __LazyModelLoader('..._common.models.preset_workload_metadata_v_2_40', 'PresetWorkloadMetadata'), + 'PresetWorkloadParameter': __LazyModelLoader('..._common.models.preset_workload_parameter_v_2_54', 'PresetWorkloadParameter'), + 'PresetWorkloadPatch': __LazyModelLoader('..._common.models.preset_workload_patch_v_2_40', 'PresetWorkloadPatch'), + 'PresetWorkloadPeriodicReplicationConfiguration': __LazyModelLoader('..._common.models.preset_workload_periodic_replication_configuration_v_2_54', 'PresetWorkloadPeriodicReplicationConfiguration'), + 'PresetWorkloadPlacementConfiguration': __LazyModelLoader('..._common.models.preset_workload_placement_configuration_v_2_54', 'PresetWorkloadPlacementConfiguration'), + 'PresetWorkloadPolicyAction': __LazyModelLoader('..._common.models.preset_workload_policy_action_v_2_51', 'PresetWorkloadPolicyAction'), + 'PresetWorkloadPost': __LazyModelLoader('..._common.models.preset_workload_post_v_2_54', 'PresetWorkloadPost'), + 'PresetWorkloadQosConfiguration': __LazyModelLoader('..._common.models.preset_workload_qos_configuration_v_2_51', 'PresetWorkloadQosConfiguration'), + 'PresetWorkloadQuotaConfiguration': __LazyModelLoader('..._common.models.preset_workload_quota_configuration_v_2_51', 'PresetWorkloadQuotaConfiguration'), + 'PresetWorkloadQuotaRule': __LazyModelLoader('..._common.models.preset_workload_quota_rule_v_2_51', 'PresetWorkloadQuotaRule'), + 'PresetWorkloadResponse': __LazyModelLoader('..._common.models.preset_workload_response_v_2_54', 'PresetWorkloadResponse'), + 'PresetWorkloadSnapshotConfiguration': __LazyModelLoader('..._common.models.preset_workload_snapshot_configuration_v_2_51', 'PresetWorkloadSnapshotConfiguration'), + 'PresetWorkloadSnapshotRule': __LazyModelLoader('..._common.models.preset_workload_snapshot_rule_v_2_51', 'PresetWorkloadSnapshotRule'), + 'PresetWorkloadVolumeConfiguration': __LazyModelLoader('..._common.models.preset_workload_volume_configuration_v_2_51', 'PresetWorkloadVolumeConfiguration'), + 'PresetWorkloadWorkloadTag': __LazyModelLoader('..._common.models.preset_workload_workload_tag_v_2_40', 'PresetWorkloadWorkloadTag'), + 'PriorityAdjustment': __LazyModelLoader('..._common.models.priority_adjustment_v_2_10', 'PriorityAdjustment'), + 'ProtectionGroup': __LazyModelLoader('..._common.models.protection_group_v_2_51', 'ProtectionGroup'), + 'ProtectionGroupEradicationConfig': __LazyModelLoader('..._common.models.protection_group_eradication_config_v_2_13', 'ProtectionGroupEradicationConfig'), + 'ProtectionGroupGetResponse': __LazyModelLoader('..._common.models.protection_group_get_response_v_2_51', 'ProtectionGroupGetResponse'), + 'ProtectionGroupPerformance': __LazyModelLoader('..._common.models.protection_group_performance_v_2_50', 'ProtectionGroupPerformance'), + 'ProtectionGroupPerformanceArray': __LazyModelLoader('..._common.models.protection_group_performance_array_v_2_50', 'ProtectionGroupPerformanceArray'), + 'ProtectionGroupPerformanceArrayResponse': __LazyModelLoader('..._common.models.protection_group_performance_array_response_v_2_50', 'ProtectionGroupPerformanceArrayResponse'), + 'ProtectionGroupPerformanceResponse': __LazyModelLoader('..._common.models.protection_group_performance_response_v_2_50', 'ProtectionGroupPerformanceResponse'), + 'ProtectionGroupPost': __LazyModelLoader('..._common.models.protection_group_post_v_2_50', 'ProtectionGroupPost'), + 'ProtectionGroupResponse': __LazyModelLoader('..._common.models.protection_group_response_v_2_51', 'ProtectionGroupResponse'), + 'ProtectionGroupSnapshot': __LazyModelLoader('..._common.models.protection_group_snapshot_v_2_50', 'ProtectionGroupSnapshot'), + 'ProtectionGroupSnapshotGetResponse': __LazyModelLoader('..._common.models.protection_group_snapshot_get_response_v_2_50', 'ProtectionGroupSnapshotGetResponse'), + 'ProtectionGroupSnapshotPatch': __LazyModelLoader('..._common.models.protection_group_snapshot_patch_v_2_50', 'ProtectionGroupSnapshotPatch'), + 'ProtectionGroupSnapshotPost': __LazyModelLoader('..._common.models.protection_group_snapshot_post_v_2_50', 'ProtectionGroupSnapshotPost'), + 'ProtectionGroupSnapshotReplica': __LazyModelLoader('..._common.models.protection_group_snapshot_replica_v_2_50', 'ProtectionGroupSnapshotReplica'), + 'ProtectionGroupSnapshotReplicaResponse': __LazyModelLoader('..._common.models.protection_group_snapshot_replica_response_v_2_50', 'ProtectionGroupSnapshotReplicaResponse'), + 'ProtectionGroupSnapshotResponse': __LazyModelLoader('..._common.models.protection_group_snapshot_response_v_2_50', 'ProtectionGroupSnapshotResponse'), + 'ProtectionGroupSnapshotTransfer': __LazyModelLoader('..._common.models.protection_group_snapshot_transfer_v_2_50', 'ProtectionGroupSnapshotTransfer'), + 'ProtectionGroupSnapshotTransferGetResponse': __LazyModelLoader('..._common.models.protection_group_snapshot_transfer_get_response_v_2_50', 'ProtectionGroupSnapshotTransferGetResponse'), + 'ProtectionGroupSnapshotTransferResponse': __LazyModelLoader('..._common.models.protection_group_snapshot_transfer_response_v_2_50', 'ProtectionGroupSnapshotTransferResponse'), + 'ProtectionGroupTargetGetResponse': __LazyModelLoader('..._common.models.protection_group_target_get_response_v_2_54', 'ProtectionGroupTargetGetResponse'), + 'ProtectionGroupTargetResponse': __LazyModelLoader('..._common.models.protection_group_target_response_v_2_54', 'ProtectionGroupTargetResponse'), + 'ProtectionGroupsVolumes': __LazyModelLoader('..._common.models.protection_groups_volumes_v_2_50', 'ProtectionGroupsVolumes'), + 'ProtectionGroupsVolumesGetResponse': __LazyModelLoader('..._common.models.protection_groups_volumes_get_response_v_2_50', 'ProtectionGroupsVolumesGetResponse'), + 'ProtectionGroupsVolumesMember': __LazyModelLoader('..._common.models.protection_groups_volumes_member_v_2_49', 'ProtectionGroupsVolumesMember'), + 'ProtectionGroupsVolumesResponse': __LazyModelLoader('..._common.models.protection_groups_volumes_response_v_2_50', 'ProtectionGroupsVolumesResponse'), + 'ProtocolEndpoint': __LazyModelLoader('..._common.models.protocol_endpoint_v_2_33', 'ProtocolEndpoint'), + 'Qos': __LazyModelLoader('..._common.models.qos_v_2_0', 'Qos'), + 'QosBandwidthLimitPatch': __LazyModelLoader('..._common.models.qos_bandwidth_limit_patch_v_2_52', 'QosBandwidthLimitPatch'), + 'QosIopsLimitPatch': __LazyModelLoader('..._common.models.qos_iops_limit_patch_v_2_52', 'QosIopsLimitPatch'), + 'QosMetrics': __LazyModelLoader('..._common.models.qos_metrics_v_2_50', 'QosMetrics'), + 'QosMetricsCeilings': __LazyModelLoader('..._common.models.qos_metrics_ceilings_v_2_50', 'QosMetricsCeilings'), + 'QosMetricsFileCeilings': __LazyModelLoader('..._common.models.qos_metrics_file_ceilings_v_2_54', 'QosMetricsFileCeilings'), + 'QosPatch': __LazyModelLoader('..._common.models.qos_patch_v_2_52', 'QosPatch'), + 'QuotaLimitPatch': __LazyModelLoader('..._common.models.quota_limit_patch_v_2_52', 'QuotaLimitPatch'), + 'Realm': __LazyModelLoader('..._common.models.realm_v_2_55', 'Realm'), + 'RealmArrayStatus': __LazyModelLoader('..._common.models.realm_array_status_v_2_55', 'RealmArrayStatus'), + 'RealmConnection': __LazyModelLoader('..._common.models.realm_connection_v_2_54', 'RealmConnection'), + 'RealmConnectionKey': __LazyModelLoader('..._common.models.realm_connection_key_v_2_54', 'RealmConnectionKey'), + 'RealmConnectionKeyGetResponse': __LazyModelLoader('..._common.models.realm_connection_key_get_response_v_2_54', 'RealmConnectionKeyGetResponse'), + 'RealmConnectionKeyPost': __LazyModelLoader('..._common.models.realm_connection_key_post_v_2_50', 'RealmConnectionKeyPost'), + 'RealmConnectionKeyPostResponse': __LazyModelLoader('..._common.models.realm_connection_key_post_response_v_2_54', 'RealmConnectionKeyPostResponse'), + 'RealmConnectionKeyResponse': __LazyModelLoader('..._common.models.realm_connection_key_response_v_2_54', 'RealmConnectionKeyResponse'), + 'RealmConnectionWithKey': __LazyModelLoader('..._common.models.realm_connection_with_key_v_2_54', 'RealmConnectionWithKey'), + 'RealmConnectionsGetResponse': __LazyModelLoader('..._common.models.realm_connections_get_response_v_2_54', 'RealmConnectionsGetResponse'), + 'RealmConnectionsResponse': __LazyModelLoader('..._common.models.realm_connections_response_v_2_54', 'RealmConnectionsResponse'), + 'RealmGetResponse': __LazyModelLoader('..._common.models.realm_get_response_v_2_55', 'RealmGetResponse'), + 'RealmMember': __LazyModelLoader('..._common.models.realm_member_v_2_55', 'RealmMember'), + 'RealmMemberGetResponse': __LazyModelLoader('..._common.models.realm_member_get_response_v_2_55', 'RealmMemberGetResponse'), + 'RealmMemberResponse': __LazyModelLoader('..._common.models.realm_member_response_v_2_55', 'RealmMemberResponse'), + 'RealmPatch': __LazyModelLoader('..._common.models.realm_patch_v_2_55', 'RealmPatch'), + 'RealmPost': __LazyModelLoader('..._common.models.realm_post_v_2_55', 'RealmPost'), + 'RealmQosGetResponse': __LazyModelLoader('..._common.models.realm_qos_get_response_v_2_50', 'RealmQosGetResponse'), + 'RealmRemoteArrayStatus': __LazyModelLoader('..._common.models.realm_remote_array_status_v_2_55', 'RealmRemoteArrayStatus'), + 'RealmResponse': __LazyModelLoader('..._common.models.realm_response_v_2_55', 'RealmResponse'), + 'RealmSpaceGetResponse': __LazyModelLoader('..._common.models.realm_space_get_response_v_2_50', 'RealmSpaceGetResponse'), + 'RealmsReference': __LazyModelLoader('..._common.models.realms_reference_v_2_52', 'RealmsReference'), + 'Reference': __LazyModelLoader('..._common.models.reference_v_2_49', 'Reference'), + 'ReferenceNoId': __LazyModelLoader('..._common.models.reference_no_id_v_2_0', 'ReferenceNoId'), + 'ReferenceNoIdWithType': __LazyModelLoader('..._common.models.reference_no_id_with_type_v_2_55', 'ReferenceNoIdWithType'), + 'ReferenceWithFixedType': __LazyModelLoader('..._common.models.reference_with_fixed_type_v_2_55', 'ReferenceWithFixedType'), + 'ReferenceWithType': __LazyModelLoader('..._common.models.reference_with_type_v_2_54', 'ReferenceWithType'), + 'ReferenceWithoutTypeWithIsLocal': __LazyModelLoader('..._common.models.reference_without_type_with_is_local_v_2_49', 'ReferenceWithoutTypeWithIsLocal'), + 'RemoteArray': __LazyModelLoader('..._common.models.remote_array_v_2_54', 'RemoteArray'), + 'RemoteArrayFleet': __LazyModelLoader('..._common.models.remote_array_fleet_v_2_49', 'RemoteArrayFleet'), + 'RemoteArrayResponse': __LazyModelLoader('..._common.models.remote_array_response_v_2_54', 'RemoteArrayResponse'), + 'RemoteArraysResponse': __LazyModelLoader('..._common.models.remote_arrays_response_v_2_54', 'RemoteArraysResponse'), + 'RemotePod': __LazyModelLoader('..._common.models.remote_pod_v_2_54', 'RemotePod'), + 'RemotePodTagGetResponse': __LazyModelLoader('..._common.models.remote_pod_tag_get_response_v_2_50', 'RemotePodTagGetResponse'), + 'RemotePodsResponse': __LazyModelLoader('..._common.models.remote_pods_response_v_2_54', 'RemotePodsResponse'), + 'RemoteProtectionGroup': __LazyModelLoader('..._common.models.remote_protection_group_v_2_50', 'RemoteProtectionGroup'), + 'RemoteProtectionGroupGetResponse': __LazyModelLoader('..._common.models.remote_protection_group_get_response_v_2_50', 'RemoteProtectionGroupGetResponse'), + 'RemoteProtectionGroupResponse': __LazyModelLoader('..._common.models.remote_protection_group_response_v_2_50', 'RemoteProtectionGroupResponse'), + 'RemoteProtectionGroupSnapshot': __LazyModelLoader('..._common.models.remote_protection_group_snapshot_v_2_50', 'RemoteProtectionGroupSnapshot'), + 'RemoteProtectionGroupSnapshotGetResponse': __LazyModelLoader('..._common.models.remote_protection_group_snapshot_get_response_v_2_50', 'RemoteProtectionGroupSnapshotGetResponse'), + 'RemoteProtectionGroupSnapshotPost': __LazyModelLoader('..._common.models.remote_protection_group_snapshot_post_v_2_50', 'RemoteProtectionGroupSnapshotPost'), + 'RemoteProtectionGroupSnapshotResponse': __LazyModelLoader('..._common.models.remote_protection_group_snapshot_response_v_2_50', 'RemoteProtectionGroupSnapshotResponse'), + 'RemoteProtectionGroupSnapshotTransfer': __LazyModelLoader('..._common.models.remote_protection_group_snapshot_transfer_v_2_50', 'RemoteProtectionGroupSnapshotTransfer'), + 'RemoteProtectionGroupSnapshotTransferGetResponse': __LazyModelLoader('..._common.models.remote_protection_group_snapshot_transfer_get_response_v_2_50', 'RemoteProtectionGroupSnapshotTransferGetResponse'), + 'RemoteProtectionGroupSnapshotTransferResponse': __LazyModelLoader('..._common.models.remote_protection_group_snapshot_transfer_response_v_2_50', 'RemoteProtectionGroupSnapshotTransferResponse'), + 'RemoteRealm': __LazyModelLoader('..._common.models.remote_realm_v_2_55', 'RemoteRealm'), + 'RemoteRealmTagGetResponse': __LazyModelLoader('..._common.models.remote_realm_tag_get_response_v_2_50', 'RemoteRealmTagGetResponse'), + 'RemoteRealmsResponse': __LazyModelLoader('..._common.models.remote_realms_response_v_2_55', 'RemoteRealmsResponse'), + 'RemoteVolumeSnapshot': __LazyModelLoader('..._common.models.remote_volume_snapshot_v_2_50', 'RemoteVolumeSnapshot'), + 'RemoteVolumeSnapshotGetResponse': __LazyModelLoader('..._common.models.remote_volume_snapshot_get_response_v_2_50', 'RemoteVolumeSnapshotGetResponse'), + 'RemoteVolumeSnapshotPost': __LazyModelLoader('..._common.models.remote_volume_snapshot_post_v_2_28', 'RemoteVolumeSnapshotPost'), + 'RemoteVolumeSnapshotResponse': __LazyModelLoader('..._common.models.remote_volume_snapshot_response_v_2_50', 'RemoteVolumeSnapshotResponse'), + 'RemoteVolumeSnapshotTransfer': __LazyModelLoader('..._common.models.remote_volume_snapshot_transfer_v_2_50', 'RemoteVolumeSnapshotTransfer'), + 'RemoteVolumeSnapshotTransferGetResponse': __LazyModelLoader('..._common.models.remote_volume_snapshot_transfer_get_response_v_2_50', 'RemoteVolumeSnapshotTransferGetResponse'), + 'RemoteVolumeSnapshotTransferResponse': __LazyModelLoader('..._common.models.remote_volume_snapshot_transfer_response_v_2_50', 'RemoteVolumeSnapshotTransferResponse'), + 'ReplicaLinkLag': __LazyModelLoader('..._common.models.replica_link_lag_v_2_2', 'ReplicaLinkLag'), + 'ReplicaLinkPerformanceReplication': __LazyModelLoader('..._common.models.replica_link_performance_replication_v_2_52', 'ReplicaLinkPerformanceReplication'), + 'ReplicaLinkPerformanceReplicationArray': __LazyModelLoader('..._common.models.replica_link_performance_replication_array_v_2_54', 'ReplicaLinkPerformanceReplicationArray'), + 'ReplicaLinkPerformanceReplicationBase': __LazyModelLoader('..._common.models.replica_link_performance_replication_base_v_2_52', 'ReplicaLinkPerformanceReplicationBase'), + 'ReplicationPerformanceWithTotal': __LazyModelLoader('..._common.models.replication_performance_with_total_v_2_2', 'ReplicationPerformanceWithTotal'), + 'ReplicationSchedule': __LazyModelLoader('..._common.models.replication_schedule_v_2_1', 'ReplicationSchedule'), + 'Resource': __LazyModelLoader('..._common.models.resource_v_2_49', 'Resource'), + 'ResourceAccess': __LazyModelLoader('..._common.models.resource_access_v_2_54', 'ResourceAccess'), + 'ResourceAccessStatus': __LazyModelLoader('..._common.models.resource_access_status_v_2_54', 'ResourceAccessStatus'), + 'ResourceAccessStatusCreatedBy': __LazyModelLoader('..._common.models.resource_access_status_created_by_v_2_40', 'ResourceAccessStatusCreatedBy'), + 'ResourceAccessesGetResponse': __LazyModelLoader('..._common.models.resource_accesses_get_response_v_2_54', 'ResourceAccessesGetResponse'), + 'ResourceAccessesResponse': __LazyModelLoader('..._common.models.resource_accesses_response_v_2_54', 'ResourceAccessesResponse'), + 'ResourceAccessesStatusGetResponse': __LazyModelLoader('..._common.models.resource_accesses_status_get_response_v_2_54', 'ResourceAccessesStatusGetResponse'), + 'ResourceAccessesStatusResponse': __LazyModelLoader('..._common.models.resource_accesses_status_response_v_2_54', 'ResourceAccessesStatusResponse'), + 'ResourceBucketSpace': __LazyModelLoader('..._common.models.resource_bucket_space_v_2_52', 'ResourceBucketSpace'), + 'ResourceBucketSpaceGetResponse': __LazyModelLoader('..._common.models.resource_bucket_space_get_response_v_2_52', 'ResourceBucketSpaceGetResponse'), + 'ResourceDirectorySpace': __LazyModelLoader('..._common.models.resource_directory_space_v_2_50', 'ResourceDirectorySpace'), + 'ResourceDirectorySpaceGetResponse': __LazyModelLoader('..._common.models.resource_directory_space_get_response_v_2_50', 'ResourceDirectorySpaceGetResponse'), + 'ResourceFixedNonUniqueName': __LazyModelLoader('..._common.models.resource_fixed_non_unique_name_v_2_2', 'ResourceFixedNonUniqueName'), + 'ResourceNoId': __LazyModelLoader('..._common.models.resource_no_id_v_2_0', 'ResourceNoId'), + 'ResourceObjectStoreAccountSpace': __LazyModelLoader('..._common.models.resource_object_store_account_space_v_2_52', 'ResourceObjectStoreAccountSpace'), + 'ResourceObjectStoreAccountSpaceGetResponse': __LazyModelLoader('..._common.models.resource_object_store_account_space_get_response_v_2_52', 'ResourceObjectStoreAccountSpaceGetResponse'), + 'ResourcePerformance': __LazyModelLoader('..._common.models.resource_performance_v_2_52', 'ResourcePerformance'), + 'ResourcePerformanceByArray': __LazyModelLoader('..._common.models.resource_performance_by_array_v_2_52', 'ResourcePerformanceByArray'), + 'ResourcePerformanceByArrayGetResponse': __LazyModelLoader('..._common.models.resource_performance_by_array_get_response_v_2_52', 'ResourcePerformanceByArrayGetResponse'), + 'ResourcePerformanceGetResponse': __LazyModelLoader('..._common.models.resource_performance_get_response_v_2_52', 'ResourcePerformanceGetResponse'), + 'ResourcePerformanceNoId': __LazyModelLoader('..._common.models.resource_performance_no_id_v_2_52', 'ResourcePerformanceNoId'), + 'ResourcePerformanceNoIdByArray': __LazyModelLoader('..._common.models.resource_performance_no_id_by_array_v_2_52', 'ResourcePerformanceNoIdByArray'), + 'ResourcePerformanceNoIdByArrayGetResponse': __LazyModelLoader('..._common.models.resource_performance_no_id_by_array_get_response_v_2_52', 'ResourcePerformanceNoIdByArrayGetResponse'), + 'ResourcePerformanceNoIdGetResponse': __LazyModelLoader('..._common.models.resource_performance_no_id_get_response_v_2_52', 'ResourcePerformanceNoIdGetResponse'), + 'ResourcePodSpace': __LazyModelLoader('..._common.models.resource_pod_space_v_2_50', 'ResourcePodSpace'), + 'ResourcePodSpaceGetResponse': __LazyModelLoader('..._common.models.resource_pod_space_get_response_v_2_50', 'ResourcePodSpaceGetResponse'), + 'ResourceRealmSpace': __LazyModelLoader('..._common.models.resource_realm_space_v_2_50', 'ResourceRealmSpace'), + 'ResourceSpace': __LazyModelLoader('..._common.models.resource_space_v_2_50', 'ResourceSpace'), + 'ResourceSpaceGetResponse': __LazyModelLoader('..._common.models.resource_space_get_response_v_2_50', 'ResourceSpaceGetResponse'), + 'ResourceSpaceNoId': __LazyModelLoader('..._common.models.resource_space_no_id_v_2_50', 'ResourceSpaceNoId'), + 'ResourceSpaceNoIdGetResponse': __LazyModelLoader('..._common.models.resource_space_no_id_get_response_v_2_50', 'ResourceSpaceNoIdGetResponse'), + 'RetentionPolicy': __LazyModelLoader('..._common.models.retention_policy_v_2_47', 'RetentionPolicy'), + 'Saml2Sso': __LazyModelLoader('..._common.models.saml2_sso_v_2_52', 'Saml2Sso'), + 'Saml2SsoGetResponse': __LazyModelLoader('..._common.models.saml2_sso_get_response_v_2_52', 'Saml2SsoGetResponse'), + 'Saml2SsoIdp': __LazyModelLoader('..._common.models.saml2_sso_idp_v_2_11', 'Saml2SsoIdp'), + 'Saml2SsoManagement': __LazyModelLoader('..._common.models.saml2_sso_management_v_2_52', 'Saml2SsoManagement'), + 'Saml2SsoPatch': __LazyModelLoader('..._common.models.saml2_sso_patch_v_2_52', 'Saml2SsoPatch'), + 'Saml2SsoPost': __LazyModelLoader('..._common.models.saml2_sso_post_v_2_52', 'Saml2SsoPost'), + 'Saml2SsoResponse': __LazyModelLoader('..._common.models.saml2_sso_response_v_2_52', 'Saml2SsoResponse'), + 'Saml2SsoSp': __LazyModelLoader('..._common.models.saml2_sso_sp_v_2_52', 'Saml2SsoSp'), + 'Saml2SsoSpCredential': __LazyModelLoader('..._common.models.saml2_sso_sp_credential_v_2_52', 'Saml2SsoSpCredential'), + 'Server': __LazyModelLoader('..._common.models.server_v_2_55', 'Server'), + 'ServerGetResponse': __LazyModelLoader('..._common.models.server_get_response_v_2_55', 'ServerGetResponse'), + 'ServerPatch': __LazyModelLoader('..._common.models.server_patch_v_2_49', 'ServerPatch'), + 'ServerPost': __LazyModelLoader('..._common.models.server_post_v_2_49', 'ServerPost'), + 'ServerReference': __LazyModelLoader('..._common.models.server_reference_v_2_50', 'ServerReference'), + 'ServerResponse': __LazyModelLoader('..._common.models.server_response_v_2_55', 'ServerResponse'), + 'Session': __LazyModelLoader('..._common.models.session_v_2_4', 'Session'), + 'SessionGetResponse': __LazyModelLoader('..._common.models.session_get_response_v_2_4', 'SessionGetResponse'), + 'Smis': __LazyModelLoader('..._common.models.smis_v_2_2', 'Smis'), + 'SmisGetResponse': __LazyModelLoader('..._common.models.smis_get_response_v_2_2', 'SmisGetResponse'), + 'SmisResponse': __LazyModelLoader('..._common.models.smis_response_v_2_2', 'SmisResponse'), + 'SmtpServer': __LazyModelLoader('..._common.models.smtp_server_v_2_33', 'SmtpServer'), + 'SmtpServerGetResponse': __LazyModelLoader('..._common.models.smtp_server_get_response_v_2_33', 'SmtpServerGetResponse'), + 'SmtpServerResponse': __LazyModelLoader('..._common.models.smtp_server_response_v_2_33', 'SmtpServerResponse'), + 'Snapshot': __LazyModelLoader('..._common.models.snapshot_v_2_49', 'Snapshot'), + 'SnapshotSchedule': __LazyModelLoader('..._common.models.snapshot_schedule_v_2_1', 'SnapshotSchedule'), + 'SnapshotSpace': __LazyModelLoader('..._common.models.snapshot_space_v_2_50', 'SnapshotSpace'), + 'SnmpAgent': __LazyModelLoader('..._common.models.snmp_agent_v_2_4', 'SnmpAgent'), + 'SnmpAgentGetResponse': __LazyModelLoader('..._common.models.snmp_agent_get_response_v_2_4', 'SnmpAgentGetResponse'), + 'SnmpAgentMib': __LazyModelLoader('..._common.models.snmp_agent_mib_v_2_4', 'SnmpAgentMib'), + 'SnmpAgentMibGetResponse': __LazyModelLoader('..._common.models.snmp_agent_mib_get_response_v_2_4', 'SnmpAgentMibGetResponse'), + 'SnmpAgentMibResponse': __LazyModelLoader('..._common.models.snmp_agent_mib_response_v_2_4', 'SnmpAgentMibResponse'), + 'SnmpAgentPatch': __LazyModelLoader('..._common.models.snmp_agent_patch_v_2_4', 'SnmpAgentPatch'), + 'SnmpAgentResponse': __LazyModelLoader('..._common.models.snmp_agent_response_v_2_4', 'SnmpAgentResponse'), + 'SnmpManager': __LazyModelLoader('..._common.models.snmp_manager_v_2_4', 'SnmpManager'), + 'SnmpManagerGetResponse': __LazyModelLoader('..._common.models.snmp_manager_get_response_v_2_4', 'SnmpManagerGetResponse'), + 'SnmpManagerPatch': __LazyModelLoader('..._common.models.snmp_manager_patch_v_2_4', 'SnmpManagerPatch'), + 'SnmpManagerPost': __LazyModelLoader('..._common.models.snmp_manager_post_v_2_4', 'SnmpManagerPost'), + 'SnmpManagerResponse': __LazyModelLoader('..._common.models.snmp_manager_response_v_2_4', 'SnmpManagerResponse'), + 'SnmpV2c': __LazyModelLoader('..._common.models.snmp_v2c_v_2_4', 'SnmpV2c'), + 'SnmpV3': __LazyModelLoader('..._common.models.snmp_v3_v_2_4', 'SnmpV3'), + 'SnmpV3Patch': __LazyModelLoader('..._common.models.snmp_v3_patch_v_2_4', 'SnmpV3Patch'), + 'SnmpV3Post': __LazyModelLoader('..._common.models.snmp_v3_post_v_2_4', 'SnmpV3Post'), + 'Software': __LazyModelLoader('..._common.models.software_v_2_9', 'Software'), + 'SoftwareBundle': __LazyModelLoader('..._common.models.software_bundle_v_2_51', 'SoftwareBundle'), + 'SoftwareBundleGetResponse': __LazyModelLoader('..._common.models.software_bundle_get_response_v_2_51', 'SoftwareBundleGetResponse'), + 'SoftwareBundlePost': __LazyModelLoader('..._common.models.software_bundle_post_v_2_5', 'SoftwareBundlePost'), + 'SoftwareBundleResponse': __LazyModelLoader('..._common.models.software_bundle_response_v_2_51', 'SoftwareBundleResponse'), + 'SoftwareCheck': __LazyModelLoader('..._common.models.software_check_v_2_9', 'SoftwareCheck'), + 'SoftwareChecksChecks': __LazyModelLoader('..._common.models.software_checks_checks_v_2_9', 'SoftwareChecksChecks'), + 'SoftwareChecksGetResponse': __LazyModelLoader('..._common.models.software_checks_get_response_v_2_9', 'SoftwareChecksGetResponse'), + 'SoftwareChecksResponse': __LazyModelLoader('..._common.models.software_checks_response_v_2_9', 'SoftwareChecksResponse'), + 'SoftwareGetResponse': __LazyModelLoader('..._common.models.software_get_response_v_2_9', 'SoftwareGetResponse'), + 'SoftwareInstallation': __LazyModelLoader('..._common.models.software_installation_v_2_49', 'SoftwareInstallation'), + 'SoftwareInstallationPatch': __LazyModelLoader('..._common.models.software_installation_patch_v_2_4', 'SoftwareInstallationPatch'), + 'SoftwareInstallationPost': __LazyModelLoader('..._common.models.software_installation_post_v_2_37', 'SoftwareInstallationPost'), + 'SoftwareInstallationStep': __LazyModelLoader('..._common.models.software_installation_step_v_2_49', 'SoftwareInstallationStep'), + 'SoftwareInstallationStepsChecks': __LazyModelLoader('..._common.models.software_installation_steps_checks_v_2_2', 'SoftwareInstallationStepsChecks'), + 'SoftwareInstallationStepsGetResponse': __LazyModelLoader('..._common.models.software_installation_steps_get_response_v_2_49', 'SoftwareInstallationStepsGetResponse'), + 'SoftwareInstallationStepsResponse': __LazyModelLoader('..._common.models.software_installation_steps_response_v_2_49', 'SoftwareInstallationStepsResponse'), + 'SoftwareInstallationsGetResponse': __LazyModelLoader('..._common.models.software_installations_get_response_v_2_49', 'SoftwareInstallationsGetResponse'), + 'SoftwareInstallationsResponse': __LazyModelLoader('..._common.models.software_installations_response_v_2_49', 'SoftwareInstallationsResponse'), + 'SoftwarePatch': __LazyModelLoader('..._common.models.software_patch_v_2_29', 'SoftwarePatch'), + 'SoftwarePatchesGetResponse': __LazyModelLoader('..._common.models.software_patches_get_response_v_2_29', 'SoftwarePatchesGetResponse'), + 'SoftwarePatchesResponse': __LazyModelLoader('..._common.models.software_patches_response_v_2_29', 'SoftwarePatchesResponse'), + 'SoftwarePost': __LazyModelLoader('..._common.models.software_post_v_2_9', 'SoftwarePost'), + 'SoftwareResponse': __LazyModelLoader('..._common.models.software_response_v_2_9', 'SoftwareResponse'), + 'SoftwareUpgradePlan': __LazyModelLoader('..._common.models.software_upgrade_plan_v_2_4', 'SoftwareUpgradePlan'), + 'SoftwareVersion': __LazyModelLoader('..._common.models.software_version_v_2_9', 'SoftwareVersion'), + 'SoftwareVersionsGetResponse': __LazyModelLoader('..._common.models.software_versions_get_response_v_2_9', 'SoftwareVersionsGetResponse'), + 'SoftwareVersionsResponse': __LazyModelLoader('..._common.models.software_versions_response_v_2_9', 'SoftwareVersionsResponse'), + 'Space': __LazyModelLoader('..._common.models.space_v_2_50', 'Space'), + 'SpaceNoDeprecatedPhysicalOrEffective': __LazyModelLoader('..._common.models.space_no_deprecated_physical_or_effective_v_2_50', 'SpaceNoDeprecatedPhysicalOrEffective'), + 'StartEndTime': __LazyModelLoader('..._common.models.start_end_time_v_2_2', 'StartEndTime'), + 'StorageClassMember': __LazyModelLoader('..._common.models.storage_class_member_v_2_56', 'StorageClassMember'), + 'StorageClassesMemberResponse': __LazyModelLoader('..._common.models.storage_classes_member_response_v_2_56', 'StorageClassesMemberResponse'), + 'StorageClassesMembersGetResponse': __LazyModelLoader('..._common.models.storage_classes_members_get_response_v_2_56', 'StorageClassesMembersGetResponse'), + 'StretchedTagPod': __LazyModelLoader('..._common.models.stretched_tag_pod_v_2_50', 'StretchedTagPod'), + 'StretchedTagRealm': __LazyModelLoader('..._common.models.stretched_tag_realm_v_2_50', 'StretchedTagRealm'), + 'StretchedTagRemoteArrayStatus': __LazyModelLoader('..._common.models.stretched_tag_remote_array_status_v_2_50', 'StretchedTagRemoteArrayStatus'), + 'Subnet': __LazyModelLoader('..._common.models.subnet_v_2_55', 'Subnet'), + 'SubnetGetResponse': __LazyModelLoader('..._common.models.subnet_get_response_v_2_55', 'SubnetGetResponse'), + 'SubnetPatch': __LazyModelLoader('..._common.models.subnet_patch_v_2_2', 'SubnetPatch'), + 'SubnetPost': __LazyModelLoader('..._common.models.subnet_post_v_2_2', 'SubnetPost'), + 'SubnetResponse': __LazyModelLoader('..._common.models.subnet_response_v_2_55', 'SubnetResponse'), + 'Subscription': __LazyModelLoader('..._common.models.subscription_v_2_26', 'Subscription'), + 'SubscriptionAsset': __LazyModelLoader('..._common.models.subscription_asset_v_2_49', 'SubscriptionAsset'), + 'SubscriptionAssetGetResponse': __LazyModelLoader('..._common.models.subscription_asset_get_response_v_2_49', 'SubscriptionAssetGetResponse'), + 'SubscriptionAssetResponse': __LazyModelLoader('..._common.models.subscription_asset_response_v_2_49', 'SubscriptionAssetResponse'), + 'SubscriptionAssetSubscription': __LazyModelLoader('..._common.models.subscription_asset_subscription_v_2_26', 'SubscriptionAssetSubscription'), + 'SubscriptionGetResponse': __LazyModelLoader('..._common.models.subscription_get_response_v_2_26', 'SubscriptionGetResponse'), + 'SubscriptionResponse': __LazyModelLoader('..._common.models.subscription_response_v_2_26', 'SubscriptionResponse'), + 'Support': __LazyModelLoader('..._common.models.support_v_2_47', 'Support'), + 'SupportDiagnosticsDetails': __LazyModelLoader('..._common.models.support_diagnostics_details_v_2_41', 'SupportDiagnosticsDetails'), + 'SupportDiagnosticsDetailsGetResponse': __LazyModelLoader('..._common.models.support_diagnostics_details_get_response_v_2_41', 'SupportDiagnosticsDetailsGetResponse'), + 'SupportDiagnosticsDetailsResponse': __LazyModelLoader('..._common.models.support_diagnostics_details_response_v_2_41', 'SupportDiagnosticsDetailsResponse'), + 'SupportDiagnosticsGetResponse': __LazyModelLoader('..._common.models.support_diagnostics_get_response_v_2_36', 'SupportDiagnosticsGetResponse'), + 'SupportDiagnosticsResponse': __LazyModelLoader('..._common.models.support_diagnostics_response_v_2_36', 'SupportDiagnosticsResponse'), + 'SupportDiagnosticsSettings': __LazyModelLoader('..._common.models.support_diagnostics_settings_v_2_36', 'SupportDiagnosticsSettings'), + 'SupportGetResponse': __LazyModelLoader('..._common.models.support_get_response_v_2_47', 'SupportGetResponse'), + 'SupportPatch': __LazyModelLoader('..._common.models.support_patch_v_2_47', 'SupportPatch'), + 'SupportRemoteAssistPaths': __LazyModelLoader('..._common.models.support_remote_assist_paths_v_2_2', 'SupportRemoteAssistPaths'), + 'SupportRemoteAssistSessions': __LazyModelLoader('..._common.models.support_remote_assist_sessions_v_2_41', 'SupportRemoteAssistSessions'), + 'SupportRemoteAssistSessionsGetResponse': __LazyModelLoader('..._common.models.support_remote_assist_sessions_get_response_v_2_41', 'SupportRemoteAssistSessionsGetResponse'), + 'SupportRemoteAssistSessionsPatch': __LazyModelLoader('..._common.models.support_remote_assist_sessions_patch_v_2_41', 'SupportRemoteAssistSessionsPatch'), + 'SupportRemoteAssistSessionsPaths': __LazyModelLoader('..._common.models.support_remote_assist_sessions_paths_v_2_41', 'SupportRemoteAssistSessionsPaths'), + 'SupportRemoteAssistSessionsResponse': __LazyModelLoader('..._common.models.support_remote_assist_sessions_response_v_2_41', 'SupportRemoteAssistSessionsResponse'), + 'SupportRemoteAssistSessionsSettings': __LazyModelLoader('..._common.models.support_remote_assist_sessions_settings_v_2_41', 'SupportRemoteAssistSessionsSettings'), + 'SupportRemoteAssistSessionsSettingsGetResponse': __LazyModelLoader('..._common.models.support_remote_assist_sessions_settings_get_response_v_2_41', 'SupportRemoteAssistSessionsSettingsGetResponse'), + 'SupportRemoteAssistSessionsSettingsResponse': __LazyModelLoader('..._common.models.support_remote_assist_sessions_settings_response_v_2_41', 'SupportRemoteAssistSessionsSettingsResponse'), + 'SupportResponse': __LazyModelLoader('..._common.models.support_response_v_2_47', 'SupportResponse'), + 'SupportSystemManifest': __LazyModelLoader('..._common.models.support_system_manifest_v_2_51', 'SupportSystemManifest'), + 'SupportSystemManifestResponse': __LazyModelLoader('..._common.models.support_system_manifest_response_v_2_51', 'SupportSystemManifestResponse'), + 'SyslogServer': __LazyModelLoader('..._common.models.syslog_server_v_2_50', 'SyslogServer'), + 'SyslogServerGetResponse': __LazyModelLoader('..._common.models.syslog_server_get_response_v_2_50', 'SyslogServerGetResponse'), + 'SyslogServerResponse': __LazyModelLoader('..._common.models.syslog_server_response_v_2_50', 'SyslogServerResponse'), + 'SyslogServerSettings': __LazyModelLoader('..._common.models.syslog_server_settings_v_2_50', 'SyslogServerSettings'), + 'SyslogServerSettingsGetResponse': __LazyModelLoader('..._common.models.syslog_server_settings_get_response_v_2_50', 'SyslogServerSettingsGetResponse'), + 'SyslogServerSettingsResponse': __LazyModelLoader('..._common.models.syslog_server_settings_response_v_2_50', 'SyslogServerSettingsResponse'), + 'Tag': __LazyModelLoader('..._common.models.tag_v_2_50', 'Tag'), + 'TagBatch': __LazyModelLoader('..._common.models.tag_batch_v_2_49', 'TagBatch'), + 'TagGetResponse': __LazyModelLoader('..._common.models.tag_get_response_v_2_50', 'TagGetResponse'), + 'TagResponse': __LazyModelLoader('..._common.models.tag_response_v_2_50', 'TagResponse'), + 'TargetProtectionGroup': __LazyModelLoader('..._common.models.target_protection_group_v_2_54', 'TargetProtectionGroup'), + 'TargetProtectionGroupPostPatch': __LazyModelLoader('..._common.models.target_protection_group_post_patch_v_2_49', 'TargetProtectionGroupPostPatch'), + 'TestGetResultWithResourceErrorContextMultiserverAwareResponse': __LazyModelLoader('..._common.models.test_get_result_with_resource_error_context_multiserver_aware_response_v_2_52', 'TestGetResultWithResourceErrorContextMultiserverAwareResponse'), + 'TestPatchResultWithResourceMultiserverAwareResponse': __LazyModelLoader('..._common.models.test_patch_result_with_resource_multiserver_aware_response_v_2_52', 'TestPatchResultWithResourceMultiserverAwareResponse'), + 'TestResult': __LazyModelLoader('..._common.models.test_result_v_2_2', 'TestResult'), + 'TestResultGetResponse': __LazyModelLoader('..._common.models.test_result_get_response_v_2_2', 'TestResultGetResponse'), + 'TestResultResponse': __LazyModelLoader('..._common.models.test_result_response_v_2_2', 'TestResultResponse'), + 'TestResultWithNoIdResourceMultiserverAware': __LazyModelLoader('..._common.models.test_result_with_no_id_resource_multiserver_aware_v_2_52', 'TestResultWithNoIdResourceMultiserverAware'), + 'TestResultWithResource': __LazyModelLoader('..._common.models.test_result_with_resource_v_2_50', 'TestResultWithResource'), + 'TestResultWithResourceAndErrorContextPartialResourceResponse': __LazyModelLoader('..._common.models.test_result_with_resource_and_error_context_partial_resource_response_v_2_52', 'TestResultWithResourceAndErrorContextPartialResourceResponse'), + 'TestResultWithResourceGetResponse': __LazyModelLoader('..._common.models.test_result_with_resource_get_response_v_2_50', 'TestResultWithResourceGetResponse'), + 'TestResultWithResourcePatchResponse': __LazyModelLoader('..._common.models.test_result_with_resource_patch_response_v_2_50', 'TestResultWithResourcePatchResponse'), + 'TestResultWithResourcePostResponse': __LazyModelLoader('..._common.models.test_result_with_resource_post_response_v_2_50', 'TestResultWithResourcePostResponse'), + 'TestResultWithResourceResponse': __LazyModelLoader('..._common.models.test_result_with_resource_response_v_2_50', 'TestResultWithResourceResponse'), + 'TestResultWithResourceWithId': __LazyModelLoader('..._common.models.test_result_with_resource_with_id_v_2_50', 'TestResultWithResourceWithId'), + 'TestResultWithResourceWithIdPostResponse': __LazyModelLoader('..._common.models.test_result_with_resource_with_id_post_response_v_2_50', 'TestResultWithResourceWithIdPostResponse'), + 'Tgroup': __LazyModelLoader('..._common.models.tgroup_v_2_54', 'Tgroup'), + 'TgroupGetResponse': __LazyModelLoader('..._common.models.tgroup_get_response_v_2_54', 'TgroupGetResponse'), + 'TgroupMember': __LazyModelLoader('..._common.models.tgroup_member_v_2_54', 'TgroupMember'), + 'TgroupMemberGetResponse': __LazyModelLoader('..._common.models.tgroup_member_get_response_v_2_54', 'TgroupMemberGetResponse'), + 'TgroupMemberResponse': __LazyModelLoader('..._common.models.tgroup_member_response_v_2_54', 'TgroupMemberResponse'), + 'TgroupMembersPost': __LazyModelLoader('..._common.models.tgroup_members_post_v_2_54', 'TgroupMembersPost'), + 'TgroupMembersPostMember': __LazyModelLoader('..._common.models.tgroup_members_post_member_v_2_54', 'TgroupMembersPostMember'), + 'TgroupPatch': __LazyModelLoader('..._common.models.tgroup_patch_v_2_54', 'TgroupPatch'), + 'TgroupResponse': __LazyModelLoader('..._common.models.tgroup_response_v_2_54', 'TgroupResponse'), + 'Throttle': __LazyModelLoader('..._common.models.throttle_v_2_4', 'Throttle'), + 'ThrottleDeprecated': __LazyModelLoader('..._common.models.throttle_deprecated_v_2_33', 'ThrottleDeprecated'), + 'TimeWindow': __LazyModelLoader('..._common.models.time_window_v_2_1', 'TimeWindow'), + 'TotalItemCountResponse': __LazyModelLoader('..._common.models.total_item_count_response_v_2_4', 'TotalItemCountResponse'), + 'Transfer': __LazyModelLoader('..._common.models.transfer_v_2_1', 'Transfer'), + 'UpgradeParameters': __LazyModelLoader('..._common.models.upgrade_parameters_v_2_37', 'UpgradeParameters'), + 'UserGroup': __LazyModelLoader('..._common.models.user_group_v_2_44', 'UserGroup'), + 'UserGroupQuotaLimitedBy': __LazyModelLoader('..._common.models.user_group_quota_limited_by_v_2_49', 'UserGroupQuotaLimitedBy'), + 'UserGroupSpace': __LazyModelLoader('..._common.models.user_group_space_v_2_44', 'UserGroupSpace'), + 'Username': __LazyModelLoader('..._common.models.username_v_2_0', 'Username'), + 'UsernameResponse': __LazyModelLoader('..._common.models.username_response_v_2_0', 'UsernameResponse'), + 'Vchost': __LazyModelLoader('..._common.models.vchost_v_2_49', 'Vchost'), + 'VchostCertificate': __LazyModelLoader('..._common.models.vchost_certificate_v_2_55', 'VchostCertificate'), + 'VchostCertificateGetResponse': __LazyModelLoader('..._common.models.vchost_certificate_get_response_v_2_55', 'VchostCertificateGetResponse'), + 'VchostCertificatePatch': __LazyModelLoader('..._common.models.vchost_certificate_patch_v_2_26', 'VchostCertificatePatch'), + 'VchostCertificatePost': __LazyModelLoader('..._common.models.vchost_certificate_post_v_2_55', 'VchostCertificatePost'), + 'VchostCertificateResponse': __LazyModelLoader('..._common.models.vchost_certificate_response_v_2_55', 'VchostCertificateResponse'), + 'VchostConnection': __LazyModelLoader('..._common.models.vchost_connection_v_2_49', 'VchostConnection'), + 'VchostConnectionGetResponse': __LazyModelLoader('..._common.models.vchost_connection_get_response_v_2_49', 'VchostConnectionGetResponse'), + 'VchostConnectionResponse': __LazyModelLoader('..._common.models.vchost_connection_response_v_2_49', 'VchostConnectionResponse'), + 'VchostEndpoint': __LazyModelLoader('..._common.models.vchost_endpoint_v_2_55', 'VchostEndpoint'), + 'VchostEndpointGetResponse': __LazyModelLoader('..._common.models.vchost_endpoint_get_response_v_2_55', 'VchostEndpointGetResponse'), + 'VchostEndpointPatch': __LazyModelLoader('..._common.models.vchost_endpoint_patch_v_2_55', 'VchostEndpointPatch'), + 'VchostEndpointPost': __LazyModelLoader('..._common.models.vchost_endpoint_post_v_2_55', 'VchostEndpointPost'), + 'VchostEndpointResponse': __LazyModelLoader('..._common.models.vchost_endpoint_response_v_2_55', 'VchostEndpointResponse'), + 'VchostGetResponse': __LazyModelLoader('..._common.models.vchost_get_response_v_2_49', 'VchostGetResponse'), + 'VchostPatch': __LazyModelLoader('..._common.models.vchost_patch_v_2_26', 'VchostPatch'), + 'VchostPost': __LazyModelLoader('..._common.models.vchost_post_v_2_26', 'VchostPost'), + 'VchostResponse': __LazyModelLoader('..._common.models.vchost_response_v_2_49', 'VchostResponse'), + 'VirtualMachine': __LazyModelLoader('..._common.models.virtual_machine_v_2_49', 'VirtualMachine'), + 'VirtualMachineGetResponse': __LazyModelLoader('..._common.models.virtual_machine_get_response_v_2_49', 'VirtualMachineGetResponse'), + 'VirtualMachinePost': __LazyModelLoader('..._common.models.virtual_machine_post_v_2_49', 'VirtualMachinePost'), + 'VirtualMachineResponse': __LazyModelLoader('..._common.models.virtual_machine_response_v_2_49', 'VirtualMachineResponse'), + 'VirtualMachineVolumeSnapshot': __LazyModelLoader('..._common.models.virtual_machine_volume_snapshot_v_2_49', 'VirtualMachineVolumeSnapshot'), + 'VirtualMachineVolumeSnapshotResponse': __LazyModelLoader('..._common.models.virtual_machine_volume_snapshot_response_v_2_49', 'VirtualMachineVolumeSnapshotResponse'), + 'Volume': __LazyModelLoader('..._common.models.volume_v_2_55', 'Volume'), + 'VolumeBatchPost': __LazyModelLoader('..._common.models.volume_batch_post_v_2_50', 'VolumeBatchPost'), + 'VolumeCommon': __LazyModelLoader('..._common.models.volume_common_v_2_50', 'VolumeCommon'), + 'VolumeDiff': __LazyModelLoader('..._common.models.volume_diff_v_2_50', 'VolumeDiff'), + 'VolumeGetResponse': __LazyModelLoader('..._common.models.volume_get_response_v_2_55', 'VolumeGetResponse'), + 'VolumeGroup': __LazyModelLoader('..._common.models.volume_group_v_2_51', 'VolumeGroup'), + 'VolumeGroupGetResponse': __LazyModelLoader('..._common.models.volume_group_get_response_v_2_51', 'VolumeGroupGetResponse'), + 'VolumeGroupPatch': __LazyModelLoader('..._common.models.volume_group_patch_v_2_52', 'VolumeGroupPatch'), + 'VolumeGroupPost': __LazyModelLoader('..._common.models.volume_group_post_v_2_50', 'VolumeGroupPost'), + 'VolumeGroupQosGetResponse': __LazyModelLoader('..._common.models.volume_group_qos_get_response_v_2_50', 'VolumeGroupQosGetResponse'), + 'VolumeGroupResponse': __LazyModelLoader('..._common.models.volume_group_response_v_2_51', 'VolumeGroupResponse'), + 'VolumePatch': __LazyModelLoader('..._common.models.volume_patch_v_2_55', 'VolumePatch'), + 'VolumePost': __LazyModelLoader('..._common.models.volume_post_v_2_55', 'VolumePost'), + 'VolumePostBase': __LazyModelLoader('..._common.models.volume_post_base_v_2_50', 'VolumePostBase'), + 'VolumeQosGetResponse': __LazyModelLoader('..._common.models.volume_qos_get_response_v_2_50', 'VolumeQosGetResponse'), + 'VolumeResponse': __LazyModelLoader('..._common.models.volume_response_v_2_55', 'VolumeResponse'), + 'VolumeSnapshot': __LazyModelLoader('..._common.models.volume_snapshot_v_2_50', 'VolumeSnapshot'), + 'VolumeSnapshotBatchPost': __LazyModelLoader('..._common.models.volume_snapshot_batch_post_v_2_50', 'VolumeSnapshotBatchPost'), + 'VolumeSnapshotBatchResponse': __LazyModelLoader('..._common.models.volume_snapshot_batch_response_v_2_50', 'VolumeSnapshotBatchResponse'), + 'VolumeSnapshotGetResponse': __LazyModelLoader('..._common.models.volume_snapshot_get_response_v_2_50', 'VolumeSnapshotGetResponse'), + 'VolumeSnapshotPatch': __LazyModelLoader('..._common.models.volume_snapshot_patch_v_2_0', 'VolumeSnapshotPatch'), + 'VolumeSnapshotPost': __LazyModelLoader('..._common.models.volume_snapshot_post_v_2_50', 'VolumeSnapshotPost'), + 'VolumeSnapshotResponse': __LazyModelLoader('..._common.models.volume_snapshot_response_v_2_50', 'VolumeSnapshotResponse'), + 'VolumeSnapshotTransfer': __LazyModelLoader('..._common.models.volume_snapshot_transfer_v_2_50', 'VolumeSnapshotTransfer'), + 'VolumeSnapshotTransferGetResponse': __LazyModelLoader('..._common.models.volume_snapshot_transfer_get_response_v_2_50', 'VolumeSnapshotTransferGetResponse'), + 'VolumeSnapshotTransferResponse': __LazyModelLoader('..._common.models.volume_snapshot_transfer_response_v_2_50', 'VolumeSnapshotTransferResponse'), + 'VolumeSpace': __LazyModelLoader('..._common.models.volume_space_v_2_50', 'VolumeSpace'), + 'VolumeSpaceCommon': __LazyModelLoader('..._common.models.volume_space_common_v_2_50', 'VolumeSpaceCommon'), + 'VolumeSpaceGetResponse': __LazyModelLoader('..._common.models.volume_space_get_response_v_2_50', 'VolumeSpaceGetResponse'), + 'VolumesBatchResponse': __LazyModelLoader('..._common.models.volumes_batch_response_v_2_55', 'VolumesBatchResponse'), + 'VolumesDiffGetResponse': __LazyModelLoader('..._common.models.volumes_diff_get_response_v_2_50', 'VolumesDiffGetResponse'), + 'VolumesDiffResponse': __LazyModelLoader('..._common.models.volumes_diff_response_v_2_50', 'VolumesDiffResponse'), + 'Workload': __LazyModelLoader('..._common.models.workload_v_2_50', 'Workload'), + 'WorkloadConfigurationFixedReference': __LazyModelLoader('..._common.models.workload_configuration_fixed_reference_v_2_51', 'WorkloadConfigurationFixedReference'), + 'WorkloadConfigurationReference': __LazyModelLoader('..._common.models.workload_configuration_reference_v_2_55', 'WorkloadConfigurationReference'), + 'WorkloadConfigurationReferencePatch': __LazyModelLoader('..._common.models.workload_configuration_reference_patch_v_2_55', 'WorkloadConfigurationReferencePatch'), + 'WorkloadConfigurationReferencePost': __LazyModelLoader('..._common.models.workload_configuration_reference_post_v_2_55', 'WorkloadConfigurationReferencePost'), + 'WorkloadGetResponse': __LazyModelLoader('..._common.models.workload_get_response_v_2_50', 'WorkloadGetResponse'), + 'WorkloadParameter': __LazyModelLoader('..._common.models.workload_parameter_v_2_40', 'WorkloadParameter'), + 'WorkloadParameterValue': __LazyModelLoader('..._common.models.workload_parameter_value_v_2_40', 'WorkloadParameterValue'), + 'WorkloadParameterValueResourceReference': __LazyModelLoader('..._common.models.workload_parameter_value_resource_reference_v_2_40', 'WorkloadParameterValueResourceReference'), + 'WorkloadPatch': __LazyModelLoader('..._common.models.workload_patch_v_2_40', 'WorkloadPatch'), + 'WorkloadPlacementRecommendation': __LazyModelLoader('..._common.models.workload_placement_recommendation_v_2_54', 'WorkloadPlacementRecommendation'), + 'WorkloadPlacementRecommendationAdditionalConstraints': __LazyModelLoader('..._common.models.workload_placement_recommendation_additional_constraints_v_2_54', 'WorkloadPlacementRecommendationAdditionalConstraints'), + 'WorkloadPlacementRecommendationGenericTarget': __LazyModelLoader('..._common.models.workload_placement_recommendation_generic_target_v_2_54', 'WorkloadPlacementRecommendationGenericTarget'), + 'WorkloadPlacementRecommendationGetResponse': __LazyModelLoader('..._common.models.workload_placement_recommendation_get_response_v_2_55', 'WorkloadPlacementRecommendationGetResponse'), + 'WorkloadPlacementRecommendationParameter': __LazyModelLoader('..._common.models.workload_placement_recommendation_parameter_v_2_51', 'WorkloadPlacementRecommendationParameter'), + 'WorkloadPlacementRecommendationParameterConstraints': __LazyModelLoader('..._common.models.workload_placement_recommendation_parameter_constraints_v_2_51', 'WorkloadPlacementRecommendationParameterConstraints'), + 'WorkloadPlacementRecommendationParameterResourceReference': __LazyModelLoader('..._common.models.workload_placement_recommendation_parameter_resource_reference_v_2_51', 'WorkloadPlacementRecommendationParameterResourceReference'), + 'WorkloadPlacementRecommendationPlacement': __LazyModelLoader('..._common.models.workload_placement_recommendation_placement_v_2_54', 'WorkloadPlacementRecommendationPlacement'), + 'WorkloadPlacementRecommendationProjection': __LazyModelLoader('..._common.models.workload_placement_recommendation_projection_v_2_40', 'WorkloadPlacementRecommendationProjection'), + 'WorkloadPlacementRecommendationResourceReference': __LazyModelLoader('..._common.models.workload_placement_recommendation_resource_reference_v_2_54', 'WorkloadPlacementRecommendationResourceReference'), + 'WorkloadPlacementRecommendationResponse': __LazyModelLoader('..._common.models.workload_placement_recommendation_response_v_2_54', 'WorkloadPlacementRecommendationResponse'), + 'WorkloadPlacementRecommendationResult': __LazyModelLoader('..._common.models.workload_placement_recommendation_result_v_2_54', 'WorkloadPlacementRecommendationResult'), + 'WorkloadPlacementRecommendationTarget': __LazyModelLoader('..._common.models.workload_placement_recommendation_target_v_2_54', 'WorkloadPlacementRecommendationTarget'), + 'WorkloadPlacementRecommendationTargetCapacityUsedProjections': __LazyModelLoader('..._common.models.workload_placement_recommendation_target_capacity_used_projections_v_2_47', 'WorkloadPlacementRecommendationTargetCapacityUsedProjections'), + 'WorkloadPlacementRecommendationTargetLoadProjections': __LazyModelLoader('..._common.models.workload_placement_recommendation_target_load_projections_v_2_47', 'WorkloadPlacementRecommendationTargetLoadProjections'), + 'WorkloadPlacementRecommendationWarning': __LazyModelLoader('..._common.models.workload_placement_recommendation_warning_v_2_40', 'WorkloadPlacementRecommendationWarning'), + 'WorkloadPost': __LazyModelLoader('..._common.models.workload_post_v_2_40', 'WorkloadPost'), + 'WorkloadPreset': __LazyModelLoader('..._common.models.workload_preset_v_2_49', 'WorkloadPreset'), + 'WorkloadResponse': __LazyModelLoader('..._common.models.workload_response_v_2_50', 'WorkloadResponse'), +} + +def __getattr__(name, default=None): + if '_models_list' == name: + return __class_model_dict.keys() + if name not in __class_model_dict: + return None + return __class_model_dict[name].load() + +__all__ = ['ActiveDirectory', 'ActiveDirectoryGetResponse', 'ActiveDirectoryPatch', 'ActiveDirectoryPost', 'ActiveDirectoryResponse', 'Admin', 'AdminApiToken', 'AdminApiTokenGetResponse', 'AdminApiTokenResponse', 'AdminCache', 'AdminCacheGetResponse', 'AdminCacheResponse', 'AdminGetResponse', 'AdminPatch', 'AdminPost', 'AdminResponse', 'AdminRole', 'AdminSettings', 'AdminSettingsGetResponse', 'AdminSettingsRequiredAuthenticationMethods', 'AdminSettingsResponse', 'AggregateReplicationPerformance', 'Alert', 'AlertEvent', 'AlertEventGetResponse', 'AlertEventResponse', 'AlertGetResponse', 'AlertResponse', 'AlertRules', 'AlertRulesCatalog', 'AlertRulesCatalogGetResponse', 'AlertRulesCatalogResponse', 'AlertRulesGetResponse', 'AlertRulesResponse', 'AlertWatcher', 'AlertWatcherGetResponse', 'AlertWatcherPatch', 'AlertWatcherPost', 'AlertWatcherResponse', 'ApiClient', 'ApiClientGetResponse', 'ApiClientPatch', 'ApiClientPost', 'ApiClientResponse', 'ApiToken', 'ApiVersionResponse', 'App', 'AppGetResponse', 'AppNode', 'AppNodeGetResponse', 'AppNodeResponse', 'AppResponse', 'ArrayAvailability', 'ArrayConnection', 'ArrayConnectionGetResponse', 'ArrayConnectionKey', 'ArrayConnectionKeyGetResponse', 'ArrayConnectionPatch', 'ArrayConnectionPath', 'ArrayConnectionPathGetResponse', 'ArrayConnectionPathResponse', 'ArrayConnectionPost', 'ArrayConnectionResponse', 'ArrayEncryption', 'ArrayErasure', 'ArrayErasureGetResponse', 'ArrayErasurePatch', 'ArrayErasureResponse', 'ArrayFactoryResetToken', 'ArrayFactoryResetTokenGetResponse', 'ArrayFactoryResetTokenResponse', 'ArrayGetResponse', 'ArrayPerformance', 'ArrayPerformanceByLink', 'ArrayPerformanceByLinkGetResponse', 'ArrayPerformanceByLinkResponse', 'ArrayPerformanceGetResponse', 'ArrayResponse', 'ArraySpace', 'ArraySpaceGetResponse', 'ArrayencryptionDataAtRest', 'Arrays', 'Audit', 'AuditGetResponse', 'AuditResponse', 'BasePort', 'Bucket', 'BucketBase', 'BucketGetResponse', 'BucketPatchBase', 'BucketPerformance', 'BucketPerformanceBase', 'BucketPerformanceGetResponse', 'BucketPostBase', 'BucketResponse', 'BuiltIn', 'BuiltInRelationship', 'BuiltInResourceNoId', 'Cache', 'CacheGetResponse', 'CacheSpace', 'Certificate', 'CertificateBase', 'CertificateCertificateGroupGetResponse', 'CertificateCertificateGroupResponse', 'CertificateGetResponse', 'CertificateGroup', 'CertificateGroupCertificateGetResponse', 'CertificateGroupCertificateResponse', 'CertificateGroupGetResponse', 'CertificateGroupResponse', 'CertificateGroupUse', 'CertificateGroupUseGetResponse', 'CertificatePost', 'CertificateResponse', 'CertificateSigningRequest', 'CertificateSigningRequestPost', 'CertificateSigningRequestResponse', 'CertificateUse', 'CertificateUseGetResponse', 'Chap', 'CloudCapacityGetResponse', 'CloudCapacityPatchResponse', 'CloudCapacityStatus', 'CloudCapacityStep', 'CloudCapacityStepsGetResponse', 'CloudConfig', 'CloudConfigAutomaticCapacityUpgrade', 'CloudConfigAutomaticCapacityUpgradePatch', 'CloudConfigGetResponse', 'CloudConfigModel', 'CloudConfigModelPatch', 'CloudConfigPatch', 'CloudConfigPatchResponse', 'CloudConfigSupported', 'CloudConfigSupportedConfigsGetResponse', 'CloudProviderTag', 'CloudProviderTagGetResponse', 'CloudProviderTagResponse', 'Connection', 'ConnectionGetResponse', 'ConnectionPost', 'ConnectionResponse', 'ContainerDefaultProtection', 'ContainerDefaultProtectionGetResponse', 'ContainerDefaultProtectionResponse', 'ContainerEradicationConfig', 'ContainerPerformance', 'ContainerPerformanceGetResponse', 'ContainerPerformanceReplication', 'ContainerQos', 'ContainerQosBandwidthLimitPatch', 'ContainerQosCeilings', 'ContainerQosCeilingsBandwidthLimitPatch', 'ContainerQosCeilingsIopsLimitPatch', 'ContainerQosCeilingsPatch', 'ContainerQosFileCeilings', 'ContainerQosIopsLimitPatch', 'ContainerQosPatch', 'Context', 'Controller', 'ControllerGetResponse', 'DataSealingKey', 'DataSealingKeyGetResponse', 'DataSealingKeyPatch', 'DataSealingKeyPost', 'DataSealingKeyResponse', 'DataSealingKeyRotate', 'DefaultProtectionReference', 'DestroyedPatchPost', 'DirectoriesGroupsGetResponse', 'DirectoriesGroupsResponse', 'DirectoriesPerformanceByArray', 'DirectoriesPerformanceByArrayGetResponse', 'DirectoriesUsersGetResponse', 'DirectoriesUsersResponse', 'Directory', 'DirectoryExport', 'DirectoryExportGetResponse', 'DirectoryExportPatch', 'DirectoryExportPost', 'DirectoryExportResponse', 'DirectoryGetResponse', 'DirectoryGroup', 'DirectoryGroupQuota', 'DirectoryGroupQuotasGetResponse', 'DirectoryGroupQuotasResponse', 'DirectoryLockNlmReclamation', 'DirectoryLockNlmReclamationResponse', 'DirectoryPatch', 'DirectoryPerformance', 'DirectoryPerformanceGetResponse', 'DirectoryPolicyExportPost', 'DirectoryPolicyPost', 'DirectoryPost', 'DirectoryQosGetResponse', 'DirectoryQuota', 'DirectoryQuotasGetResponse', 'DirectoryQuotasResponse', 'DirectoryResponse', 'DirectoryService', 'DirectoryServiceCommon', 'DirectoryServiceGetResponse', 'DirectoryServiceManagement', 'DirectoryServicePatch', 'DirectoryServicePost', 'DirectoryServiceResponse', 'DirectoryServiceRole', 'DirectoryServiceRoleGetResponse', 'DirectoryServiceRolePost', 'DirectoryServiceRoleResponse', 'DirectorySnapshot', 'DirectorySnapshotEradicationConfig', 'DirectorySnapshotGetResponse', 'DirectorySnapshotPatch', 'DirectorySnapshotPost', 'DirectorySnapshotResponse', 'DirectoryUser', 'DirectoryUserQuota', 'DirectoryUserQuotaRule', 'DirectoryUserQuotasGetResponse', 'DirectoryUserQuotasResponse', 'DirectorypolicyexportpostPolicies', 'DirectorypolicypostPolicies', 'Dns', 'DnsGetResponse', 'DnsPatch', 'DnsPost', 'DnsResponse', 'Drive', 'DriveGetResponse', 'DriveResponse', 'EradicationConfig', 'ErrorContextResponse', 'ErrorcontextresponseErrors', 'Eula', 'EulaGetResponse', 'EulaResponse', 'EulaSignature', 'ExportPolicyAttachmentMixin', 'FilePost', 'FileSystem', 'FileSystemGetResponse', 'FileSystemPatch', 'FileSystemPost', 'FileSystemResponse', 'FixedNameResourceNoId', 'FixedReference', 'FixedReferenceNoId', 'FixedReferenceWithType', 'FixedReferenceWithTypeAndLocation', 'FixedReferenceWithoutId', 'Fleet', 'FleetGetResponse', 'FleetKey', 'FleetKeyGetResponse', 'FleetKeyResponse', 'FleetMember', 'FleetMemberGetResponse', 'FleetMemberPost', 'FleetMemberResponse', 'FleetPatch', 'FleetResponse', 'FleetmemberpostMember', 'FleetmemberpostMembers', 'Hardware', 'HardwareGetResponse', 'HardwarePatch', 'HardwareResponse', 'Host', 'HostGetResponse', 'HostGroup', 'HostGroupGetResponse', 'HostGroupPatch', 'HostGroupPost', 'HostGroupQosGetResponse', 'HostGroupResponse', 'HostPatch', 'HostPerformanceBalance', 'HostPerformanceBalanceGetResponse', 'HostPortConnectivity', 'HostPost', 'HostQosGetResponse', 'HostResponse', 'Kmip', 'KmipCertificate', 'KmipGetResponse', 'KmipObject', 'KmipPatch', 'KmipPost', 'KmipResponse', 'KmipTestResult', 'KmipTestResultGetResponse', 'LifecycleRule', 'LifecycleRuleBase', 'LifecycleRuleConfigBase', 'LifecycleRuleGetResponse', 'LifecycleRulePatchBase', 'LifecycleRulePostBase', 'LifecycleRuleResponse', 'LimitedBy', 'LocalDirectoryService', 'LocalDirectoryServiceGetResponse', 'LocalDirectoryServicePost', 'LocalDirectoryServiceReference', 'LocalDirectoryServiceResponse', 'LocalGroup', 'LocalGroupGetResponse', 'LocalGroupMembershipPost', 'LocalGroupPatch', 'LocalGroupPost', 'LocalGroupResponse', 'LocalMember', 'LocalMembershipGetResponse', 'LocalMembershipResponse', 'LocalUser', 'LocalUserGetResponse', 'LocalUserMembershipPost', 'LocalUserPatch', 'LocalUserPost', 'LocalUserResponse', 'LocalgroupmembershippostMembers', 'LocalusermembershippostGroups', 'LogTarget', 'LogTargetFile', 'LogTargetFileGetResponse', 'LogTargetFileResponse', 'LogTargetsGetResponse', 'LogTargetsResponse', 'LoginPost', 'MaintenanceWindow', 'MaintenanceWindowPost', 'MaintenanceWindowsGetResponse', 'MaintenanceWindowsResponse', 'MappingPolicy', 'MappingPolicyPatch', 'Member', 'MemberGetResponse', 'MemberNoIdAll', 'MemberNoIdAllGetResponse', 'MemberNoIdAllResponse', 'MemberNoIdMember', 'MemberNoIdMemberGetResponse', 'MemberNoIdMemberResponse', 'MemberResponse', 'MemberWithType', 'NamingPattern', 'NetworkInterface', 'NetworkInterfaceEth', 'NetworkInterfaceFc', 'NetworkInterfaceGetResponse', 'NetworkInterfaceNeighbor', 'NetworkInterfaceNeighborCapability', 'NetworkInterfaceNeighborGetResponse', 'NetworkInterfaceNeighborNeighborChassis', 'NetworkInterfaceNeighborNeighborChassisId', 'NetworkInterfaceNeighborNeighborPort', 'NetworkInterfaceNeighborNeighborPortId', 'NetworkInterfaceNeighborResponse', 'NetworkInterfacePatch', 'NetworkInterfacePerformance', 'NetworkInterfacePerformanceEth', 'NetworkInterfacePerformanceFc', 'NetworkInterfacePerformanceGetResponse', 'NetworkInterfacePortDetailsRxLos', 'NetworkInterfacePortDetailsRxPower', 'NetworkInterfacePortDetailsStatic', 'NetworkInterfacePortDetailsStaticRxPowerThresholds', 'NetworkInterfacePortDetailsStaticTemperatureThresholds', 'NetworkInterfacePortDetailsStaticTxBiasThresholds', 'NetworkInterfacePortDetailsStaticTxPowerThresholds', 'NetworkInterfacePortDetailsStaticVoltageThresholds', 'NetworkInterfacePortDetailsTemperature', 'NetworkInterfacePortDetailsTxBias', 'NetworkInterfacePortDetailsTxFault', 'NetworkInterfacePortDetailsTxPower', 'NetworkInterfacePortDetailsVoltage', 'NetworkInterfacePost', 'NetworkInterfaceResponse', 'NetworkInterfacesPortDetails', 'NetworkInterfacesPortDetailsGetResponse', 'NetworkInterfacesPortDetailsResponse', 'NetworkinterfacepatchEth', 'NetworkinterfacepostEth', 'NewFqname', 'NewName', 'NonCopyableTag', 'NonCopyableTagBatch', 'Oauth210TokenPost400Response', 'Oauth210TokenPost401Response', 'OauthTokenResponse', 'ObjectStoreAccessKey', 'ObjectStoreAccessKeyBase', 'ObjectStoreAccessKeyGetResponse', 'ObjectStoreAccessKeyPostBase', 'ObjectStoreAccessKeyResponse', 'ObjectStoreAccessPolicy', 'ObjectStoreAccessPolicyGetResponse', 'ObjectStoreAccessPolicyResponse', 'ObjectStoreAccessPolicyRuleGetResponse', 'ObjectStoreAccessPolicyRuleResponse', 'ObjectStoreAccount', 'ObjectStoreAccountBase', 'ObjectStoreAccountGetResponse', 'ObjectStoreAccountResponse', 'ObjectStoreUser', 'ObjectStoreUserBase', 'ObjectStoreUserGetResponse', 'ObjectStoreUserResponse', 'ObjectStoreVirtualHost', 'ObjectStoreVirtualHostGetResponse', 'ObjectStoreVirtualHostResponse', 'Offload', 'OffloadAzure', 'OffloadAzurePatch', 'OffloadGetResponse', 'OffloadGoogleCloud', 'OffloadNfs', 'OffloadPatch', 'OffloadPost', 'OffloadResponse', 'OffloadS3', 'OverrideCheck', 'PageInfo', 'PageInfoWithoutTotalItemCountResponse', 'Performance', 'PerformanceOthers', 'Pod', 'PodArrayAndMember', 'PodArrayStatus', 'PodGetResponse', 'PodMember', 'PodMemberGetResponse', 'PodMemberResponse', 'PodPatch', 'PodPerformance', 'PodPerformanceByArray', 'PodPerformanceByArrayGetResponse', 'PodPerformanceReplication', 'PodPerformanceReplicationByArray', 'PodPerformanceReplicationByArrayGetResponse', 'PodPerformanceReplicationByArrayResponse', 'PodPerformanceReplicationGetResponse', 'PodPerformanceReplicationResponse', 'PodPost', 'PodRemoteArrayStatus', 'PodReplicaLink', 'PodReplicaLinkGetResponse', 'PodReplicaLinkLag', 'PodReplicaLinkLagGetResponse', 'PodReplicaLinkLagResponse', 'PodReplicaLinkMappingPolicyGetResponse', 'PodReplicaLinkMappingPolicyResponse', 'PodReplicaLinkPatch', 'PodReplicaLinkPerformanceReplication', 'PodReplicaLinkPerformanceReplicationArray', 'PodReplicaLinkPerformanceReplicationArrayGetResponse', 'PodReplicaLinkPerformanceReplicationArrayResponse', 'PodReplicaLinkPerformanceReplicationGetResponse', 'PodReplicaLinkPerformanceReplicationResponse', 'PodReplicaLinkReference', 'PodReplicaLinkResponse', 'PodResponse', 'PodSpace', 'Policy', 'PolicyAssignmentPost', 'PolicyAssignmentPostPolicy', 'PolicyAuditFile', 'PolicyAuditFileGetResponse', 'PolicyAuditFilePatch', 'PolicyAuditFilePost', 'PolicyAuditFileResponse', 'PolicyBase', 'PolicyGetResponse', 'PolicyLockable', 'PolicyLockableEradicationConfig', 'PolicyLockableGetResponse', 'PolicyLockablePatch', 'PolicyLockableResponse', 'PolicyManagementAccess', 'PolicyManagementAccessGetResponse', 'PolicyManagementAccessPatch', 'PolicyManagementAccessPost', 'PolicyManagementAccessResponse', 'PolicyMember', 'PolicyMemberBase', 'PolicyMemberClean', 'PolicyMemberCleanGetResponse', 'PolicyMemberCleanResponse', 'PolicyMemberExport', 'PolicyMemberExportGetResponse', 'PolicyMemberExportPost', 'PolicyMemberExportResponse', 'PolicyMemberGetResponse', 'PolicyMemberObjectStoreAccessGetResponse', 'PolicyMemberObjectStoreAccessResponse', 'PolicyMemberPost', 'PolicyMemberResponse', 'PolicyNfs', 'PolicyNfsGetResponse', 'PolicyNfsPatch', 'PolicyNfsPolicyMapping', 'PolicyNfsPost', 'PolicyNfsResponse', 'PolicyPassword', 'PolicyPasswordGetResponse', 'PolicyPasswordResponse', 'PolicyPatch', 'PolicyPost', 'PolicyQos', 'PolicyQosGetResponse', 'PolicyQosPatch', 'PolicyQosPost', 'PolicyQosResponse', 'PolicyQuota', 'PolicyQuotaGetResponse', 'PolicyQuotaPatch', 'PolicyQuotaResponse', 'PolicyResponse', 'PolicyRuleAlertWatcher', 'PolicyRuleAlertWatcherGetResponse', 'PolicyRuleAlertWatcherPatch', 'PolicyRuleAlertWatcherPost', 'PolicyRuleAlertWatcherResponse', 'PolicyRuleNetworkAccess', 'PolicyRuleNetworkAccessGetResponse', 'PolicyRuleNetworkAccessPatch', 'PolicyRuleNetworkAccessPost', 'PolicyRuleNetworkAccessResponse', 'PolicyRuleNfsClient', 'PolicyRuleNfsClientGetResponse', 'PolicyRuleNfsClientPatch', 'PolicyRuleNfsClientPost', 'PolicyRuleNfsClientResponse', 'PolicyRuleObjectStoreAccess', 'PolicyRuleObjectStoreAccessBase', 'PolicyRuleQuota', 'PolicyRuleQuotaGetResponse', 'PolicyRuleQuotaPatch', 'PolicyRuleQuotaPost', 'PolicyRuleQuotaResponse', 'PolicyRuleSmbClient', 'PolicyRuleSmbClientGetResponse', 'PolicyRuleSmbClientPost', 'PolicyRuleSmbClientResponse', 'PolicyRuleSnapshot', 'PolicyRuleSnapshotGetResponse', 'PolicyRuleSnapshotPatch', 'PolicyRuleSnapshotPost', 'PolicyRuleSnapshotResponse', 'PolicyRuleUserGroupQuota', 'PolicyRuleUserGroupQuotaGetResponse', 'PolicyRuleUserGroupQuotaLimitPatch', 'PolicyRuleUserGroupQuotaPatch', 'PolicyRuleUserGroupQuotaPost', 'PolicyRuleUserGroupQuotaResponse', 'PolicyRuleUserGroupQuotaSubject', 'PolicySmb', 'PolicySmbGetResponse', 'PolicySmbPatch', 'PolicySmbPost', 'PolicySmbResponse', 'PolicyTls', 'PolicyTlsBase', 'PolicyTlsGetResponse', 'PolicyTlsPatch', 'PolicyTlsPost', 'PolicyTlsResponse', 'PolicymemberexportpostMembers', 'PolicymemberpostMembers', 'PolicynfspostPolicyMapping', 'PolicyqosRatelimit', 'PolicyrulealertwatcherpatchRules', 'PolicyrulealertwatcherpostRules', 'PolicyrulemanagementaccessRules', 'PolicyrulenetworkaccesspatchRules', 'PolicyrulenetworkaccesspostRules', 'PolicyrulenfsclientpatchRules', 'PolicyrulenfsclientpostRules', 'PolicyrulequotapatchRules', 'PolicyrulequotapostRules', 'PolicyrulesmbclientpostRules', 'PolicyrulesnapshotpatchRules', 'PolicyrulesnapshotpostRules', 'PolicyruleusergroupquotaSubject', 'PolicyruleusergroupquotapatchRules', 'PolicyruleusergroupquotapostRules', 'Port', 'PortCommon', 'PortGetResponse', 'PortInitiator', 'PortInitiatorEncryption', 'PortInitiatorTarget', 'PortInitiatorsGetResponse', 'PresetWorkload', 'PresetWorkloadBase', 'PresetWorkloadConstraints', 'PresetWorkloadConstraintsBoolean', 'PresetWorkloadConstraintsInteger', 'PresetWorkloadConstraintsResourceReference', 'PresetWorkloadConstraintsResourceReferenceAllowedValues', 'PresetWorkloadConstraintsString', 'PresetWorkloadDirectoryConfiguration', 'PresetWorkloadDirectoryConfigurationExportConfigurations', 'PresetWorkloadDirectoryConfigurationExports', 'PresetWorkloadDirectoryConfigurationMultiProtocol', 'PresetWorkloadDirectoryConfigurationName', 'PresetWorkloadDirectoryConfigurationParent', 'PresetWorkloadDirectoryConfigurationPath', 'PresetWorkloadDirectoryConfigurationSpecialDirectories', 'PresetWorkloadExportConfigurationNfs', 'PresetWorkloadExportConfigurationNfsPolicy', 'PresetWorkloadExportConfigurationNfsRule', 'PresetWorkloadExportConfigurationSmb', 'PresetWorkloadExportConfigurationSmbPolicy', 'PresetWorkloadExportConfigurationSmbRule', 'PresetWorkloadExportConfigurationSmbShare', 'PresetWorkloadExportConfigurationSmbSharePolicy', 'PresetWorkloadExportConfigurationSmbShareRule', 'PresetWorkloadExportConfigurations', 'PresetWorkloadGetResponse', 'PresetWorkloadMetadata', 'PresetWorkloadParameter', 'PresetWorkloadPatch', 'PresetWorkloadPeriodicReplicationConfiguration', 'PresetWorkloadPlacementConfiguration', 'PresetWorkloadPolicyAction', 'PresetWorkloadPost', 'PresetWorkloadQosConfiguration', 'PresetWorkloadQuotaConfiguration', 'PresetWorkloadQuotaRule', 'PresetWorkloadResponse', 'PresetWorkloadSnapshotConfiguration', 'PresetWorkloadSnapshotRule', 'PresetWorkloadVolumeConfiguration', 'PresetWorkloadWorkloadTag', 'PriorityAdjustment', 'ProtectionGroup', 'ProtectionGroupEradicationConfig', 'ProtectionGroupGetResponse', 'ProtectionGroupPerformance', 'ProtectionGroupPerformanceArray', 'ProtectionGroupPerformanceArrayResponse', 'ProtectionGroupPerformanceResponse', 'ProtectionGroupPost', 'ProtectionGroupResponse', 'ProtectionGroupSnapshot', 'ProtectionGroupSnapshotGetResponse', 'ProtectionGroupSnapshotPatch', 'ProtectionGroupSnapshotPost', 'ProtectionGroupSnapshotReplica', 'ProtectionGroupSnapshotReplicaResponse', 'ProtectionGroupSnapshotResponse', 'ProtectionGroupSnapshotTransfer', 'ProtectionGroupSnapshotTransferGetResponse', 'ProtectionGroupSnapshotTransferResponse', 'ProtectionGroupTargetGetResponse', 'ProtectionGroupTargetResponse', 'ProtectionGroupsVolumes', 'ProtectionGroupsVolumesGetResponse', 'ProtectionGroupsVolumesMember', 'ProtectionGroupsVolumesResponse', 'ProtocolEndpoint', 'Qos', 'QosBandwidthLimitPatch', 'QosIopsLimitPatch', 'QosMetrics', 'QosMetricsCeilings', 'QosMetricsFileCeilings', 'QosPatch', 'QuotaLimitPatch', 'Realm', 'RealmArrayStatus', 'RealmConnection', 'RealmConnectionKey', 'RealmConnectionKeyGetResponse', 'RealmConnectionKeyPost', 'RealmConnectionKeyPostResponse', 'RealmConnectionKeyResponse', 'RealmConnectionWithKey', 'RealmConnectionsGetResponse', 'RealmConnectionsResponse', 'RealmGetResponse', 'RealmMember', 'RealmMemberGetResponse', 'RealmMemberResponse', 'RealmPatch', 'RealmPost', 'RealmQosGetResponse', 'RealmRemoteArrayStatus', 'RealmResponse', 'RealmSpaceGetResponse', 'RealmsReference', 'Reference', 'ReferenceNoId', 'ReferenceNoIdWithType', 'ReferenceWithFixedType', 'ReferenceWithType', 'ReferenceWithoutTypeWithIsLocal', 'RemoteArray', 'RemoteArrayFleet', 'RemoteArrayResponse', 'RemoteArraysResponse', 'RemotePod', 'RemotePodTagGetResponse', 'RemotePodsResponse', 'RemoteProtectionGroup', 'RemoteProtectionGroupGetResponse', 'RemoteProtectionGroupResponse', 'RemoteProtectionGroupSnapshot', 'RemoteProtectionGroupSnapshotGetResponse', 'RemoteProtectionGroupSnapshotPost', 'RemoteProtectionGroupSnapshotResponse', 'RemoteProtectionGroupSnapshotTransfer', 'RemoteProtectionGroupSnapshotTransferGetResponse', 'RemoteProtectionGroupSnapshotTransferResponse', 'RemoteRealm', 'RemoteRealmTagGetResponse', 'RemoteRealmsResponse', 'RemoteVolumeSnapshot', 'RemoteVolumeSnapshotGetResponse', 'RemoteVolumeSnapshotPost', 'RemoteVolumeSnapshotResponse', 'RemoteVolumeSnapshotTransfer', 'RemoteVolumeSnapshotTransferGetResponse', 'RemoteVolumeSnapshotTransferResponse', 'ReplicaLinkLag', 'ReplicaLinkPerformanceReplication', 'ReplicaLinkPerformanceReplicationArray', 'ReplicaLinkPerformanceReplicationBase', 'ReplicationPerformanceWithTotal', 'ReplicationSchedule', 'Resource', 'ResourceAccess', 'ResourceAccessStatus', 'ResourceAccessStatusCreatedBy', 'ResourceAccessesGetResponse', 'ResourceAccessesResponse', 'ResourceAccessesStatusGetResponse', 'ResourceAccessesStatusResponse', 'ResourceBucketSpace', 'ResourceBucketSpaceGetResponse', 'ResourceDirectorySpace', 'ResourceDirectorySpaceGetResponse', 'ResourceFixedNonUniqueName', 'ResourceNoId', 'ResourceObjectStoreAccountSpace', 'ResourceObjectStoreAccountSpaceGetResponse', 'ResourcePerformance', 'ResourcePerformanceByArray', 'ResourcePerformanceByArrayGetResponse', 'ResourcePerformanceGetResponse', 'ResourcePerformanceNoId', 'ResourcePerformanceNoIdByArray', 'ResourcePerformanceNoIdByArrayGetResponse', 'ResourcePerformanceNoIdGetResponse', 'ResourcePodSpace', 'ResourcePodSpaceGetResponse', 'ResourceRealmSpace', 'ResourceSpace', 'ResourceSpaceGetResponse', 'ResourceSpaceNoId', 'ResourceSpaceNoIdGetResponse', 'RetentionPolicy', 'Saml2Sso', 'Saml2SsoGetResponse', 'Saml2SsoIdp', 'Saml2SsoManagement', 'Saml2SsoPatch', 'Saml2SsoPost', 'Saml2SsoResponse', 'Saml2SsoSp', 'Saml2SsoSpCredential', 'Server', 'ServerGetResponse', 'ServerPatch', 'ServerPost', 'ServerReference', 'ServerResponse', 'Session', 'SessionGetResponse', 'Smis', 'SmisGetResponse', 'SmisResponse', 'SmtpServer', 'SmtpServerGetResponse', 'SmtpServerResponse', 'Snapshot', 'SnapshotSchedule', 'SnapshotSpace', 'SnmpAgent', 'SnmpAgentGetResponse', 'SnmpAgentMib', 'SnmpAgentMibGetResponse', 'SnmpAgentMibResponse', 'SnmpAgentPatch', 'SnmpAgentResponse', 'SnmpManager', 'SnmpManagerGetResponse', 'SnmpManagerPatch', 'SnmpManagerPost', 'SnmpManagerResponse', 'SnmpV2c', 'SnmpV3', 'SnmpV3Patch', 'SnmpV3Post', 'Software', 'SoftwareBundle', 'SoftwareBundleGetResponse', 'SoftwareBundlePost', 'SoftwareBundleResponse', 'SoftwareCheck', 'SoftwareChecksChecks', 'SoftwareChecksGetResponse', 'SoftwareChecksResponse', 'SoftwareGetResponse', 'SoftwareInstallation', 'SoftwareInstallationPatch', 'SoftwareInstallationPost', 'SoftwareInstallationStep', 'SoftwareInstallationStepsChecks', 'SoftwareInstallationStepsGetResponse', 'SoftwareInstallationStepsResponse', 'SoftwareInstallationsGetResponse', 'SoftwareInstallationsResponse', 'SoftwarePatch', 'SoftwarePatchesGetResponse', 'SoftwarePatchesResponse', 'SoftwarePost', 'SoftwareResponse', 'SoftwareUpgradePlan', 'SoftwareVersion', 'SoftwareVersionsGetResponse', 'SoftwareVersionsResponse', 'Space', 'SpaceNoDeprecatedPhysicalOrEffective', 'StartEndTime', 'StorageClassMember', 'StorageClassesMemberResponse', 'StorageClassesMembersGetResponse', 'StretchedTagPod', 'StretchedTagRealm', 'StretchedTagRemoteArrayStatus', 'Subnet', 'SubnetGetResponse', 'SubnetPatch', 'SubnetPost', 'SubnetResponse', 'Subscription', 'SubscriptionAsset', 'SubscriptionAssetGetResponse', 'SubscriptionAssetResponse', 'SubscriptionAssetSubscription', 'SubscriptionGetResponse', 'SubscriptionResponse', 'Support', 'SupportDiagnosticsDetails', 'SupportDiagnosticsDetailsGetResponse', 'SupportDiagnosticsDetailsResponse', 'SupportDiagnosticsGetResponse', 'SupportDiagnosticsResponse', 'SupportDiagnosticsSettings', 'SupportGetResponse', 'SupportPatch', 'SupportRemoteAssistPaths', 'SupportRemoteAssistSessions', 'SupportRemoteAssistSessionsGetResponse', 'SupportRemoteAssistSessionsPatch', 'SupportRemoteAssistSessionsPaths', 'SupportRemoteAssistSessionsResponse', 'SupportRemoteAssistSessionsSettings', 'SupportRemoteAssistSessionsSettingsGetResponse', 'SupportRemoteAssistSessionsSettingsResponse', 'SupportResponse', 'SupportSystemManifest', 'SupportSystemManifestResponse', 'SyslogServer', 'SyslogServerGetResponse', 'SyslogServerResponse', 'SyslogServerSettings', 'SyslogServerSettingsGetResponse', 'SyslogServerSettingsResponse', 'Tag', 'TagBatch', 'TagGetResponse', 'TagResponse', 'TargetProtectionGroup', 'TargetProtectionGroupPostPatch', 'TestGetResultWithResourceErrorContextMultiserverAwareResponse', 'TestPatchResultWithResourceMultiserverAwareResponse', 'TestResult', 'TestResultGetResponse', 'TestResultResponse', 'TestResultWithNoIdResourceMultiserverAware', 'TestResultWithResource', 'TestResultWithResourceAndErrorContextPartialResourceResponse', 'TestResultWithResourceGetResponse', 'TestResultWithResourcePatchResponse', 'TestResultWithResourcePostResponse', 'TestResultWithResourceResponse', 'TestResultWithResourceWithId', 'TestResultWithResourceWithIdPostResponse', 'Tgroup', 'TgroupGetResponse', 'TgroupMember', 'TgroupMemberGetResponse', 'TgroupMemberResponse', 'TgroupMembersPost', 'TgroupMembersPostMember', 'TgroupPatch', 'TgroupResponse', 'Throttle', 'ThrottleDeprecated', 'TimeWindow', 'TotalItemCountResponse', 'Transfer', 'UpgradeParameters', 'UserGroup', 'UserGroupQuotaLimitedBy', 'UserGroupSpace', 'Username', 'UsernameResponse', 'Vchost', 'VchostCertificate', 'VchostCertificateGetResponse', 'VchostCertificatePatch', 'VchostCertificatePost', 'VchostCertificateResponse', 'VchostConnection', 'VchostConnectionGetResponse', 'VchostConnectionResponse', 'VchostEndpoint', 'VchostEndpointGetResponse', 'VchostEndpointPatch', 'VchostEndpointPost', 'VchostEndpointResponse', 'VchostGetResponse', 'VchostPatch', 'VchostPost', 'VchostResponse', 'VirtualMachine', 'VirtualMachineGetResponse', 'VirtualMachinePost', 'VirtualMachineResponse', 'VirtualMachineVolumeSnapshot', 'VirtualMachineVolumeSnapshotResponse', 'Volume', 'VolumeBatchPost', 'VolumeCommon', 'VolumeDiff', 'VolumeGetResponse', 'VolumeGroup', 'VolumeGroupGetResponse', 'VolumeGroupPatch', 'VolumeGroupPost', 'VolumeGroupQosGetResponse', 'VolumeGroupResponse', 'VolumePatch', 'VolumePost', 'VolumePostBase', 'VolumeQosGetResponse', 'VolumeResponse', 'VolumeSnapshot', 'VolumeSnapshotBatchPost', 'VolumeSnapshotBatchResponse', 'VolumeSnapshotGetResponse', 'VolumeSnapshotPatch', 'VolumeSnapshotPost', 'VolumeSnapshotResponse', 'VolumeSnapshotTransfer', 'VolumeSnapshotTransferGetResponse', 'VolumeSnapshotTransferResponse', 'VolumeSpace', 'VolumeSpaceCommon', 'VolumeSpaceGetResponse', 'VolumesBatchResponse', 'VolumesDiffGetResponse', 'VolumesDiffResponse', 'Workload', 'WorkloadConfigurationFixedReference', 'WorkloadConfigurationReference', 'WorkloadConfigurationReferencePatch', 'WorkloadConfigurationReferencePost', 'WorkloadGetResponse', 'WorkloadParameter', 'WorkloadParameterValue', 'WorkloadParameterValueResourceReference', 'WorkloadPatch', 'WorkloadPlacementRecommendation', 'WorkloadPlacementRecommendationAdditionalConstraints', 'WorkloadPlacementRecommendationGenericTarget', 'WorkloadPlacementRecommendationGetResponse', 'WorkloadPlacementRecommendationParameter', 'WorkloadPlacementRecommendationParameterConstraints', 'WorkloadPlacementRecommendationParameterResourceReference', 'WorkloadPlacementRecommendationPlacement', 'WorkloadPlacementRecommendationProjection', 'WorkloadPlacementRecommendationResourceReference', 'WorkloadPlacementRecommendationResponse', 'WorkloadPlacementRecommendationResult', 'WorkloadPlacementRecommendationTarget', 'WorkloadPlacementRecommendationTargetCapacityUsedProjections', 'WorkloadPlacementRecommendationTargetLoadProjections', 'WorkloadPlacementRecommendationWarning', 'WorkloadPost', 'WorkloadPreset', 'WorkloadResponse'] diff --git a/pypureclient/flasharray/__init__.py b/pypureclient/flasharray/__init__.py index 31d585c258..7fe1d05dcd 100644 --- a/pypureclient/flasharray/__init__.py +++ b/pypureclient/flasharray/__init__.py @@ -3,7 +3,7 @@ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) - The version of the OpenAPI document: 2.54 + The version of the OpenAPI document: 2.56 Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. @@ -25,9 +25,9 @@ from pypureclient.responses import ValidResponse, ErrorResponse, ApiError, ResponseHeaders def __getattr__(name, default=None): - import pypureclient.flasharray.FA_2_54.models as _target_models_package + import pypureclient.flasharray.FA_2_56.models as _target_models_package if name == '_modname': - return 'pypureclient.flasharray.FA_2_54' + return 'pypureclient.flasharray.FA_2_56' _model_class = getattr(_target_models_package, name, default) if _model_class: if os.environ.get('DOCS_GENERATION') is None: diff --git a/pypureclient/flasharray/__modules_dict.py b/pypureclient/flasharray/__modules_dict.py index eccba697f1..1d1c24b81f 100644 --- a/pypureclient/flasharray/__modules_dict.py +++ b/pypureclient/flasharray/__modules_dict.py @@ -51,5 +51,7 @@ "2.51": "pypureclient.flasharray.FA_2_51", "2.52": "pypureclient.flasharray.FA_2_52", "2.53": "pypureclient.flasharray.FA_2_53", - "2.54": "pypureclient.flasharray.FA_2_54" + "2.54": "pypureclient.flasharray.FA_2_54", + "2.55": "pypureclient.flasharray.FA_2_55", + "2.56": "pypureclient.flasharray.FA_2_56" } \ No newline at end of file diff --git a/pypureclient/flasharray/_common/apis/active_directory_api_v_2_55.py b/pypureclient/flasharray/_common/apis/active_directory_api_v_2_55.py new file mode 100644 index 0000000000..b26facb372 --- /dev/null +++ b/pypureclient/flasharray/_common/apis/active_directory_api_v_2_55.py @@ -0,0 +1,863 @@ + +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flasharray._common.models.active_directory_get_response_v_2_55 import ActiveDirectoryGetResponse +from pypureclient.flasharray._common.models.active_directory_patch_v_2_49 import ActiveDirectoryPatch +from pypureclient.flasharray._common.models.active_directory_post_v_2_49 import ActiveDirectoryPost +from pypureclient.flasharray._common.models.active_directory_response_v_2_55 import ActiveDirectoryResponse +from pypureclient.flasharray._common.models.test_result_with_resource_and_error_context_partial_resource_response_v_2_52 import TestResultWithResourceAndErrorContextPartialResourceResponse + +class ActiveDirectoryApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def active_directory_delete_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_only: Annotated[Optional[StrictBool], Field(description="If specified as `true`, only delete the Active Directory configuration on the local array, without deleting the computer account created in the Active Directory domain. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete Active Directory account + + Deletes one or more specified Active Directory accounts. + + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. (required) + :type names: List[str] + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_only: If specified as `true`, only delete the Active Directory configuration on the local array, without deleting the computer account created in the Active Directory domain. If not specified, defaults to `false`. + :type local_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'names', + 'authorization', + 'x_request_id', + 'context_names', + 'local_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_active_directory_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('local_only') is not None: # noqa: E501 + _query_params.append(('local_only', _params['local_only'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/active-directory', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def active_directory_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List Active Directory accounts + + Displays configured Active Directory accounts. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ActiveDirectoryGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'limit', + 'names', + 'offset', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_active_directory_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ActiveDirectoryGetResponse", + '207': "ActiveDirectoryGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/active-directory', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def active_directory_patch_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")], + active_directory: ActiveDirectoryPatch, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify Active Directory account + + Modifies specified Active Directory account. + + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. (required) + :type names: List[str] + :param active_directory: (required) + :type active_directory: ActiveDirectoryPatch + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ActiveDirectoryResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'active_directory', + 'authorization', + 'x_request_id', + 'context_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_active_directory_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['active_directory'] is not None: + _body_params = _params['active_directory'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ActiveDirectoryResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/active-directory', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def active_directory_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")], + active_directory: ActiveDirectoryPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + join_existing_account: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the domain is searched for a pre-existing computer account to join to, and no new account will be created within the domain. The `user` specified when joining a pre-existing account must have permissions to 'read all properties from' and 'reset the password of' the pre-existing account. `join_ou` will be read from the pre-existing account and cannot be specified when joining to an existing account. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create Active Directory account + + Creates one or more Active Directory accounts. The `user` and `password` provided are used to join the array to the specified `domain`. + + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. (required) + :type names: List[str] + :param active_directory: (required) + :type active_directory: ActiveDirectoryPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param join_existing_account: If specified as `true`, the domain is searched for a pre-existing computer account to join to, and no new account will be created within the domain. The `user` specified when joining a pre-existing account must have permissions to 'read all properties from' and 'reset the password of' the pre-existing account. `join_ou` will be read from the pre-existing account and cannot be specified when joining to an existing account. If not specified, defaults to `false`. + :type join_existing_account: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ActiveDirectoryResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'active_directory', + 'authorization', + 'x_request_id', + 'context_names', + 'join_existing_account' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_active_directory_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('join_existing_account') is not None: # noqa: E501 + _query_params.append(('join_existing_account', _params['join_existing_account'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['active_directory'] is not None: + _body_params = _params['active_directory'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ActiveDirectoryResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/active-directory', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def active_directory_test_get_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET active-directory/test + + The diagnostic process that executes a series of validation tests on one or more `Active Directory` `accounts`. Each individual test verifies a specific aspect of the `configuration`, such as connectivity, authentication permissions, and service principal integrity, to ensure the environment is functioning properly. + + :param names: Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TestResultWithResourceAndErrorContextPartialResourceResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'offset', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_active_directory_test_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "TestResultWithResourceAndErrorContextPartialResourceResponse", + '207': "TestResultWithResourceAndErrorContextPartialResourceResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/active-directory/test', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api255_active_directory_delete_with_http_info = active_directory_delete_with_http_info + api255_active_directory_get_with_http_info = active_directory_get_with_http_info + api255_active_directory_patch_with_http_info = active_directory_patch_with_http_info + api255_active_directory_post_with_http_info = active_directory_post_with_http_info + api255_active_directory_test_get_with_http_info = active_directory_test_get_with_http_info + api256_active_directory_delete_with_http_info = active_directory_delete_with_http_info + api256_active_directory_get_with_http_info = active_directory_get_with_http_info + api256_active_directory_patch_with_http_info = active_directory_patch_with_http_info + api256_active_directory_post_with_http_info = active_directory_post_with_http_info + api256_active_directory_test_get_with_http_info = active_directory_test_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/administrators_api_v_2_54.py b/pypureclient/flasharray/_common/apis/administrators_api_v_2_54.py index 1a155a3a4c..759aa4ae33 100644 --- a/pypureclient/flasharray/_common/apis/administrators_api_v_2_54.py +++ b/pypureclient/flasharray/_common/apis/administrators_api_v_2_54.py @@ -2362,3 +2362,33 @@ def admins_settings_patch_with_http_info( api254_admins_post_with_http_info = admins_post_with_http_info api254_admins_settings_get_with_http_info = admins_settings_get_with_http_info api254_admins_settings_patch_with_http_info = admins_settings_patch_with_http_info + api255_admins_api_tokens_delete_with_http_info = admins_api_tokens_delete_with_http_info + api255_admins_api_tokens_get_with_http_info = admins_api_tokens_get_with_http_info + api255_admins_api_tokens_post_with_http_info = admins_api_tokens_post_with_http_info + api255_admins_cache_delete_with_http_info = admins_cache_delete_with_http_info + api255_admins_cache_get_with_http_info = admins_cache_get_with_http_info + api255_admins_cache_put_with_http_info = admins_cache_put_with_http_info + api255_admins_delete_with_http_info = admins_delete_with_http_info + api255_admins_get_with_http_info = admins_get_with_http_info + api255_admins_patch_with_http_info = admins_patch_with_http_info + api255_admins_policies_management_access_delete_with_http_info = admins_policies_management_access_delete_with_http_info + api255_admins_policies_management_access_get_with_http_info = admins_policies_management_access_get_with_http_info + api255_admins_policies_management_access_post_with_http_info = admins_policies_management_access_post_with_http_info + api255_admins_post_with_http_info = admins_post_with_http_info + api255_admins_settings_get_with_http_info = admins_settings_get_with_http_info + api255_admins_settings_patch_with_http_info = admins_settings_patch_with_http_info + api256_admins_api_tokens_delete_with_http_info = admins_api_tokens_delete_with_http_info + api256_admins_api_tokens_get_with_http_info = admins_api_tokens_get_with_http_info + api256_admins_api_tokens_post_with_http_info = admins_api_tokens_post_with_http_info + api256_admins_cache_delete_with_http_info = admins_cache_delete_with_http_info + api256_admins_cache_get_with_http_info = admins_cache_get_with_http_info + api256_admins_cache_put_with_http_info = admins_cache_put_with_http_info + api256_admins_delete_with_http_info = admins_delete_with_http_info + api256_admins_get_with_http_info = admins_get_with_http_info + api256_admins_patch_with_http_info = admins_patch_with_http_info + api256_admins_policies_management_access_delete_with_http_info = admins_policies_management_access_delete_with_http_info + api256_admins_policies_management_access_get_with_http_info = admins_policies_management_access_get_with_http_info + api256_admins_policies_management_access_post_with_http_info = admins_policies_management_access_post_with_http_info + api256_admins_post_with_http_info = admins_post_with_http_info + api256_admins_settings_get_with_http_info = admins_settings_get_with_http_info + api256_admins_settings_patch_with_http_info = admins_settings_patch_with_http_info diff --git a/pypureclient/flasharray/_common/apis/alert_watchers_api_v_2_49.py b/pypureclient/flasharray/_common/apis/alert_watchers_api_v_2_49.py index 9d6af576f0..b72240becd 100644 --- a/pypureclient/flasharray/_common/apis/alert_watchers_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/alert_watchers_api_v_2_49.py @@ -819,3 +819,13 @@ def alert_watchers_test_get_with_http_info( api254_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info api254_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info api254_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info + api255_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info + api255_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info + api255_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info + api255_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info + api255_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info + api256_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info + api256_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info + api256_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info + api256_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info + api256_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/alerts_api_v_2_49.py b/pypureclient/flasharray/_common/apis/alerts_api_v_2_49.py index cdb53aa661..9e936dad15 100644 --- a/pypureclient/flasharray/_common/apis/alerts_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/alerts_api_v_2_49.py @@ -1411,3 +1411,19 @@ def alerts_rules_post_with_http_info( api254_alerts_rules_get_with_http_info = alerts_rules_get_with_http_info api254_alerts_rules_patch_with_http_info = alerts_rules_patch_with_http_info api254_alerts_rules_post_with_http_info = alerts_rules_post_with_http_info + api255_alerts_events_get_with_http_info = alerts_events_get_with_http_info + api255_alerts_get_with_http_info = alerts_get_with_http_info + api255_alerts_patch_with_http_info = alerts_patch_with_http_info + api255_alerts_rules_catalog_get_with_http_info = alerts_rules_catalog_get_with_http_info + api255_alerts_rules_delete_with_http_info = alerts_rules_delete_with_http_info + api255_alerts_rules_get_with_http_info = alerts_rules_get_with_http_info + api255_alerts_rules_patch_with_http_info = alerts_rules_patch_with_http_info + api255_alerts_rules_post_with_http_info = alerts_rules_post_with_http_info + api256_alerts_events_get_with_http_info = alerts_events_get_with_http_info + api256_alerts_get_with_http_info = alerts_get_with_http_info + api256_alerts_patch_with_http_info = alerts_patch_with_http_info + api256_alerts_rules_catalog_get_with_http_info = alerts_rules_catalog_get_with_http_info + api256_alerts_rules_delete_with_http_info = alerts_rules_delete_with_http_info + api256_alerts_rules_get_with_http_info = alerts_rules_get_with_http_info + api256_alerts_rules_patch_with_http_info = alerts_rules_patch_with_http_info + api256_alerts_rules_post_with_http_info = alerts_rules_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/api_clients_api_v_2_36.py b/pypureclient/flasharray/_common/apis/api_clients_api_v_2_36.py index dba28183b8..49b513b897 100644 --- a/pypureclient/flasharray/_common/apis/api_clients_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/api_clients_api_v_2_36.py @@ -699,3 +699,11 @@ def api_clients_post_with_http_info( api254_api_clients_get_with_http_info = api_clients_get_with_http_info api254_api_clients_patch_with_http_info = api_clients_patch_with_http_info api254_api_clients_post_with_http_info = api_clients_post_with_http_info + api255_api_clients_delete_with_http_info = api_clients_delete_with_http_info + api255_api_clients_get_with_http_info = api_clients_get_with_http_info + api255_api_clients_patch_with_http_info = api_clients_patch_with_http_info + api255_api_clients_post_with_http_info = api_clients_post_with_http_info + api256_api_clients_delete_with_http_info = api_clients_delete_with_http_info + api256_api_clients_get_with_http_info = api_clients_get_with_http_info + api256_api_clients_patch_with_http_info = api_clients_patch_with_http_info + api256_api_clients_post_with_http_info = api_clients_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/apps_api_v_2_36.py b/pypureclient/flasharray/_common/apis/apps_api_v_2_36.py index 0abfd04f14..af0faee052 100644 --- a/pypureclient/flasharray/_common/apis/apps_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/apps_api_v_2_36.py @@ -575,3 +575,9 @@ def apps_patch_with_http_info( api254_apps_get_with_http_info = apps_get_with_http_info api254_apps_nodes_get_with_http_info = apps_nodes_get_with_http_info api254_apps_patch_with_http_info = apps_patch_with_http_info + api255_apps_get_with_http_info = apps_get_with_http_info + api255_apps_nodes_get_with_http_info = apps_nodes_get_with_http_info + api255_apps_patch_with_http_info = apps_patch_with_http_info + api256_apps_get_with_http_info = apps_get_with_http_info + api256_apps_nodes_get_with_http_info = apps_nodes_get_with_http_info + api256_apps_patch_with_http_info = apps_patch_with_http_info diff --git a/pypureclient/flasharray/_common/apis/array_connections_api_v_2_55.py b/pypureclient/flasharray/_common/apis/array_connections_api_v_2_55.py new file mode 100644 index 0000000000..bce9d059b1 --- /dev/null +++ b/pypureclient/flasharray/_common/apis/array_connections_api_v_2_55.py @@ -0,0 +1,1052 @@ + +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flasharray._common.models.array_connection_get_response_v_2_54 import ArrayConnectionGetResponse +from pypureclient.flasharray._common.models.array_connection_key_get_response_v_2_55 import ArrayConnectionKeyGetResponse +from pypureclient.flasharray._common.models.array_connection_patch_v_2_44 import ArrayConnectionPatch +from pypureclient.flasharray._common.models.array_connection_path_get_response_v_2_54 import ArrayConnectionPathGetResponse +from pypureclient.flasharray._common.models.array_connection_post_v_2_33 import ArrayConnectionPost +from pypureclient.flasharray._common.models.array_connection_response_v_2_54 import ArrayConnectionResponse + +class ArrayConnectionsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def array_connections_connection_key_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + encrypted: Annotated[Optional[StrictBool], Field(description="If `true`, the returned array connection key will encode an encryption key used to establish trust and secure replication traffic. If `false`, the returned array connection key will not encode an encryption key. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List connection key + + Displays the connection key for the array. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param encrypted: If `true`, the returned array connection key will encode an encryption key used to establish trust and secure replication traffic. If `false`, the returned array connection key will not encode an encryption key. If not specified, defaults to `false`. + :type encrypted: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ArrayConnectionKeyGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'encrypted' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_array_connections_connection_key_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('encrypted') is not None: # noqa: E501 + _query_params.append(('encrypted', _params['encrypted'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ArrayConnectionKeyGetResponse", + '207': "ArrayConnectionKeyGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/array-connections/connection-key', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def array_connections_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete an array connection + + Deletes the connection between this array and the specified array. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_array_connections_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/array-connections', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def array_connections_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote array IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote array names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_ids` query parameter.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List the connected arrays + + Displays a list of connected arrays. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param remote_ids: A comma-separated list of remote array IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :type remote_ids: List[str] + :param remote_names: A comma-separated list of remote array names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_ids` query parameter. + :type remote_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ArrayConnectionGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'remote_ids', + 'remote_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_array_connections_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('remote_ids') is not None: # noqa: E501 + _query_params.append(('remote_ids', _params['remote_ids'])) + _collection_formats['remote_ids'] = 'csv' + + if _params.get('remote_names') is not None: # noqa: E501 + _query_params.append(('remote_names', _params['remote_names'])) + _collection_formats['remote_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ArrayConnectionGetResponse", + '207': "ArrayConnectionGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/array-connections', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def array_connections_patch_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + refresh: Annotated[Optional[StrictBool], Field(description="If set to `true`, the array will attempt to communicate with the connection peer in order to update the connection attributes on both arrays with any changes that have occurred. If set to `true`, other array connection attributes may not be modified in requests. Default value is `false`.")] = None, + renew_encryption_key: Annotated[Optional[StrictBool], Field(description="If set to `true`, update array connection with a new encryption key. If set to `true`, other array connection attributes may not be modified in requests. Defaults to `false`.")] = None, + array_connection: Optional[ArrayConnectionPatch] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify an array connection + + Modifies attributes for an array connection. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param refresh: If set to `true`, the array will attempt to communicate with the connection peer in order to update the connection attributes on both arrays with any changes that have occurred. If set to `true`, other array connection attributes may not be modified in requests. Default value is `false`. + :type refresh: bool + :param renew_encryption_key: If set to `true`, update array connection with a new encryption key. If set to `true`, other array connection attributes may not be modified in requests. Defaults to `false`. + :type renew_encryption_key: bool + :param array_connection: + :type array_connection: ArrayConnectionPatch + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ArrayConnectionResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'names', + 'refresh', + 'renew_encryption_key', + 'array_connection' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_array_connections_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('refresh') is not None: # noqa: E501 + _query_params.append(('refresh', _params['refresh'])) + + if _params.get('renew_encryption_key') is not None: # noqa: E501 + _query_params.append(('renew_encryption_key', _params['renew_encryption_key'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['array_connection'] is not None: + _body_params = _params['array_connection'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ArrayConnectionResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/array-connections', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def array_connections_path_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote array IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter.")] = None, + remote_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of remote array names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_ids` query parameter.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List connection path + + Displays the connection path from the array to which the connection was made. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param remote_ids: A comma-separated list of remote array IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_names` query parameter. + :type remote_ids: List[str] + :param remote_names: A comma-separated list of remote array names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `remote_ids` query parameter. + :type remote_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ArrayConnectionPathGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'remote_ids', + 'remote_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_array_connections_path_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('remote_ids') is not None: # noqa: E501 + _query_params.append(('remote_ids', _params['remote_ids'])) + _collection_formats['remote_ids'] = 'csv' + + if _params.get('remote_names') is not None: # noqa: E501 + _query_params.append(('remote_names', _params['remote_names'])) + _collection_formats['remote_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ArrayConnectionPathGetResponse", + '207': "ArrayConnectionPathGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/array-connections/path', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def array_connections_post_with_http_info( + self, + array_connection: ArrayConnectionPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create an array connection + + Creates a connection between this array and the specified array. + + :param array_connection: (required) + :type array_connection: ArrayConnectionPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ArrayConnectionResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'array_connection', + 'authorization', + 'x_request_id', + 'context_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_array_connections_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['array_connection'] is not None: + _body_params = _params['array_connection'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ArrayConnectionResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/array-connections', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api255_array_connections_connection_key_get_with_http_info = array_connections_connection_key_get_with_http_info + api255_array_connections_delete_with_http_info = array_connections_delete_with_http_info + api255_array_connections_get_with_http_info = array_connections_get_with_http_info + api255_array_connections_patch_with_http_info = array_connections_patch_with_http_info + api255_array_connections_path_get_with_http_info = array_connections_path_get_with_http_info + api255_array_connections_post_with_http_info = array_connections_post_with_http_info + api256_array_connections_connection_key_get_with_http_info = array_connections_connection_key_get_with_http_info + api256_array_connections_delete_with_http_info = array_connections_delete_with_http_info + api256_array_connections_get_with_http_info = array_connections_get_with_http_info + api256_array_connections_patch_with_http_info = array_connections_patch_with_http_info + api256_array_connections_path_get_with_http_info = array_connections_path_get_with_http_info + api256_array_connections_post_with_http_info = array_connections_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/arrays_api_v_2_51.py b/pypureclient/flasharray/_common/apis/arrays_api_v_2_51.py index 01ee3ef20c..b947deb222 100644 --- a/pypureclient/flasharray/_common/apis/arrays_api_v_2_51.py +++ b/pypureclient/flasharray/_common/apis/arrays_api_v_2_51.py @@ -4356,3 +4356,61 @@ def arrays_tags_get_with_http_info( api254_arrays_tags_batch_put_with_http_info = arrays_tags_batch_put_with_http_info api254_arrays_tags_delete_with_http_info = arrays_tags_delete_with_http_info api254_arrays_tags_get_with_http_info = arrays_tags_get_with_http_info + api255_arrays_cache_get_with_http_info = arrays_cache_get_with_http_info + api255_arrays_cloud_capacity_get_with_http_info = arrays_cloud_capacity_get_with_http_info + api255_arrays_cloud_capacity_patch_with_http_info = arrays_cloud_capacity_patch_with_http_info + api255_arrays_cloud_capacity_supported_steps_get_with_http_info = arrays_cloud_capacity_supported_steps_get_with_http_info + api255_arrays_cloud_config_get_with_http_info = arrays_cloud_config_get_with_http_info + api255_arrays_cloud_config_patch_with_http_info = arrays_cloud_config_patch_with_http_info + api255_arrays_cloud_config_supported_configs_get_with_http_info = arrays_cloud_config_supported_configs_get_with_http_info + api255_arrays_cloud_provider_tags_batch_put_with_http_info = arrays_cloud_provider_tags_batch_put_with_http_info + api255_arrays_cloud_provider_tags_delete_with_http_info = arrays_cloud_provider_tags_delete_with_http_info + api255_arrays_cloud_provider_tags_get_with_http_info = arrays_cloud_provider_tags_get_with_http_info + api255_arrays_delete_with_http_info = arrays_delete_with_http_info + api255_arrays_erasures_delete_with_http_info = arrays_erasures_delete_with_http_info + api255_arrays_erasures_get_with_http_info = arrays_erasures_get_with_http_info + api255_arrays_erasures_patch_with_http_info = arrays_erasures_patch_with_http_info + api255_arrays_erasures_post_with_http_info = arrays_erasures_post_with_http_info + api255_arrays_eula_get_with_http_info = arrays_eula_get_with_http_info + api255_arrays_eula_patch_with_http_info = arrays_eula_patch_with_http_info + api255_arrays_factory_reset_token_delete_with_http_info = arrays_factory_reset_token_delete_with_http_info + api255_arrays_factory_reset_token_get_with_http_info = arrays_factory_reset_token_get_with_http_info + api255_arrays_factory_reset_token_post_with_http_info = arrays_factory_reset_token_post_with_http_info + api255_arrays_get_with_http_info = arrays_get_with_http_info + api255_arrays_ntp_test_get_with_http_info = arrays_ntp_test_get_with_http_info + api255_arrays_patch_with_http_info = arrays_patch_with_http_info + api255_arrays_performance_by_link_get_with_http_info = arrays_performance_by_link_get_with_http_info + api255_arrays_performance_get_with_http_info = arrays_performance_get_with_http_info + api255_arrays_space_get_with_http_info = arrays_space_get_with_http_info + api255_arrays_tags_batch_put_with_http_info = arrays_tags_batch_put_with_http_info + api255_arrays_tags_delete_with_http_info = arrays_tags_delete_with_http_info + api255_arrays_tags_get_with_http_info = arrays_tags_get_with_http_info + api256_arrays_cache_get_with_http_info = arrays_cache_get_with_http_info + api256_arrays_cloud_capacity_get_with_http_info = arrays_cloud_capacity_get_with_http_info + api256_arrays_cloud_capacity_patch_with_http_info = arrays_cloud_capacity_patch_with_http_info + api256_arrays_cloud_capacity_supported_steps_get_with_http_info = arrays_cloud_capacity_supported_steps_get_with_http_info + api256_arrays_cloud_config_get_with_http_info = arrays_cloud_config_get_with_http_info + api256_arrays_cloud_config_patch_with_http_info = arrays_cloud_config_patch_with_http_info + api256_arrays_cloud_config_supported_configs_get_with_http_info = arrays_cloud_config_supported_configs_get_with_http_info + api256_arrays_cloud_provider_tags_batch_put_with_http_info = arrays_cloud_provider_tags_batch_put_with_http_info + api256_arrays_cloud_provider_tags_delete_with_http_info = arrays_cloud_provider_tags_delete_with_http_info + api256_arrays_cloud_provider_tags_get_with_http_info = arrays_cloud_provider_tags_get_with_http_info + api256_arrays_delete_with_http_info = arrays_delete_with_http_info + api256_arrays_erasures_delete_with_http_info = arrays_erasures_delete_with_http_info + api256_arrays_erasures_get_with_http_info = arrays_erasures_get_with_http_info + api256_arrays_erasures_patch_with_http_info = arrays_erasures_patch_with_http_info + api256_arrays_erasures_post_with_http_info = arrays_erasures_post_with_http_info + api256_arrays_eula_get_with_http_info = arrays_eula_get_with_http_info + api256_arrays_eula_patch_with_http_info = arrays_eula_patch_with_http_info + api256_arrays_factory_reset_token_delete_with_http_info = arrays_factory_reset_token_delete_with_http_info + api256_arrays_factory_reset_token_get_with_http_info = arrays_factory_reset_token_get_with_http_info + api256_arrays_factory_reset_token_post_with_http_info = arrays_factory_reset_token_post_with_http_info + api256_arrays_get_with_http_info = arrays_get_with_http_info + api256_arrays_ntp_test_get_with_http_info = arrays_ntp_test_get_with_http_info + api256_arrays_patch_with_http_info = arrays_patch_with_http_info + api256_arrays_performance_by_link_get_with_http_info = arrays_performance_by_link_get_with_http_info + api256_arrays_performance_get_with_http_info = arrays_performance_get_with_http_info + api256_arrays_space_get_with_http_info = arrays_space_get_with_http_info + api256_arrays_tags_batch_put_with_http_info = arrays_tags_batch_put_with_http_info + api256_arrays_tags_delete_with_http_info = arrays_tags_delete_with_http_info + api256_arrays_tags_get_with_http_info = arrays_tags_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/audits_api_v_2_49.py b/pypureclient/flasharray/_common/apis/audits_api_v_2_49.py index ff7570f386..ed82633f9c 100644 --- a/pypureclient/flasharray/_common/apis/audits_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/audits_api_v_2_49.py @@ -242,3 +242,5 @@ def audits_get_with_http_info( api252_audits_get_with_http_info = audits_get_with_http_info api253_audits_get_with_http_info = audits_get_with_http_info api254_audits_get_with_http_info = audits_get_with_http_info + api255_audits_get_with_http_info = audits_get_with_http_info + api256_audits_get_with_http_info = audits_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/authorization_api_v_2_47.py b/pypureclient/flasharray/_common/apis/authorization_api_v_2_47.py index 34183fcdcc..cd97aea6d8 100644 --- a/pypureclient/flasharray/_common/apis/authorization_api_v_2_47.py +++ b/pypureclient/flasharray/_common/apis/authorization_api_v_2_47.py @@ -567,3 +567,11 @@ def oauth210_token_post_with_http_info( api254_logout_post_with_http_info = logout_post_with_http_info api254_api_api_version_get_with_http_info = api_api_version_get_with_http_info api254_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info + api255_login_post_with_http_info = login_post_with_http_info + api255_logout_post_with_http_info = logout_post_with_http_info + api255_api_api_version_get_with_http_info = api_api_version_get_with_http_info + api255_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info + api256_login_post_with_http_info = login_post_with_http_info + api256_logout_post_with_http_info = logout_post_with_http_info + api256_api_api_version_get_with_http_info = api_api_version_get_with_http_info + api256_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/buckets_api_v_2_52.py b/pypureclient/flasharray/_common/apis/buckets_api_v_2_52.py index e7b6397bfa..d8ab2d587e 100644 --- a/pypureclient/flasharray/_common/apis/buckets_api_v_2_52.py +++ b/pypureclient/flasharray/_common/apis/buckets_api_v_2_52.py @@ -1103,3 +1103,15 @@ def buckets_space_get_with_http_info( api254_buckets_performance_get_with_http_info = buckets_performance_get_with_http_info api254_buckets_post_with_http_info = buckets_post_with_http_info api254_buckets_space_get_with_http_info = buckets_space_get_with_http_info + api255_buckets_delete_with_http_info = buckets_delete_with_http_info + api255_buckets_get_with_http_info = buckets_get_with_http_info + api255_buckets_patch_with_http_info = buckets_patch_with_http_info + api255_buckets_performance_get_with_http_info = buckets_performance_get_with_http_info + api255_buckets_post_with_http_info = buckets_post_with_http_info + api255_buckets_space_get_with_http_info = buckets_space_get_with_http_info + api256_buckets_delete_with_http_info = buckets_delete_with_http_info + api256_buckets_get_with_http_info = buckets_get_with_http_info + api256_buckets_patch_with_http_info = buckets_patch_with_http_info + api256_buckets_performance_get_with_http_info = buckets_performance_get_with_http_info + api256_buckets_post_with_http_info = buckets_post_with_http_info + api256_buckets_space_get_with_http_info = buckets_space_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/certificate_groups_api_v_2_41.py b/pypureclient/flasharray/_common/apis/certificate_groups_api_v_2_41.py index d5b838377c..9e36ee54dd 100644 --- a/pypureclient/flasharray/_common/apis/certificate_groups_api_v_2_41.py +++ b/pypureclient/flasharray/_common/apis/certificate_groups_api_v_2_41.py @@ -1222,3 +1222,17 @@ def certificate_groups_uses_get_with_http_info( api254_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info api254_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info api254_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info + api255_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info + api255_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info + api255_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info + api255_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info + api255_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info + api255_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info + api255_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info + api256_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info + api256_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info + api256_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info + api256_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info + api256_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info + api256_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info + api256_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/certificates_api_v_2_41.py b/pypureclient/flasharray/_common/apis/certificates_api_v_2_41.py index 3e043bf511..e26ae4603d 100644 --- a/pypureclient/flasharray/_common/apis/certificates_api_v_2_41.py +++ b/pypureclient/flasharray/_common/apis/certificates_api_v_2_41.py @@ -1548,3 +1548,21 @@ def certificates_uses_get_with_http_info( api254_certificates_patch_with_http_info = certificates_patch_with_http_info api254_certificates_post_with_http_info = certificates_post_with_http_info api254_certificates_uses_get_with_http_info = certificates_uses_get_with_http_info + api255_certificates_certificate_groups_delete_with_http_info = certificates_certificate_groups_delete_with_http_info + api255_certificates_certificate_groups_get_with_http_info = certificates_certificate_groups_get_with_http_info + api255_certificates_certificate_groups_post_with_http_info = certificates_certificate_groups_post_with_http_info + api255_certificates_certificate_signing_requests_post_with_http_info = certificates_certificate_signing_requests_post_with_http_info + api255_certificates_delete_with_http_info = certificates_delete_with_http_info + api255_certificates_get_with_http_info = certificates_get_with_http_info + api255_certificates_patch_with_http_info = certificates_patch_with_http_info + api255_certificates_post_with_http_info = certificates_post_with_http_info + api255_certificates_uses_get_with_http_info = certificates_uses_get_with_http_info + api256_certificates_certificate_groups_delete_with_http_info = certificates_certificate_groups_delete_with_http_info + api256_certificates_certificate_groups_get_with_http_info = certificates_certificate_groups_get_with_http_info + api256_certificates_certificate_groups_post_with_http_info = certificates_certificate_groups_post_with_http_info + api256_certificates_certificate_signing_requests_post_with_http_info = certificates_certificate_signing_requests_post_with_http_info + api256_certificates_delete_with_http_info = certificates_delete_with_http_info + api256_certificates_get_with_http_info = certificates_get_with_http_info + api256_certificates_patch_with_http_info = certificates_patch_with_http_info + api256_certificates_post_with_http_info = certificates_post_with_http_info + api256_certificates_uses_get_with_http_info = certificates_uses_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/connections_api_v_2_49.py b/pypureclient/flasharray/_common/apis/connections_api_v_2_49.py index 5cfd9479c6..f745b1ee7d 100644 --- a/pypureclient/flasharray/_common/apis/connections_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/connections_api_v_2_49.py @@ -606,3 +606,9 @@ def connections_post_with_http_info( api254_connections_delete_with_http_info = connections_delete_with_http_info api254_connections_get_with_http_info = connections_get_with_http_info api254_connections_post_with_http_info = connections_post_with_http_info + api255_connections_delete_with_http_info = connections_delete_with_http_info + api255_connections_get_with_http_info = connections_get_with_http_info + api255_connections_post_with_http_info = connections_post_with_http_info + api256_connections_delete_with_http_info = connections_delete_with_http_info + api256_connections_get_with_http_info = connections_get_with_http_info + api256_connections_post_with_http_info = connections_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/container_default_protections_api_v_2_49.py b/pypureclient/flasharray/_common/apis/container_default_protections_api_v_2_49.py index 48009e45ef..e5ac1a4b6b 100644 --- a/pypureclient/flasharray/_common/apis/container_default_protections_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/container_default_protections_api_v_2_49.py @@ -410,3 +410,7 @@ def container_default_protections_patch_with_http_info( api253_container_default_protections_patch_with_http_info = container_default_protections_patch_with_http_info api254_container_default_protections_get_with_http_info = container_default_protections_get_with_http_info api254_container_default_protections_patch_with_http_info = container_default_protections_patch_with_http_info + api255_container_default_protections_get_with_http_info = container_default_protections_get_with_http_info + api255_container_default_protections_patch_with_http_info = container_default_protections_patch_with_http_info + api256_container_default_protections_get_with_http_info = container_default_protections_get_with_http_info + api256_container_default_protections_patch_with_http_info = container_default_protections_patch_with_http_info diff --git a/pypureclient/flasharray/_common/apis/controllers_api_v_2_36.py b/pypureclient/flasharray/_common/apis/controllers_api_v_2_36.py index 4558a72bd7..e7d2e78944 100644 --- a/pypureclient/flasharray/_common/apis/controllers_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/controllers_api_v_2_36.py @@ -231,3 +231,5 @@ def controllers_get_with_http_info( api252_controllers_get_with_http_info = controllers_get_with_http_info api253_controllers_get_with_http_info = controllers_get_with_http_info api254_controllers_get_with_http_info = controllers_get_with_http_info + api255_controllers_get_with_http_info = controllers_get_with_http_info + api256_controllers_get_with_http_info = controllers_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/data_sealing_keys_api_v_2_55.py b/pypureclient/flasharray/_common/apis/data_sealing_keys_api_v_2_55.py new file mode 100644 index 0000000000..269093e964 --- /dev/null +++ b/pypureclient/flasharray/_common/apis/data_sealing_keys_api_v_2_55.py @@ -0,0 +1,894 @@ + +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flasharray._common.models.data_sealing_key_get_response_v_2_55 import DataSealingKeyGetResponse +from pypureclient.flasharray._common.models.data_sealing_key_patch_v_2_55 import DataSealingKeyPatch +from pypureclient.flasharray._common.models.data_sealing_key_post_v_2_55 import DataSealingKeyPost +from pypureclient.flasharray._common.models.data_sealing_key_response_v_2_55 import DataSealingKeyResponse +from pypureclient.flasharray._common.models.data_sealing_key_rotate_v_2_55 import DataSealingKeyRotate +from pypureclient.flasharray._common.models.test_result_with_resource_and_error_context_partial_resource_response_v_2_52 import TestResultWithResourceAndErrorContextPartialResourceResponse + +class DataSealingKeysApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def data_sealing_keys_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List data sealing keys + + The list of `data sealing keys` configured for the `realm`. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DataSealingKeyGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_data_sealing_keys_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DataSealingKeyGetResponse", + '207': "DataSealingKeyGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/data-sealing-keys', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def data_sealing_keys_patch_with_http_info( + self, + data_sealing_key_patch: DataSealingKeyPatch, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify data sealing keys + + The modification of `data sealing keys`. `Keys` can be `enabled` or `disabled` to unseal or seal the matching `data-isolated realms`. The `key material` can also be rotated. + + :param data_sealing_key_patch: (required) + :type data_sealing_key_patch: DataSealingKeyPatch + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DataSealingKeyResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'data_sealing_key_patch', + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_data_sealing_keys_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['data_sealing_key_patch'] is not None: + _body_params = _params['data_sealing_key_patch'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DataSealingKeyResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/data-sealing-keys', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def data_sealing_keys_post_with_http_info( + self, + data_sealing_key: DataSealingKeyPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create data sealing keys + + The creation of `data sealing keys` for `data-isolated realms`. The `key` can be stored on an external `key management server` (e.g., `KMIP`), or provided as `keying material`. The `names` parameter is required and must specify the fully qualified name in the format `realm_name::data_sealing_key`. + + :param data_sealing_key: (required) + :type data_sealing_key: DataSealingKeyPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DataSealingKeyResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'data_sealing_key', + 'authorization', + 'x_request_id', + 'context_names', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_data_sealing_keys_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['data_sealing_key'] is not None: + _body_params = _params['data_sealing_key'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DataSealingKeyResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/data-sealing-keys', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def data_sealing_keys_rotate_post_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + data_sealing_key: Optional[DataSealingKeyRotate] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Rotate data sealing keys + + The rotation of the keying material for `data sealing keys`. For `remote keys`, the `key` is automatically rotated on the external `key management server` and no `request body` is required. For `local-in-memory keys`, both the `new keying material` and the `old keying material` must be provided in the `request body`. The `names` parameter is required and must specify the fully qualified name in the format `realm_name::data_sealing_key`. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param data_sealing_key: + :type data_sealing_key: DataSealingKeyRotate + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DataSealingKeyResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'names', + 'data_sealing_key' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_data_sealing_keys_rotate_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['data_sealing_key'] is not None: + _body_params = _params['data_sealing_key'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DataSealingKeyResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/data-sealing-keys/rotate', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def data_sealing_keys_test_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Test data sealing key remote connectivity + + The connectivity test between the `FlashArray` and the external `key management server` associated with the specified `data sealing key`. This process verifies that the `server` is reachable and that the `data sealing key` can be accessed. The `names` parameter is required and must specify the fully qualified name in the format `realm-name::data-sealing-key`. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TestResultWithResourceAndErrorContextPartialResourceResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_data_sealing_keys_test_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "TestResultWithResourceAndErrorContextPartialResourceResponse", + '207': "TestResultWithResourceAndErrorContextPartialResourceResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/data-sealing-keys/test', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api255_data_sealing_keys_get_with_http_info = data_sealing_keys_get_with_http_info + api255_data_sealing_keys_patch_with_http_info = data_sealing_keys_patch_with_http_info + api255_data_sealing_keys_post_with_http_info = data_sealing_keys_post_with_http_info + api255_data_sealing_keys_rotate_post_with_http_info = data_sealing_keys_rotate_post_with_http_info + api255_data_sealing_keys_test_get_with_http_info = data_sealing_keys_test_get_with_http_info + api256_data_sealing_keys_get_with_http_info = data_sealing_keys_get_with_http_info + api256_data_sealing_keys_patch_with_http_info = data_sealing_keys_patch_with_http_info + api256_data_sealing_keys_post_with_http_info = data_sealing_keys_post_with_http_info + api256_data_sealing_keys_rotate_post_with_http_info = data_sealing_keys_rotate_post_with_http_info + api256_data_sealing_keys_test_get_with_http_info = data_sealing_keys_test_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/directories_api_v_2_55.py b/pypureclient/flasharray/_common/apis/directories_api_v_2_55.py new file mode 100644 index 0000000000..cdd1486b41 --- /dev/null +++ b/pypureclient/flasharray/_common/apis/directories_api_v_2_55.py @@ -0,0 +1,6732 @@ + +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flasharray._common.models.directories_groups_get_response_v_2_50 import DirectoriesGroupsGetResponse +from pypureclient.flasharray._common.models.directories_performance_by_array_get_response_v_2_55 import DirectoriesPerformanceByArrayGetResponse +from pypureclient.flasharray._common.models.directories_users_get_response_v_2_50 import DirectoriesUsersGetResponse +from pypureclient.flasharray._common.models.directory_get_response_v_2_55 import DirectoryGetResponse +from pypureclient.flasharray._common.models.directory_lock_nlm_reclamation_response_v_2_50 import DirectoryLockNlmReclamationResponse +from pypureclient.flasharray._common.models.directory_patch_v_2_55 import DirectoryPatch +from pypureclient.flasharray._common.models.directory_performance_get_response_v_2_55 import DirectoryPerformanceGetResponse +from pypureclient.flasharray._common.models.directory_policy_export_post_v_2_49 import DirectoryPolicyExportPost +from pypureclient.flasharray._common.models.directory_policy_post_v_2_49 import DirectoryPolicyPost +from pypureclient.flasharray._common.models.directory_post_v_2_55 import DirectoryPost +from pypureclient.flasharray._common.models.directory_qos_get_response_v_2_54 import DirectoryQosGetResponse +from pypureclient.flasharray._common.models.directory_response_v_2_55 import DirectoryResponse +from pypureclient.flasharray._common.models.policy_member_export_get_response_v_2_55 import PolicyMemberExportGetResponse +from pypureclient.flasharray._common.models.policy_member_export_response_v_2_55 import PolicyMemberExportResponse +from pypureclient.flasharray._common.models.policy_member_get_response_v_2_51 import PolicyMemberGetResponse +from pypureclient.flasharray._common.models.policy_member_response_v_2_51 import PolicyMemberResponse +from pypureclient.flasharray._common.models.resource_directory_space_get_response_v_2_50 import ResourceDirectorySpaceGetResponse + +class DirectoriesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def directories_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete managed directories + + Deletes one or more managed directories. To be deleted, a managed directory must be empty and not attached to any enabled export policies. Deleted managed directories cannot be recovered. The `ids` or `names` parameter is required, but cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directories', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + file_system_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together.")] = None, + file_system_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + workload_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter.")] = None, + workload_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List directories + + Displays a list of directories, including those pending eradication. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param file_system_ids: Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together. + :type file_system_ids: List[str] + :param file_system_names: Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`. + :type file_system_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :param workload_ids: A comma-separated list of workload IDs. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_names` query parameter. + :type workload_ids: List[str] + :param workload_names: A comma-separated list of workload names. If, after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `workload_ids` query parameter. + :type workload_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'file_system_ids', + 'file_system_names', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort', + 'total_item_count', + 'total_only', + 'workload_ids', + 'workload_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('file_system_ids') is not None: # noqa: E501 + _query_params.append(('file_system_ids', _params['file_system_ids'])) + _collection_formats['file_system_ids'] = 'csv' + + if _params.get('file_system_names') is not None: # noqa: E501 + _query_params.append(('file_system_names', _params['file_system_names'])) + _collection_formats['file_system_names'] = 'csv' + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + if _params.get('workload_ids') is not None: # noqa: E501 + _query_params.append(('workload_ids', _params['workload_ids'])) + _collection_formats['workload_ids'] = 'csv' + + if _params.get('workload_names') is not None: # noqa: E501 + _query_params.append(('workload_names', _params['workload_names'])) + _collection_formats['workload_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DirectoryGetResponse", + '207': "DirectoryGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_groups_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + file_system_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together.")] = None, + file_system_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the groups that match the given list of gids. Enter names in a comma-separated format, e.g., `2001,2002`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List group with content in directories + + Displays a list of groups, that have content in specific directories. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param file_system_ids: Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together. + :type file_system_ids: List[str] + :param file_system_names: Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`. + :type file_system_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param group_ids: Performs the operation on the groups that match the given list of gids. Enter names in a comma-separated format, e.g., `2001,2002`. + :type group_ids: List[int] + :param group_names: Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoriesGroupsGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'file_system_ids', + 'file_system_names', + 'filter', + 'group_ids', + 'group_names', + 'group_sids', + 'ids', + 'limit', + 'names', + 'offset', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_groups_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('file_system_ids') is not None: # noqa: E501 + _query_params.append(('file_system_ids', _params['file_system_ids'])) + _collection_formats['file_system_ids'] = 'csv' + + if _params.get('file_system_names') is not None: # noqa: E501 + _query_params.append(('file_system_names', _params['file_system_names'])) + _collection_formats['file_system_names'] = 'csv' + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('group_ids') is not None: # noqa: E501 + _query_params.append(('group_ids', _params['group_ids'])) + _collection_formats['group_ids'] = 'csv' + + if _params.get('group_names') is not None: # noqa: E501 + _query_params.append(('group_names', _params['group_names'])) + _collection_formats['group_names'] = 'csv' + + if _params.get('group_sids') is not None: # noqa: E501 + _query_params.append(('group_sids', _params['group_sids'])) + _collection_formats['group_sids'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DirectoriesGroupsGetResponse", + '207': "DirectoriesGroupsGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/groups', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_locks_nlm_reclamations_post_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create NLM reclamation + + Creates an NLM reclamation, which is a system-wide operation that affects all clients, so only one may be in progress at a time. Attempting to initiate reclamation while one is in progress will result in an error. When NLM reclamation is initiated, all NLM locks are deleted and client applications are notified that they can reacquire their locks within a grace period. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryLockNlmReclamationResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'context_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_locks_nlm_reclamations_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DirectoryLockNlmReclamationResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/locks/nlm-reclamations', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_patch_with_http_info( + self, + directory: DirectoryPatch, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify a managed directory + + Modifies a managed directory. To rename a managed directory, set `name` to the new name. The `ids` or `names` parameter is required, but cannot be set together. The `name` or `directory_name` parameter is required. + + :param directory: (required) + :type directory: DirectoryPatch + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'directory', + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['directory'] is not None: + _body_params = _params['directory'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DirectoryResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_performance_by_array_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List directories performance data by array + + The real-time and historical `performance data`, real-time `latency data`, and average `I/O size data`. The `data` is displayed as a total across all `directories` on the `local array` and by individual `directory`. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`. + :type protocol: str + :param resolution: The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoriesPerformanceByArrayGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'end_time', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'protocol', + 'resolution', + 'sort', + 'start_time', + 'total_item_count', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_performance_by_array_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('end_time') is not None: # noqa: E501 + _query_params.append(('end_time', _params['end_time'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('protocol') is not None: # noqa: E501 + _query_params.append(('protocol', _params['protocol'])) + + if _params.get('resolution') is not None: # noqa: E501 + _query_params.append(('resolution', _params['resolution'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('start_time') is not None: # noqa: E501 + _query_params.append(('start_time', _params['start_time'])) + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DirectoriesPerformanceByArrayGetResponse", + '207': "DirectoriesPerformanceByArrayGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/performance/by-array', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_performance_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`.")] = None, + protocol_group: Annotated[Optional[StrictStr], Field(description="Protocol group type. Valid values are `block`, `file`, `object-store`, and `all`.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List directory performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes for each directory and as a total of all directories across the entire array. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`. + :type protocol: str + :param protocol_group: Protocol group type. Valid values are `block`, `file`, `object-store`, and `all`. + :type protocol_group: str + :param resolution: The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryPerformanceGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'end_time', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'protocol', + 'protocol_group', + 'resolution', + 'sort', + 'start_time', + 'total_item_count', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_performance_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('end_time') is not None: # noqa: E501 + _query_params.append(('end_time', _params['end_time'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('protocol') is not None: # noqa: E501 + _query_params.append(('protocol', _params['protocol'])) + + if _params.get('protocol_group') is not None: # noqa: E501 + _query_params.append(('protocol_group', _params['protocol_group'])) + + if _params.get('resolution') is not None: # noqa: E501 + _query_params.append(('resolution', _params['resolution'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('start_time') is not None: # noqa: E501 + _query_params.append(('start_time', _params['start_time'])) + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DirectoryPerformanceGetResponse", + '207': "DirectoryPerformanceGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/performance', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_audit_file_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete a membership between a directory and one or more audit policies + + Deletes a membership between a directory and one or more audit policies. Either the `policy_ids` or `policy_names` parameter is required, but they cannot be set together. Either the `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_audit_file_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/audit-file', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_audit_file_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List audit policies attached to a directory + + Displays a list of audit policies that are attached to directories. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_audit_file_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberGetResponse", + '207': "PolicyMemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/audit-file', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_audit_file_post_with_http_info( + self, + policies: DirectoryPolicyPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a membership between a directory and one or more audit policies + + Creates a membership between a directory and one or more audit policies. Either the `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'policies', + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_audit_file_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['policies'] is not None: + _body_params = _params['policies'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/audit-file', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_autodir_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete a membership between a directory and one or more auto managed directory policies + + Deletes a membership between a directory with one or more auto managed directory policies. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_autodir_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/autodir', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_autodir_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List auto managed directory policies attached to a directory + + Displays a list of auto managed directory policies that are attached to directories. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_autodir_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberGetResponse", + '207': "PolicyMemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/autodir', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_autodir_post_with_http_info( + self, + policies: DirectoryPolicyPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a membership between a directory with one or more auto managed directory policies + + Creates a membership between a directory with one or more auto managed directory policies. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'policies', + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_autodir_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['policies'] is not None: + _body_params = _params['policies'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/autodir', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List policies + + Displays a list of policies that are attached to directories. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberGetResponse", + '207': "PolicyMemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_nfs_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + server_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of server IDs.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete a membership between a directory and one or more NFS policies + + Deletes a membership between a directory and one or more NFS policies. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param server_ids: A comma-separated list of server IDs. + :type server_ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names', + 'server_ids', + 'server_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_nfs_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('server_ids') is not None: # noqa: E501 + _query_params.append(('server_ids', _params['server_ids'])) + _collection_formats['server_ids'] = 'csv' + + if _params.get('server_names') is not None: # noqa: E501 + _query_params.append(('server_names', _params['server_names'])) + _collection_formats['server_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/nfs', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_nfs_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List NFS policies attached to a directory + + Displays a list of NFS policies that are attached to directories. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberExportGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_nfs_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberExportGetResponse", + '207': "PolicyMemberExportGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/nfs', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_nfs_post_with_http_info( + self, + policies: DirectoryPolicyExportPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a membership between a directory and one or more NFS policies + + Creates a membership between a directory and one or more NFS policies. The `member_ids` or `member_names` parameter is required but cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyExportPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberExportResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'policies', + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_nfs_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['policies'] is not None: + _body_params = _params['policies'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberExportResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/nfs', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_qos_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete a membership between a directory and one or more QoS policies + + The operation that deletes a `membership` between a `directory` and one or more `QoS policies` by detaching them. For this request, either `policy_ids` or `policy_names` must be provided, and either `member_ids` or `member_names` must be provided; however, the ID and name parameters for each respective category cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_qos_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/qos', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_qos_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List QoS policies attached to a directory + + The operation that displays a list of `QoS policies` that are attached to `directories`. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_qos_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberGetResponse", + '207': "PolicyMemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/qos', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_qos_post_with_http_info( + self, + policies: DirectoryPolicyPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a membership between a directory and one or more QoS policies + + The operation that creates a `membership` between a `directory` and one or more `QoS policies` by attaching them. Either the `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'policies', + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_qos_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['policies'] is not None: + _body_params = _params['policies'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/qos', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_quota_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete a membership between a directory and one or more quota policies + + Deletes a membership between a directory and one or more quota policies. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_quota_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/quota', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_quota_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List quota policies attached to a directory + + Displays a list of quota policies that are attached to directories. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_quota_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberGetResponse", + '207': "PolicyMemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/quota', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_quota_post_with_http_info( + self, + policies: DirectoryPolicyPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a membership between a directory and one or more quota policies + + Creates a membership between a directory and one or more quota policies. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`. + :type ignore_usage: bool + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'policies', + 'authorization', + 'x_request_id', + 'context_names', + 'ignore_usage', + 'member_ids', + 'member_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_quota_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ignore_usage') is not None: # noqa: E501 + _query_params.append(('ignore_usage', _params['ignore_usage'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['policies'] is not None: + _body_params = _params['policies'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/quota', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_smb_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + server_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of server IDs.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete a membership between a directory and one or more SMB policies + + Deletes a membership between a directory and one or more SMB policies. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param server_ids: A comma-separated list of server IDs. + :type server_ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names', + 'server_ids', + 'server_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_smb_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('server_ids') is not None: # noqa: E501 + _query_params.append(('server_ids', _params['server_ids'])) + _collection_formats['server_ids'] = 'csv' + + if _params.get('server_names') is not None: # noqa: E501 + _query_params.append(('server_names', _params['server_names'])) + _collection_formats['server_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/smb', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_smb_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List SMB policies attached to a directory + + Displays a list of SMB policies that are attached to directories. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberExportGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_smb_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberExportGetResponse", + '207': "PolicyMemberExportGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/smb', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_smb_post_with_http_info( + self, + policies: DirectoryPolicyExportPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a membership between a directory and one or more SMB policies + + Creates a membership between a directory and one or more SMB policies. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyExportPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberExportResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'policies', + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_smb_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['policies'] is not None: + _body_params = _params['policies'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberExportResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/smb', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_snapshot_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete a membership between a directory and one or more snapshot policies + + Deletes a membership between a directory and one or more snapshot policies. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_snapshot_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/snapshot', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_snapshot_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List snapshot policies attached to a directory + + Displays a list of snapshot policies that are attached to directories. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_snapshot_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberGetResponse", + '207': "PolicyMemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/snapshot', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_snapshot_post_with_http_info( + self, + policies: DirectoryPolicyPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a membership between a directory with one or more snapshot policies + + Creates a membership between a directory with one or more snapshot policies. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'policies', + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_snapshot_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['policies'] is not None: + _body_params = _params['policies'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/snapshot', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_user_group_quota_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete a membership between a directory and one or more user-group-quota policies + + Deletes a membership between a directory and one or more user-group-quota policies. The `policy_ids` or `policy_names` parameter is required, but cannot be set together. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`. + :type ignore_usage: bool + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'ignore_usage', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_user_group_quota_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ignore_usage') is not None: # noqa: E501 + _query_params.append(('ignore_usage', _params['ignore_usage'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/user-group-quota', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_user_group_quota_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List user-group-quota policies attached to a directory + + Displays a list of user-group-quota policies that are attached to directories. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_user_group_quota_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberGetResponse", + '207': "PolicyMemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/user-group-quota', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_policies_user_group_quota_post_with_http_info( + self, + policies: DirectoryPolicyPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a membership between a directory and one or more user-group-quota policies + + Creates a membership between a directory and one or more user-group-quota policies. The `member_ids` or `member_names` parameter is required, but cannot be set together. + + :param policies: (required) + :type policies: DirectoryPolicyPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ignore_usage: Flag used to override checks for user-group-quota management operations. If set to `true`, user/group usage is not checked against the `quota_limits` of user-group-quota rules. If set to `false`, the impact of the user-group-quota operation is checked against the user/group usage in the managed directory and its ancestors and the operation is not allowed if the user/group usage would exceed any enforced user-group-quota limits. If not specified, defaults to `false`. + :type ignore_usage: bool + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'policies', + 'authorization', + 'x_request_id', + 'context_names', + 'ignore_usage', + 'member_ids', + 'member_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_policies_user_group_quota_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ignore_usage') is not None: # noqa: E501 + _query_params.append(('ignore_usage', _params['ignore_usage'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['policies'] is not None: + _body_params = _params['policies'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/policies/user-group-quota', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_post_with_http_info( + self, + directory: DirectoryPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + add_to_policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The managed directories will become members of the specified policies along with creation. Enter multiple ids in comma-separated format.")] = None, + add_to_policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="The managed directories will become members of the specified policies along with creation. Enter multiple names in a comma-separated format.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + file_system_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together.")] = None, + file_system_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + overwrite: Annotated[Optional[StrictBool], Field(description="If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the initial protection of the newly created managed directories will be the union of the container default protection policies thatare not already applied to any of their ancestors, and either `add_to_policy_names` or `add_to_policy_ids`. If specified as `false`, the default protection of the container will not be applied automatically. The initial protection of the newly created managed directories will be configured by either `add_to_policy_names` or `add_to_policy_ids`. If not specified, defaults to `true`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create or copy directory + + The operation that creates a `managed directory` at the specified path. The `managed directory` name must consist of a `file system` name prefix and a `managed directory` name suffix, separated by a colon (:). The suffix must be between 1 and 63 characters (alphanumeric and '-') in length and must begin and end with a letter or number. Additionally, the suffix must include at least one letter or '-'. Users must either set `names` to create a `managed directory` with a specified full name, or set `file_system_names` or `file_system_ids` in the query parameters along with `suffix` in the body parameters; these two options are mutually exclusive. The `add_to_policy_names` and `add_to_policy_ids` query parameters specify a list of policy names or IDs to apply to the new `managed directory` and are mutually exclusive. The `with_default_protection` parameter specifies whether to use the container default protection. Note that `add_to_policy_names` and `with_default_protection` cannot be provided when `overwrite` is `true`. + + :param directory: (required) + :type directory: DirectoryPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param add_to_policy_ids: The managed directories will become members of the specified policies along with creation. Enter multiple ids in comma-separated format. + :type add_to_policy_ids: List[str] + :param add_to_policy_names: The managed directories will become members of the specified policies along with creation. Enter multiple names in a comma-separated format. + :type add_to_policy_names: List[str] + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param file_system_ids: Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together. + :type file_system_ids: List[str] + :param file_system_names: Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`. + :type file_system_names: List[str] + :param ignore_usage: Flag used to override checks for quota management operations. If set to `true`, directory usage is not checked against the `quota_limits` that are set. If set to `false`, the actual logical bytes in use are prevented from exceeding the limits set on the directory. Client operations might be impacted. If the limit exceeds the quota, the client operation is not allowed. If not specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param overwrite: If set to `true`, overwrites an existing object during an object copy operation. If set to `false` or not set at all and the target name is an existing object, the copy operation fails. Required if the `source` body parameter is set and the source overwrites an existing object during the copy operation. + :type overwrite: bool + :param with_default_protection: If specified as `true`, the initial protection of the newly created managed directories will be the union of the container default protection policies thatare not already applied to any of their ancestors, and either `add_to_policy_names` or `add_to_policy_ids`. If specified as `false`, the default protection of the container will not be applied automatically. The initial protection of the newly created managed directories will be configured by either `add_to_policy_names` or `add_to_policy_ids`. If not specified, defaults to `true`. + :type with_default_protection: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'directory', + 'authorization', + 'x_request_id', + 'add_to_policy_ids', + 'add_to_policy_names', + 'context_names', + 'file_system_ids', + 'file_system_names', + 'ignore_usage', + 'names', + 'overwrite', + 'with_default_protection' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('add_to_policy_ids') is not None: # noqa: E501 + _query_params.append(('add_to_policy_ids', _params['add_to_policy_ids'])) + _collection_formats['add_to_policy_ids'] = 'csv' + + if _params.get('add_to_policy_names') is not None: # noqa: E501 + _query_params.append(('add_to_policy_names', _params['add_to_policy_names'])) + _collection_formats['add_to_policy_names'] = 'csv' + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('file_system_ids') is not None: # noqa: E501 + _query_params.append(('file_system_ids', _params['file_system_ids'])) + _collection_formats['file_system_ids'] = 'csv' + + if _params.get('file_system_names') is not None: # noqa: E501 + _query_params.append(('file_system_names', _params['file_system_names'])) + _collection_formats['file_system_names'] = 'csv' + + if _params.get('ignore_usage') is not None: # noqa: E501 + _query_params.append(('ignore_usage', _params['ignore_usage'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('overwrite') is not None: # noqa: E501 + _query_params.append(('overwrite', _params['overwrite'])) + + if _params.get('with_default_protection') is not None: # noqa: E501 + _query_params.append(('with_default_protection', _params['with_default_protection'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['directory'] is not None: + _body_params = _params['directory'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DirectoryResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_qos_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List directory QoS policy configurations + + The operation that displays real-time and historical `QoS policy configurations` for each `directory`. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryQosGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'end_time', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'resolution', + 'sort', + 'start_time', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_qos_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('end_time') is not None: # noqa: E501 + _query_params.append(('end_time', _params['end_time'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('resolution') is not None: # noqa: E501 + _query_params.append(('resolution', _params['resolution'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('start_time') is not None: # noqa: E501 + _query_params.append(('start_time', _params['start_time'])) + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DirectoryQosGetResponse", + '207': "DirectoryQosGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/qos', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_space_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List directory space information + + Displays physical storage consumption data for each directory. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ResourceDirectorySpaceGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'end_time', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'resolution', + 'sort', + 'start_time', + 'total_item_count', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_space_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('end_time') is not None: # noqa: E501 + _query_params.append(('end_time', _params['end_time'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('resolution') is not None: # noqa: E501 + _query_params.append(('resolution', _params['resolution'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('start_time') is not None: # noqa: E501 + _query_params.append(('start_time', _params['start_time'])) + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ResourceDirectorySpaceGetResponse", + '207': "ResourceDirectorySpaceGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/space', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directories_users_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + file_system_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together.")] = None, + file_system_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + user_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the users that match the given list of uids. Enter names in a comma-separated format, for example, `1001,1002`.")] = None, + user_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the users that match the given list of user names. Enter names in a comma-separated format, for example, `u1,u2`.")] = None, + user_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the users that match the given list of user SIDs. Enter SIDs in a comma-separated format, for example, `S-1-1-20-1000,S-1-1-20-2002`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List users with content in directories + + Displays a list of users that have content in specific directories. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param file_system_ids: Performs the operation on the file system ID specified. Enter multiple file system IDs in comma-separated format. The `file_system_ids` or `file_system_names` parameter is required, but they cannot be set together. + :type file_system_ids: List[str] + :param file_system_names: Performs the operation on the file system name specified. Enter multiple file system names in comma-separated format. For example, `filesystem01,filesystem02`. + :type file_system_names: List[str] + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param user_ids: Performs the operation on the users that match the given list of uids. Enter names in a comma-separated format, for example, `1001,1002`. + :type user_ids: List[int] + :param user_names: Performs the operation on the users that match the given list of user names. Enter names in a comma-separated format, for example, `u1,u2`. + :type user_names: List[str] + :param user_sids: Performs the operation on the users that match the given list of user SIDs. Enter SIDs in a comma-separated format, for example, `S-1-1-20-1000,S-1-1-20-2002`. + :type user_sids: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoriesUsersGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'file_system_ids', + 'file_system_names', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort', + 'total_item_count', + 'user_ids', + 'user_names', + 'user_sids' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directories_users_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('file_system_ids') is not None: # noqa: E501 + _query_params.append(('file_system_ids', _params['file_system_ids'])) + _collection_formats['file_system_ids'] = 'csv' + + if _params.get('file_system_names') is not None: # noqa: E501 + _query_params.append(('file_system_names', _params['file_system_names'])) + _collection_formats['file_system_names'] = 'csv' + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('user_ids') is not None: # noqa: E501 + _query_params.append(('user_ids', _params['user_ids'])) + _collection_formats['user_ids'] = 'csv' + + if _params.get('user_names') is not None: # noqa: E501 + _query_params.append(('user_names', _params['user_names'])) + _collection_formats['user_names'] = 'csv' + + if _params.get('user_sids') is not None: # noqa: E501 + _query_params.append(('user_sids', _params['user_sids'])) + _collection_formats['user_sids'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DirectoriesUsersGetResponse", + '207': "DirectoriesUsersGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directories/users', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api255_directories_delete_with_http_info = directories_delete_with_http_info + api255_directories_get_with_http_info = directories_get_with_http_info + api255_directories_groups_get_with_http_info = directories_groups_get_with_http_info + api255_directories_locks_nlm_reclamations_post_with_http_info = directories_locks_nlm_reclamations_post_with_http_info + api255_directories_patch_with_http_info = directories_patch_with_http_info + api255_directories_performance_by_array_get_with_http_info = directories_performance_by_array_get_with_http_info + api255_directories_performance_get_with_http_info = directories_performance_get_with_http_info + api255_directories_policies_audit_file_delete_with_http_info = directories_policies_audit_file_delete_with_http_info + api255_directories_policies_audit_file_get_with_http_info = directories_policies_audit_file_get_with_http_info + api255_directories_policies_audit_file_post_with_http_info = directories_policies_audit_file_post_with_http_info + api255_directories_policies_autodir_delete_with_http_info = directories_policies_autodir_delete_with_http_info + api255_directories_policies_autodir_get_with_http_info = directories_policies_autodir_get_with_http_info + api255_directories_policies_autodir_post_with_http_info = directories_policies_autodir_post_with_http_info + api255_directories_policies_get_with_http_info = directories_policies_get_with_http_info + api255_directories_policies_nfs_delete_with_http_info = directories_policies_nfs_delete_with_http_info + api255_directories_policies_nfs_get_with_http_info = directories_policies_nfs_get_with_http_info + api255_directories_policies_nfs_post_with_http_info = directories_policies_nfs_post_with_http_info + api255_directories_policies_qos_delete_with_http_info = directories_policies_qos_delete_with_http_info + api255_directories_policies_qos_get_with_http_info = directories_policies_qos_get_with_http_info + api255_directories_policies_qos_post_with_http_info = directories_policies_qos_post_with_http_info + api255_directories_policies_quota_delete_with_http_info = directories_policies_quota_delete_with_http_info + api255_directories_policies_quota_get_with_http_info = directories_policies_quota_get_with_http_info + api255_directories_policies_quota_post_with_http_info = directories_policies_quota_post_with_http_info + api255_directories_policies_smb_delete_with_http_info = directories_policies_smb_delete_with_http_info + api255_directories_policies_smb_get_with_http_info = directories_policies_smb_get_with_http_info + api255_directories_policies_smb_post_with_http_info = directories_policies_smb_post_with_http_info + api255_directories_policies_snapshot_delete_with_http_info = directories_policies_snapshot_delete_with_http_info + api255_directories_policies_snapshot_get_with_http_info = directories_policies_snapshot_get_with_http_info + api255_directories_policies_snapshot_post_with_http_info = directories_policies_snapshot_post_with_http_info + api255_directories_policies_user_group_quota_delete_with_http_info = directories_policies_user_group_quota_delete_with_http_info + api255_directories_policies_user_group_quota_get_with_http_info = directories_policies_user_group_quota_get_with_http_info + api255_directories_policies_user_group_quota_post_with_http_info = directories_policies_user_group_quota_post_with_http_info + api255_directories_post_with_http_info = directories_post_with_http_info + api255_directories_qos_get_with_http_info = directories_qos_get_with_http_info + api255_directories_space_get_with_http_info = directories_space_get_with_http_info + api255_directories_users_get_with_http_info = directories_users_get_with_http_info + api256_directories_delete_with_http_info = directories_delete_with_http_info + api256_directories_get_with_http_info = directories_get_with_http_info + api256_directories_groups_get_with_http_info = directories_groups_get_with_http_info + api256_directories_locks_nlm_reclamations_post_with_http_info = directories_locks_nlm_reclamations_post_with_http_info + api256_directories_patch_with_http_info = directories_patch_with_http_info + api256_directories_performance_by_array_get_with_http_info = directories_performance_by_array_get_with_http_info + api256_directories_performance_get_with_http_info = directories_performance_get_with_http_info + api256_directories_policies_audit_file_delete_with_http_info = directories_policies_audit_file_delete_with_http_info + api256_directories_policies_audit_file_get_with_http_info = directories_policies_audit_file_get_with_http_info + api256_directories_policies_audit_file_post_with_http_info = directories_policies_audit_file_post_with_http_info + api256_directories_policies_autodir_delete_with_http_info = directories_policies_autodir_delete_with_http_info + api256_directories_policies_autodir_get_with_http_info = directories_policies_autodir_get_with_http_info + api256_directories_policies_autodir_post_with_http_info = directories_policies_autodir_post_with_http_info + api256_directories_policies_get_with_http_info = directories_policies_get_with_http_info + api256_directories_policies_nfs_delete_with_http_info = directories_policies_nfs_delete_with_http_info + api256_directories_policies_nfs_get_with_http_info = directories_policies_nfs_get_with_http_info + api256_directories_policies_nfs_post_with_http_info = directories_policies_nfs_post_with_http_info + api256_directories_policies_qos_delete_with_http_info = directories_policies_qos_delete_with_http_info + api256_directories_policies_qos_get_with_http_info = directories_policies_qos_get_with_http_info + api256_directories_policies_qos_post_with_http_info = directories_policies_qos_post_with_http_info + api256_directories_policies_quota_delete_with_http_info = directories_policies_quota_delete_with_http_info + api256_directories_policies_quota_get_with_http_info = directories_policies_quota_get_with_http_info + api256_directories_policies_quota_post_with_http_info = directories_policies_quota_post_with_http_info + api256_directories_policies_smb_delete_with_http_info = directories_policies_smb_delete_with_http_info + api256_directories_policies_smb_get_with_http_info = directories_policies_smb_get_with_http_info + api256_directories_policies_smb_post_with_http_info = directories_policies_smb_post_with_http_info + api256_directories_policies_snapshot_delete_with_http_info = directories_policies_snapshot_delete_with_http_info + api256_directories_policies_snapshot_get_with_http_info = directories_policies_snapshot_get_with_http_info + api256_directories_policies_snapshot_post_with_http_info = directories_policies_snapshot_post_with_http_info + api256_directories_policies_user_group_quota_delete_with_http_info = directories_policies_user_group_quota_delete_with_http_info + api256_directories_policies_user_group_quota_get_with_http_info = directories_policies_user_group_quota_get_with_http_info + api256_directories_policies_user_group_quota_post_with_http_info = directories_policies_user_group_quota_post_with_http_info + api256_directories_post_with_http_info = directories_post_with_http_info + api256_directories_qos_get_with_http_info = directories_qos_get_with_http_info + api256_directories_space_get_with_http_info = directories_space_get_with_http_info + api256_directories_users_get_with_http_info = directories_users_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/directory_exports_api_v_2_51.py b/pypureclient/flasharray/_common/apis/directory_exports_api_v_2_51.py index 79a2da3968..40bd74d0a6 100644 --- a/pypureclient/flasharray/_common/apis/directory_exports_api_v_2_51.py +++ b/pypureclient/flasharray/_common/apis/directory_exports_api_v_2_51.py @@ -869,3 +869,11 @@ def directory_exports_post_with_http_info( api254_directory_exports_get_with_http_info = directory_exports_get_with_http_info api254_directory_exports_patch_with_http_info = directory_exports_patch_with_http_info api254_directory_exports_post_with_http_info = directory_exports_post_with_http_info + api255_directory_exports_delete_with_http_info = directory_exports_delete_with_http_info + api255_directory_exports_get_with_http_info = directory_exports_get_with_http_info + api255_directory_exports_patch_with_http_info = directory_exports_patch_with_http_info + api255_directory_exports_post_with_http_info = directory_exports_post_with_http_info + api256_directory_exports_delete_with_http_info = directory_exports_delete_with_http_info + api256_directory_exports_get_with_http_info = directory_exports_get_with_http_info + api256_directory_exports_patch_with_http_info = directory_exports_patch_with_http_info + api256_directory_exports_post_with_http_info = directory_exports_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/directory_quotas_api_v_2_49.py b/pypureclient/flasharray/_common/apis/directory_quotas_api_v_2_49.py index 4a5febaeb3..4710c4e7f8 100644 --- a/pypureclient/flasharray/_common/apis/directory_quotas_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/directory_quotas_api_v_2_49.py @@ -258,3 +258,5 @@ def directory_quotas_get_with_http_info( api252_directory_quotas_get_with_http_info = directory_quotas_get_with_http_info api253_directory_quotas_get_with_http_info = directory_quotas_get_with_http_info api254_directory_quotas_get_with_http_info = directory_quotas_get_with_http_info + api255_directory_quotas_get_with_http_info = directory_quotas_get_with_http_info + api256_directory_quotas_get_with_http_info = directory_quotas_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/directory_services_api_v_2_55.py b/pypureclient/flasharray/_common/apis/directory_services_api_v_2_55.py new file mode 100644 index 0000000000..0db16bbbc4 --- /dev/null +++ b/pypureclient/flasharray/_common/apis/directory_services_api_v_2_55.py @@ -0,0 +1,5485 @@ + +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flasharray._common.models.directory_service_get_response_v_2_55 import DirectoryServiceGetResponse +from pypureclient.flasharray._common.models.directory_service_patch_v_2_54 import DirectoryServicePatch +from pypureclient.flasharray._common.models.directory_service_post_v_2_50 import DirectoryServicePost +from pypureclient.flasharray._common.models.directory_service_response_v_2_55 import DirectoryServiceResponse +from pypureclient.flasharray._common.models.directory_service_role_get_response_v_2_50 import DirectoryServiceRoleGetResponse +from pypureclient.flasharray._common.models.directory_service_role_post_v_2_54 import DirectoryServiceRolePost +from pypureclient.flasharray._common.models.directory_service_role_response_v_2_50 import DirectoryServiceRoleResponse +from pypureclient.flasharray._common.models.directory_service_role_v_2_50 import DirectoryServiceRole +from pypureclient.flasharray._common.models.local_directory_service_get_response_v_2_55 import LocalDirectoryServiceGetResponse +from pypureclient.flasharray._common.models.local_directory_service_post_v_2_44 import LocalDirectoryServicePost +from pypureclient.flasharray._common.models.local_directory_service_response_v_2_55 import LocalDirectoryServiceResponse +from pypureclient.flasharray._common.models.local_directory_service_v_2_55 import LocalDirectoryService +from pypureclient.flasharray._common.models.local_group_get_response_v_2_55 import LocalGroupGetResponse +from pypureclient.flasharray._common.models.local_group_membership_post_v_2_54 import LocalGroupMembershipPost +from pypureclient.flasharray._common.models.local_group_patch_v_2_50 import LocalGroupPatch +from pypureclient.flasharray._common.models.local_group_post_v_2_21 import LocalGroupPost +from pypureclient.flasharray._common.models.local_group_response_v_2_55 import LocalGroupResponse +from pypureclient.flasharray._common.models.local_membership_get_response_v_2_55 import LocalMembershipGetResponse +from pypureclient.flasharray._common.models.local_membership_response_v_2_55 import LocalMembershipResponse +from pypureclient.flasharray._common.models.local_user_get_response_v_2_55 import LocalUserGetResponse +from pypureclient.flasharray._common.models.local_user_membership_post_v_2_54 import LocalUserMembershipPost +from pypureclient.flasharray._common.models.local_user_patch_v_2_54 import LocalUserPatch +from pypureclient.flasharray._common.models.local_user_post_v_2_54 import LocalUserPost +from pypureclient.flasharray._common.models.local_user_response_v_2_55 import LocalUserResponse +from pypureclient.flasharray._common.models.policy_assignment_post_v_2_49 import PolicyAssignmentPost +from pypureclient.flasharray._common.models.policy_member_clean_get_response_v_2_50 import PolicyMemberCleanGetResponse +from pypureclient.flasharray._common.models.policy_member_clean_response_v_2_50 import PolicyMemberCleanResponse +from pypureclient.flasharray._common.models.test_get_result_with_resource_error_context_multiserver_aware_response_v_2_52 import TestGetResultWithResourceErrorContextMultiserverAwareResponse +from pypureclient.flasharray._common.models.test_patch_result_with_resource_multiserver_aware_response_v_2_52 import TestPatchResultWithResourceMultiserverAwareResponse + +class DirectoryServicesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def directory_services_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete directory services configuration + + Deletes directory services configuration. Directory service configuration must not be referenced by any server nor enabled to be deleted. The built-in \"management\" directory service cannot be deleted. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directory-services', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List directory services configuration + + Displays the directory services configuration settings for manageability. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryServiceGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DirectoryServiceGetResponse", + '207': "DirectoryServiceGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_directory_services_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete local directory services + + Deletes local directory services. Local directory service can't be deleted when referenced by any server. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_directory_services_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/directory-services', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_directory_services_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List local directory services + + Displays a list of local directory services. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LocalDirectoryServiceGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_directory_services_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "LocalDirectoryServiceGetResponse", + '207': "LocalDirectoryServiceGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/directory-services', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_directory_services_patch_with_http_info( + self, + local_directory: LocalDirectoryService, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + to_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format.")] = None, + to_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify local directory service + + Modifies local directory services. + + :param local_directory: (required) + :type local_directory: LocalDirectoryService + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. + :type names: List[str] + :param to_member_ids: The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format. + :type to_member_ids: List[str] + :param to_member_names: The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format. + :type to_member_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LocalDirectoryServiceResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'local_directory', + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'names', + 'to_member_ids', + 'to_member_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_directory_services_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('to_member_ids') is not None: # noqa: E501 + _query_params.append(('to_member_ids', _params['to_member_ids'])) + _collection_formats['to_member_ids'] = 'csv' + + if _params.get('to_member_names') is not None: # noqa: E501 + _query_params.append(('to_member_names', _params['to_member_names'])) + _collection_formats['to_member_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['local_directory'] is not None: + _body_params = _params['local_directory'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "LocalDirectoryServiceResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/directory-services', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_directory_services_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_directory: Optional[LocalDirectoryServicePost] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create local directory service + + Creates a local directory service. + + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. (required) + :type names: List[str] + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_directory: + :type local_directory: LocalDirectoryServicePost + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LocalDirectoryServiceResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'authorization', + 'x_request_id', + 'context_names', + 'local_directory' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_directory_services_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['local_directory'] is not None: + _body_params = _params['local_directory'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "LocalDirectoryServiceResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/directory-services', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_groups_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete local groups + + Deletes one or more local groups. The `gids`, `names`, or `sids` parameter is required, but cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`. + :type gids: List[int] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'gids', + 'local_directory_service_ids', + 'local_directory_service_names', + 'names', + 'sids' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_groups_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('gids') is not None: # noqa: E501 + _query_params.append(('gids', _params['gids'])) + _collection_formats['gids'] = 'csv' + + if _params.get('local_directory_service_ids') is not None: # noqa: E501 + _query_params.append(('local_directory_service_ids', _params['local_directory_service_ids'])) + _collection_formats['local_directory_service_ids'] = 'csv' + + if _params.get('local_directory_service_names') is not None: # noqa: E501 + _query_params.append(('local_directory_service_names', _params['local_directory_service_names'])) + _collection_formats['local_directory_service_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('sids') is not None: # noqa: E501 + _query_params.append(('sids', _params['sids'])) + _collection_formats['sids'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/groups', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_groups_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List local groups + + Displays a list of local groups. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`. + :type gids: List[int] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LocalGroupGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'gids', + 'ids', + 'limit', + 'names', + 'offset', + 'sids', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_groups_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('gids') is not None: # noqa: E501 + _query_params.append(('gids', _params['gids'])) + _collection_formats['gids'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sids') is not None: # noqa: E501 + _query_params.append(('sids', _params['sids'])) + _collection_formats['sids'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "LocalGroupGetResponse", + '207': "LocalGroupGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/groups', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_groups_members_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + member_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete local group membership + + Deletes one or more local group memberships. The `group_names`, `group_sids`, or `group_gids` parameter is required, but cannot be set together. The `member_names`, `member_sids`, or `member_gids` parameter is required, but cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`. + :type group_gids: List[int] + :param group_names: Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param member_ids: Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together. + :type member_ids: List[int] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_sids: Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type member_sids: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`. + :type member_types: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'group_gids', + 'group_names', + 'group_sids', + 'local_directory_service_ids', + 'local_directory_service_names', + 'member_ids', + 'member_names', + 'member_sids', + 'member_types' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_groups_members_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('group_gids') is not None: # noqa: E501 + _query_params.append(('group_gids', _params['group_gids'])) + _collection_formats['group_gids'] = 'csv' + + if _params.get('group_names') is not None: # noqa: E501 + _query_params.append(('group_names', _params['group_names'])) + _collection_formats['group_names'] = 'csv' + + if _params.get('group_sids') is not None: # noqa: E501 + _query_params.append(('group_sids', _params['group_sids'])) + _collection_formats['group_sids'] = 'csv' + + if _params.get('local_directory_service_ids') is not None: # noqa: E501 + _query_params.append(('local_directory_service_ids', _params['local_directory_service_ids'])) + _collection_formats['local_directory_service_ids'] = 'csv' + + if _params.get('local_directory_service_names') is not None: # noqa: E501 + _query_params.append(('local_directory_service_names', _params['local_directory_service_names'])) + _collection_formats['local_directory_service_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('member_sids') is not None: # noqa: E501 + _query_params.append(('member_sids', _params['member_sids'])) + _collection_formats['member_sids'] = 'csv' + + if _params.get('member_types') is not None: # noqa: E501 + _query_params.append(('member_types', _params['member_types'])) + _collection_formats['member_types'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/groups/members', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_groups_members_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List local group memberships + + Displays a list of local group memberships. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param group_gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`. + :type group_gids: List[int] + :param group_names: Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together. + :type member_ids: List[int] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_sids: Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type member_sids: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`. + :type member_types: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LocalMembershipGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'group_gids', + 'group_names', + 'group_sids', + 'limit', + 'member_ids', + 'member_names', + 'member_sids', + 'member_types', + 'offset', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_groups_members_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('group_gids') is not None: # noqa: E501 + _query_params.append(('group_gids', _params['group_gids'])) + _collection_formats['group_gids'] = 'csv' + + if _params.get('group_names') is not None: # noqa: E501 + _query_params.append(('group_names', _params['group_names'])) + _collection_formats['group_names'] = 'csv' + + if _params.get('group_sids') is not None: # noqa: E501 + _query_params.append(('group_sids', _params['group_sids'])) + _collection_formats['group_sids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('member_sids') is not None: # noqa: E501 + _query_params.append(('member_sids', _params['member_sids'])) + _collection_formats['member_sids'] = 'csv' + + if _params.get('member_types') is not None: # noqa: E501 + _query_params.append(('member_types', _params['member_types'])) + _collection_formats['member_types'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "LocalMembershipGetResponse", + '207': "LocalMembershipGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/groups/members', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_groups_members_post_with_http_info( + self, + local_membership: Annotated[LocalGroupMembershipPost, Field(..., description="The `member_names`, `member_sids`, or `member_gids` parameter is required, but cannot be set together.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create local group membership + + Creates a local group membership with a group. The `group_names`, `group_sids`, or `group_gids` parameter is required, but cannot be set together. + + :param local_membership: The `member_names`, `member_sids`, or `member_gids` parameter is required, but cannot be set together. (required) + :type local_membership: LocalGroupMembershipPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`. + :type group_gids: List[int] + :param group_names: Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LocalMembershipResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'local_membership', + 'authorization', + 'x_request_id', + 'context_names', + 'group_gids', + 'group_names', + 'group_sids', + 'local_directory_service_ids', + 'local_directory_service_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_groups_members_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('group_gids') is not None: # noqa: E501 + _query_params.append(('group_gids', _params['group_gids'])) + _collection_formats['group_gids'] = 'csv' + + if _params.get('group_names') is not None: # noqa: E501 + _query_params.append(('group_names', _params['group_names'])) + _collection_formats['group_names'] = 'csv' + + if _params.get('group_sids') is not None: # noqa: E501 + _query_params.append(('group_sids', _params['group_sids'])) + _collection_formats['group_sids'] = 'csv' + + if _params.get('local_directory_service_ids') is not None: # noqa: E501 + _query_params.append(('local_directory_service_ids', _params['local_directory_service_ids'])) + _collection_formats['local_directory_service_ids'] = 'csv' + + if _params.get('local_directory_service_names') is not None: # noqa: E501 + _query_params.append(('local_directory_service_names', _params['local_directory_service_names'])) + _collection_formats['local_directory_service_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['local_membership'] is not None: + _body_params = _params['local_membership'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "LocalMembershipResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/groups/members', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_groups_patch_with_http_info( + self, + local_group: LocalGroupPatch, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify local groups + + Modifies local groups. The `gids`, `names`, or `sids` parameter is required, but cannot be set together. + + :param local_group: (required) + :type local_group: LocalGroupPatch + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`. + :type gids: List[int] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LocalGroupResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'local_group', + 'authorization', + 'x_request_id', + 'context_names', + 'gids', + 'local_directory_service_ids', + 'local_directory_service_names', + 'names', + 'sids' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_groups_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('gids') is not None: # noqa: E501 + _query_params.append(('gids', _params['gids'])) + _collection_formats['gids'] = 'csv' + + if _params.get('local_directory_service_ids') is not None: # noqa: E501 + _query_params.append(('local_directory_service_ids', _params['local_directory_service_ids'])) + _collection_formats['local_directory_service_ids'] = 'csv' + + if _params.get('local_directory_service_names') is not None: # noqa: E501 + _query_params.append(('local_directory_service_names', _params['local_directory_service_names'])) + _collection_formats['local_directory_service_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('sids') is not None: # noqa: E501 + _query_params.append(('sids', _params['sids'])) + _collection_formats['sids'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['local_group'] is not None: + _body_params = _params['local_group'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "LocalGroupResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/groups', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_groups_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + local_group: Optional[LocalGroupPost] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create local group + + Creates a local group. + + :param names: Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param local_group: + :type local_group: LocalGroupPost + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LocalGroupResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'authorization', + 'x_request_id', + 'context_names', + 'local_directory_service_ids', + 'local_directory_service_names', + 'local_group' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_groups_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('local_directory_service_ids') is not None: # noqa: E501 + _query_params.append(('local_directory_service_ids', _params['local_directory_service_ids'])) + _collection_formats['local_directory_service_ids'] = 'csv' + + if _params.get('local_directory_service_names') is not None: # noqa: E501 + _query_params.append(('local_directory_service_names', _params['local_directory_service_names'])) + _collection_formats['local_directory_service_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['local_group'] is not None: + _body_params = _params['local_group'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "LocalGroupResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/groups', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_users_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + uids: Annotated[Optional[conlist(StrictInt)], Field(description="A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs in comma-separated format. For example, `423,51234`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete local users + + Deletes one or more local users. The `uids`, `names`, or `sids` parameter is required, but cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :param uids: A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs in comma-separated format. For example, `423,51234`. + :type uids: List[int] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'local_directory_service_ids', + 'local_directory_service_names', + 'names', + 'sids', + 'uids' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_users_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('local_directory_service_ids') is not None: # noqa: E501 + _query_params.append(('local_directory_service_ids', _params['local_directory_service_ids'])) + _collection_formats['local_directory_service_ids'] = 'csv' + + if _params.get('local_directory_service_names') is not None: # noqa: E501 + _query_params.append(('local_directory_service_names', _params['local_directory_service_names'])) + _collection_formats['local_directory_service_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('sids') is not None: # noqa: E501 + _query_params.append(('sids', _params['sids'])) + _collection_formats['sids'] = 'csv' + + if _params.get('uids') is not None: # noqa: E501 + _query_params.append(('uids', _params['uids'])) + _collection_formats['uids'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/users', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_users_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + uids: Annotated[Optional[conlist(StrictInt)], Field(description="A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs in comma-separated format. For example, `423,51234`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List local users + + Displays a list of local users. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param uids: A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs in comma-separated format. For example, `423,51234`. + :type uids: List[int] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LocalUserGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sids', + 'sort', + 'total_item_count', + 'uids' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_users_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sids') is not None: # noqa: E501 + _query_params.append(('sids', _params['sids'])) + _collection_formats['sids'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('uids') is not None: # noqa: E501 + _query_params.append(('uids', _params['uids'])) + _collection_formats['uids'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "LocalUserGetResponse", + '207': "LocalUserGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/users', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_users_members_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + member_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + member_types: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete local user membership + + Deletes one or more local user memberships. The `member_names`, `member_sids`, or `member_ids` parameter is required, but cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`. + :type group_gids: List[int] + :param group_names: Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param member_ids: Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together. + :type member_ids: List[int] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_sids: Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type member_sids: List[str] + :param member_types: Performs the operation on the member types specified. The type of member is the full name of the resource endpoint. Valid values include `directories`. Enter multiple member types in comma-separated format. For example, `type01,type02`. + :type member_types: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'group_gids', + 'group_names', + 'group_sids', + 'local_directory_service_ids', + 'local_directory_service_names', + 'member_ids', + 'member_names', + 'member_sids', + 'member_types' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_users_members_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('group_gids') is not None: # noqa: E501 + _query_params.append(('group_gids', _params['group_gids'])) + _collection_formats['group_gids'] = 'csv' + + if _params.get('group_names') is not None: # noqa: E501 + _query_params.append(('group_names', _params['group_names'])) + _collection_formats['group_names'] = 'csv' + + if _params.get('group_sids') is not None: # noqa: E501 + _query_params.append(('group_sids', _params['group_sids'])) + _collection_formats['group_sids'] = 'csv' + + if _params.get('local_directory_service_ids') is not None: # noqa: E501 + _query_params.append(('local_directory_service_ids', _params['local_directory_service_ids'])) + _collection_formats['local_directory_service_ids'] = 'csv' + + if _params.get('local_directory_service_names') is not None: # noqa: E501 + _query_params.append(('local_directory_service_names', _params['local_directory_service_names'])) + _collection_formats['local_directory_service_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('member_sids') is not None: # noqa: E501 + _query_params.append(('member_sids', _params['member_sids'])) + _collection_formats['member_sids'] = 'csv' + + if _params.get('member_types') is not None: # noqa: E501 + _query_params.append(('member_types', _params['member_types'])) + _collection_formats['member_types'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/users/members', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_users_members_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_gids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`.")] = None, + group_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List local user memberships + + Displays a list of local user memberships. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param group_gids: Performs the operation on the specified GIDs. Enter multiple GIDs in comma-separated format. For example, `4234235,9681923`. + :type group_gids: List[int] + :param group_names: Performs the operation on the group names specified. Enter multiple group names in comma-separated format. For example, `group1,group2`. + :type group_names: List[str] + :param group_sids: Performs the operation on the specified group SID. Enter multiple group SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type group_sids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together. + :type member_ids: List[int] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_sids: Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type member_sids: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LocalMembershipGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'group_gids', + 'group_names', + 'group_sids', + 'limit', + 'member_ids', + 'member_names', + 'member_sids', + 'offset', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_users_members_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('group_gids') is not None: # noqa: E501 + _query_params.append(('group_gids', _params['group_gids'])) + _collection_formats['group_gids'] = 'csv' + + if _params.get('group_names') is not None: # noqa: E501 + _query_params.append(('group_names', _params['group_names'])) + _collection_formats['group_names'] = 'csv' + + if _params.get('group_sids') is not None: # noqa: E501 + _query_params.append(('group_sids', _params['group_sids'])) + _collection_formats['group_sids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('member_sids') is not None: # noqa: E501 + _query_params.append(('member_sids', _params['member_sids'])) + _collection_formats['member_sids'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "LocalMembershipGetResponse", + '207': "LocalMembershipGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/users/members', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_users_members_post_with_http_info( + self, + local_membership: Annotated[LocalUserMembershipPost, Field(..., description="The `group_names`, `group_sids`, or `group_gids` parameter is required, but cannot be set together.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + member_ids: Annotated[Optional[conlist(StrictInt)], Field(description="Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + member_sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create local user membership + + Creates a local user membership with a group. The `member_names` or `member_sids` or `member_ids` parameter is required, but cannot be set together. + + :param local_membership: The `group_names`, `group_sids`, or `group_gids` parameter is required, but cannot be set together. (required) + :type local_membership: LocalUserMembershipPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param member_ids: Performs the operation on the unique local member IDs specified. Enter multiple member IDs in comma-separated format. For local group IDs refer to group IDs (GID). For local user IDs refer to user IDs (UID). The `member_ids` and `member_names` parameters cannot be provided together. + :type member_ids: List[int] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param member_sids: Performs the operation on the specified member SID. Enter multiple member SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type member_sids: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LocalMembershipResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'local_membership', + 'authorization', + 'x_request_id', + 'context_names', + 'local_directory_service_ids', + 'local_directory_service_names', + 'member_ids', + 'member_names', + 'member_sids' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_users_members_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('local_directory_service_ids') is not None: # noqa: E501 + _query_params.append(('local_directory_service_ids', _params['local_directory_service_ids'])) + _collection_formats['local_directory_service_ids'] = 'csv' + + if _params.get('local_directory_service_names') is not None: # noqa: E501 + _query_params.append(('local_directory_service_names', _params['local_directory_service_names'])) + _collection_formats['local_directory_service_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('member_sids') is not None: # noqa: E501 + _query_params.append(('member_sids', _params['member_sids'])) + _collection_formats['member_sids'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['local_membership'] is not None: + _body_params = _params['local_membership'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "LocalMembershipResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/users/members', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_users_patch_with_http_info( + self, + local_user: LocalUserPatch, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keep_open_sessions: Annotated[Optional[StrictBool], Field(description="If set to `true`, the session does not expire. If set to `false`, when the user is disabled or password is changed, the session expires. If not specified, defaults to `false`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + sids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`.")] = None, + uids: Annotated[Optional[conlist(StrictInt)], Field(description="A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs in comma-separated format. For example, `423,51234`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify local user + + Modifies a local user. + + :param local_user: (required) + :type local_user: LocalUserPatch + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keep_open_sessions: If set to `true`, the session does not expire. If set to `false`, when the user is disabled or password is changed, the session expires. If not specified, defaults to `false`. + :type keep_open_sessions: bool + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param sids: Performs the operation on the object SID specified. Enter multiple SIDs in comma-separated format. For example, `S-1-2-532-582374278-329482934,S-1-2-532-234235245-423425234`. + :type sids: List[str] + :param uids: A comma-separated list of local user IDs (UIDs). Enter multiple local user IDs in comma-separated format. For example, `423,51234`. + :type uids: List[int] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LocalUserResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'local_user', + 'authorization', + 'x_request_id', + 'context_names', + 'keep_open_sessions', + 'local_directory_service_ids', + 'local_directory_service_names', + 'names', + 'sids', + 'uids' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_users_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('keep_open_sessions') is not None: # noqa: E501 + _query_params.append(('keep_open_sessions', _params['keep_open_sessions'])) + + if _params.get('local_directory_service_ids') is not None: # noqa: E501 + _query_params.append(('local_directory_service_ids', _params['local_directory_service_ids'])) + _collection_formats['local_directory_service_ids'] = 'csv' + + if _params.get('local_directory_service_names') is not None: # noqa: E501 + _query_params.append(('local_directory_service_names', _params['local_directory_service_names'])) + _collection_formats['local_directory_service_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('sids') is not None: # noqa: E501 + _query_params.append(('sids', _params['sids'])) + _collection_formats['sids'] = 'csv' + + if _params.get('uids') is not None: # noqa: E501 + _query_params.append(('uids', _params['uids'])) + _collection_formats['uids'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['local_user'] is not None: + _body_params = _params['local_user'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "LocalUserResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/users', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_local_users_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_directory_service_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter.")] = None, + local_directory_service_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter.")] = None, + local_user: Optional[LocalUserPost] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create local user + + Creates a local user. + + :param names: Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_directory_service_ids: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_names` parameter. + :type local_directory_service_ids: List[str] + :param local_directory_service_names: Performs the operation on the specified local directory service. Supports exactly one value. When not specified, the local directory service connected to the `_array_server` will be used. This cannot be provided in conjunction with the `local_directory_service_ids` parameter. + :type local_directory_service_names: List[str] + :param local_user: + :type local_user: LocalUserPost + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LocalUserResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'authorization', + 'x_request_id', + 'context_names', + 'local_directory_service_ids', + 'local_directory_service_names', + 'local_user' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_local_users_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('local_directory_service_ids') is not None: # noqa: E501 + _query_params.append(('local_directory_service_ids', _params['local_directory_service_ids'])) + _collection_formats['local_directory_service_ids'] = 'csv' + + if _params.get('local_directory_service_names') is not None: # noqa: E501 + _query_params.append(('local_directory_service_names', _params['local_directory_service_names'])) + _collection_formats['local_directory_service_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['local_user'] is not None: + _body_params = _params['local_user'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "LocalUserResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/local/users', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_patch_with_http_info( + self, + directory_service: DirectoryServicePatch, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + to_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format.")] = None, + to_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify directory services configuration + + Modifies the directory service configuration. + + :param directory_service: (required) + :type directory_service: DirectoryServicePatch + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. + :type names: List[str] + :param to_member_ids: The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format. + :type to_member_ids: List[str] + :param to_member_names: The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format. + :type to_member_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryServiceResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'directory_service', + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'names', + 'to_member_ids', + 'to_member_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('to_member_ids') is not None: # noqa: E501 + _query_params.append(('to_member_ids', _params['to_member_ids'])) + _collection_formats['to_member_ids'] = 'csv' + + if _params.get('to_member_names') is not None: # noqa: E501 + _query_params.append(('to_member_names', _params['to_member_names'])) + _collection_formats['to_member_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['directory_service'] is not None: + _body_params = _params['directory_service'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DirectoryServiceResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")], + directory_service: DirectoryServicePost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create directory services configuration + + Creates directory services configuration. All directory services configuration created using this resource will have `services` set to `data`. + + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. (required) + :type names: List[str] + :param directory_service: (required) + :type directory_service: DirectoryServicePost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryServiceResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'directory_service', + 'authorization', + 'x_request_id', + 'context_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['directory_service'] is not None: + _body_params = _params['directory_service'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DirectoryServiceResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_roles_delete_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete group to management access policy mappings + + Deletes one or more group to management access policy mappings. + + :param names: Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'names', + 'authorization', + 'x_request_id', + 'context_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_roles_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/roles', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_roles_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + role_names: Annotated[Optional[conlist(StrictStr)], Field(description="This field has been deprecated.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List group to management access policy mappings + + Displays access control settings for remote groups. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param role_names: This field has been deprecated. + :type role_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryServiceRoleGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'limit', + 'names', + 'offset', + 'role_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_roles_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('role_names') is not None: # noqa: E501 + _query_params.append(('role_names', _params['role_names'])) + _collection_formats['role_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DirectoryServiceRoleGetResponse", + '207': "DirectoryServiceRoleGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/roles', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_roles_patch_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format.")], + directory_service_roles: DirectoryServiceRole, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + role_names: Annotated[Optional[conlist(StrictStr)], Field(description="This field has been deprecated.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify group to management access policy mappings + + Modifies properties of one or more group to management access policy mappings. Modifying management access policies is done at `/directory-services/roles/policies/management-access` instead. + + :param names: Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param directory_service_roles: (required) + :type directory_service_roles: DirectoryServiceRole + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param role_names: This field has been deprecated. + :type role_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryServiceRoleResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'directory_service_roles', + 'authorization', + 'x_request_id', + 'context_names', + 'role_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_roles_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('role_names') is not None: # noqa: E501 + _query_params.append(('role_names', _params['role_names'])) + _collection_formats['role_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['directory_service_roles'] is not None: + _body_params = _params['directory_service_roles'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DirectoryServiceRoleResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/roles', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_roles_policies_management_access_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete a membership between a group to management access policy mapping and one or more management access policies + + Deletes a membership between a group to management access policy mapping with one or more management access policies. One of `policy_ids` or `policy_names` is required, and one of `member_ids` or `member_names` is required. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_roles_policies_management_access_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/roles/policies/management-access', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_roles_policies_management_access_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List management access policies attached to a group to management access policy mapping + + Displays a list of management access policies that are attached to a group to management access policy mappings. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. For example, `name01,name02`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberCleanGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_roles_policies_management_access_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberCleanGetResponse", + '207': "PolicyMemberCleanGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/roles/policies/management-access', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_roles_policies_management_access_post_with_http_info( + self, + policies: PolicyAssignmentPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a membership between a group to management access policy mapping with one or more management access policies + + Creates a membership between a group to management access policy mapping with one or more management access policies. One of `member_ids` or `member_names` parameter is required. + + :param policies: (required) + :type policies: PolicyAssignmentPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberCleanResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'policies', + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_roles_policies_management_access_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['policies'] is not None: + _body_params = _params['policies'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberCleanResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/roles/policies/management-access', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_roles_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format.")], + directory_service_roles: DirectoryServiceRolePost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a group in management access policy mappings + + Creates one or more groups in management access policy mappings. + + :param names: Performs the operation on the unique names specified. For example, `GroupRoleMappingName`. Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param directory_service_roles: (required) + :type directory_service_roles: DirectoryServiceRolePost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryServiceRoleResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'directory_service_roles', + 'authorization', + 'x_request_id', + 'context_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_roles_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['directory_service_roles'] is not None: + _body_params = _params['directory_service_roles'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "DirectoryServiceRoleResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/roles', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_test_get_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET directory-service/test + + The diagnostic utility that verifies the status and configuration of the `directory services` on the `array`. + + :param names: Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param server_names: Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TestGetResultWithResourceErrorContextMultiserverAwareResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'offset', + 'server_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_test_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('server_names') is not None: # noqa: E501 + _query_params.append(('server_names', _params['server_names'])) + _collection_formats['server_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "TestGetResultWithResourceErrorContextMultiserverAwareResponse", + '207': "TestGetResultWithResourceErrorContextMultiserverAwareResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/test', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_test_patch_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + server_names: Annotated[Optional[conlist(StrictStr)], Field(description="Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`.")] = None, + directory_service: Annotated[Optional[DirectoryServicePatch], Field(description="The optional `directory service` `configuration` used to temporarily overwrite specific attributes of existing `objects` during diagnostic testing. These modifications are applied only within the scope of the test and do not persist or alter the current active system settings.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH directory-service/test + + The diagnostic utility that verifies the status of the configured `directory services` on the `array`. This process supports the optional provision of `configuration` modifications, allowing for validation of proposed changes in a test environment without affecting the current active settings. + + :param names: Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param server_names: Server names providing the context for the operation. Names are expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `server01,server02`. + :type server_names: List[str] + :param directory_service: The optional `directory service` `configuration` used to temporarily overwrite specific attributes of existing `objects` during diagnostic testing. These modifications are applied only within the scope of the test and do not persist or alter the current active system settings. + :type directory_service: DirectoryServicePatch + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TestPatchResultWithResourceMultiserverAwareResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'server_names', + 'directory_service' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_directory_services_test_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('server_names') is not None: # noqa: E501 + _query_params.append(('server_names', _params['server_names'])) + _collection_formats['server_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['directory_service'] is not None: + _body_params = _params['directory_service'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "TestPatchResultWithResourceMultiserverAwareResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/test', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api255_directory_services_delete_with_http_info = directory_services_delete_with_http_info + api255_directory_services_get_with_http_info = directory_services_get_with_http_info + api255_directory_services_local_directory_services_delete_with_http_info = directory_services_local_directory_services_delete_with_http_info + api255_directory_services_local_directory_services_get_with_http_info = directory_services_local_directory_services_get_with_http_info + api255_directory_services_local_directory_services_patch_with_http_info = directory_services_local_directory_services_patch_with_http_info + api255_directory_services_local_directory_services_post_with_http_info = directory_services_local_directory_services_post_with_http_info + api255_directory_services_local_groups_delete_with_http_info = directory_services_local_groups_delete_with_http_info + api255_directory_services_local_groups_get_with_http_info = directory_services_local_groups_get_with_http_info + api255_directory_services_local_groups_members_delete_with_http_info = directory_services_local_groups_members_delete_with_http_info + api255_directory_services_local_groups_members_get_with_http_info = directory_services_local_groups_members_get_with_http_info + api255_directory_services_local_groups_members_post_with_http_info = directory_services_local_groups_members_post_with_http_info + api255_directory_services_local_groups_patch_with_http_info = directory_services_local_groups_patch_with_http_info + api255_directory_services_local_groups_post_with_http_info = directory_services_local_groups_post_with_http_info + api255_directory_services_local_users_delete_with_http_info = directory_services_local_users_delete_with_http_info + api255_directory_services_local_users_get_with_http_info = directory_services_local_users_get_with_http_info + api255_directory_services_local_users_members_delete_with_http_info = directory_services_local_users_members_delete_with_http_info + api255_directory_services_local_users_members_get_with_http_info = directory_services_local_users_members_get_with_http_info + api255_directory_services_local_users_members_post_with_http_info = directory_services_local_users_members_post_with_http_info + api255_directory_services_local_users_patch_with_http_info = directory_services_local_users_patch_with_http_info + api255_directory_services_local_users_post_with_http_info = directory_services_local_users_post_with_http_info + api255_directory_services_patch_with_http_info = directory_services_patch_with_http_info + api255_directory_services_post_with_http_info = directory_services_post_with_http_info + api255_directory_services_roles_delete_with_http_info = directory_services_roles_delete_with_http_info + api255_directory_services_roles_get_with_http_info = directory_services_roles_get_with_http_info + api255_directory_services_roles_patch_with_http_info = directory_services_roles_patch_with_http_info + api255_directory_services_roles_policies_management_access_delete_with_http_info = directory_services_roles_policies_management_access_delete_with_http_info + api255_directory_services_roles_policies_management_access_get_with_http_info = directory_services_roles_policies_management_access_get_with_http_info + api255_directory_services_roles_policies_management_access_post_with_http_info = directory_services_roles_policies_management_access_post_with_http_info + api255_directory_services_roles_post_with_http_info = directory_services_roles_post_with_http_info + api255_directory_services_test_get_with_http_info = directory_services_test_get_with_http_info + api255_directory_services_test_patch_with_http_info = directory_services_test_patch_with_http_info + api256_directory_services_delete_with_http_info = directory_services_delete_with_http_info + api256_directory_services_get_with_http_info = directory_services_get_with_http_info + api256_directory_services_local_directory_services_delete_with_http_info = directory_services_local_directory_services_delete_with_http_info + api256_directory_services_local_directory_services_get_with_http_info = directory_services_local_directory_services_get_with_http_info + api256_directory_services_local_directory_services_patch_with_http_info = directory_services_local_directory_services_patch_with_http_info + api256_directory_services_local_directory_services_post_with_http_info = directory_services_local_directory_services_post_with_http_info + api256_directory_services_local_groups_delete_with_http_info = directory_services_local_groups_delete_with_http_info + api256_directory_services_local_groups_get_with_http_info = directory_services_local_groups_get_with_http_info + api256_directory_services_local_groups_members_delete_with_http_info = directory_services_local_groups_members_delete_with_http_info + api256_directory_services_local_groups_members_get_with_http_info = directory_services_local_groups_members_get_with_http_info + api256_directory_services_local_groups_members_post_with_http_info = directory_services_local_groups_members_post_with_http_info + api256_directory_services_local_groups_patch_with_http_info = directory_services_local_groups_patch_with_http_info + api256_directory_services_local_groups_post_with_http_info = directory_services_local_groups_post_with_http_info + api256_directory_services_local_users_delete_with_http_info = directory_services_local_users_delete_with_http_info + api256_directory_services_local_users_get_with_http_info = directory_services_local_users_get_with_http_info + api256_directory_services_local_users_members_delete_with_http_info = directory_services_local_users_members_delete_with_http_info + api256_directory_services_local_users_members_get_with_http_info = directory_services_local_users_members_get_with_http_info + api256_directory_services_local_users_members_post_with_http_info = directory_services_local_users_members_post_with_http_info + api256_directory_services_local_users_patch_with_http_info = directory_services_local_users_patch_with_http_info + api256_directory_services_local_users_post_with_http_info = directory_services_local_users_post_with_http_info + api256_directory_services_patch_with_http_info = directory_services_patch_with_http_info + api256_directory_services_post_with_http_info = directory_services_post_with_http_info + api256_directory_services_roles_delete_with_http_info = directory_services_roles_delete_with_http_info + api256_directory_services_roles_get_with_http_info = directory_services_roles_get_with_http_info + api256_directory_services_roles_patch_with_http_info = directory_services_roles_patch_with_http_info + api256_directory_services_roles_policies_management_access_delete_with_http_info = directory_services_roles_policies_management_access_delete_with_http_info + api256_directory_services_roles_policies_management_access_get_with_http_info = directory_services_roles_policies_management_access_get_with_http_info + api256_directory_services_roles_policies_management_access_post_with_http_info = directory_services_roles_policies_management_access_post_with_http_info + api256_directory_services_roles_post_with_http_info = directory_services_roles_post_with_http_info + api256_directory_services_test_get_with_http_info = directory_services_test_get_with_http_info + api256_directory_services_test_patch_with_http_info = directory_services_test_patch_with_http_info diff --git a/pypureclient/flasharray/_common/apis/directory_snapshots_api_v_2_49.py b/pypureclient/flasharray/_common/apis/directory_snapshots_api_v_2_49.py index 4d015857e0..fc48bb3ad7 100644 --- a/pypureclient/flasharray/_common/apis/directory_snapshots_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/directory_snapshots_api_v_2_49.py @@ -732,3 +732,11 @@ def directory_snapshots_post_with_http_info( api254_directory_snapshots_get_with_http_info = directory_snapshots_get_with_http_info api254_directory_snapshots_patch_with_http_info = directory_snapshots_patch_with_http_info api254_directory_snapshots_post_with_http_info = directory_snapshots_post_with_http_info + api255_directory_snapshots_delete_with_http_info = directory_snapshots_delete_with_http_info + api255_directory_snapshots_get_with_http_info = directory_snapshots_get_with_http_info + api255_directory_snapshots_patch_with_http_info = directory_snapshots_patch_with_http_info + api255_directory_snapshots_post_with_http_info = directory_snapshots_post_with_http_info + api256_directory_snapshots_delete_with_http_info = directory_snapshots_delete_with_http_info + api256_directory_snapshots_get_with_http_info = directory_snapshots_get_with_http_info + api256_directory_snapshots_patch_with_http_info = directory_snapshots_patch_with_http_info + api256_directory_snapshots_post_with_http_info = directory_snapshots_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/dns_api_v_2_49.py b/pypureclient/flasharray/_common/apis/dns_api_v_2_49.py index eac9865892..a80661287c 100644 --- a/pypureclient/flasharray/_common/apis/dns_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/dns_api_v_2_49.py @@ -670,3 +670,11 @@ def dns_post_with_http_info( api254_dns_get_with_http_info = dns_get_with_http_info api254_dns_patch_with_http_info = dns_patch_with_http_info api254_dns_post_with_http_info = dns_post_with_http_info + api255_dns_delete_with_http_info = dns_delete_with_http_info + api255_dns_get_with_http_info = dns_get_with_http_info + api255_dns_patch_with_http_info = dns_patch_with_http_info + api255_dns_post_with_http_info = dns_post_with_http_info + api256_dns_delete_with_http_info = dns_delete_with_http_info + api256_dns_get_with_http_info = dns_get_with_http_info + api256_dns_patch_with_http_info = dns_patch_with_http_info + api256_dns_post_with_http_info = dns_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/drives_api_v_2_36.py b/pypureclient/flasharray/_common/apis/drives_api_v_2_36.py index 74a4e6d6f9..ad29ba4cb6 100644 --- a/pypureclient/flasharray/_common/apis/drives_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/drives_api_v_2_36.py @@ -373,3 +373,7 @@ def drives_patch_with_http_info( api253_drives_patch_with_http_info = drives_patch_with_http_info api254_drives_get_with_http_info = drives_get_with_http_info api254_drives_patch_with_http_info = drives_patch_with_http_info + api255_drives_get_with_http_info = drives_get_with_http_info + api255_drives_patch_with_http_info = drives_patch_with_http_info + api256_drives_get_with_http_info = drives_get_with_http_info + api256_drives_patch_with_http_info = drives_patch_with_http_info diff --git a/pypureclient/flasharray/_common/apis/file_systems_api_v_2_51.py b/pypureclient/flasharray/_common/apis/file_systems_api_v_2_51.py index c966788aad..f6ba35e6dc 100644 --- a/pypureclient/flasharray/_common/apis/file_systems_api_v_2_51.py +++ b/pypureclient/flasharray/_common/apis/file_systems_api_v_2_51.py @@ -732,3 +732,11 @@ def file_systems_post_with_http_info( api254_file_systems_get_with_http_info = file_systems_get_with_http_info api254_file_systems_patch_with_http_info = file_systems_patch_with_http_info api254_file_systems_post_with_http_info = file_systems_post_with_http_info + api255_file_systems_delete_with_http_info = file_systems_delete_with_http_info + api255_file_systems_get_with_http_info = file_systems_get_with_http_info + api255_file_systems_patch_with_http_info = file_systems_patch_with_http_info + api255_file_systems_post_with_http_info = file_systems_post_with_http_info + api256_file_systems_delete_with_http_info = file_systems_delete_with_http_info + api256_file_systems_get_with_http_info = file_systems_get_with_http_info + api256_file_systems_patch_with_http_info = file_systems_patch_with_http_info + api256_file_systems_post_with_http_info = file_systems_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/files_api_v_2_36.py b/pypureclient/flasharray/_common/apis/files_api_v_2_36.py index 3692a4bac8..7df5ba50e8 100644 --- a/pypureclient/flasharray/_common/apis/files_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/files_api_v_2_36.py @@ -219,3 +219,5 @@ def files_post_with_http_info( api252_files_post_with_http_info = files_post_with_http_info api253_files_post_with_http_info = files_post_with_http_info api254_files_post_with_http_info = files_post_with_http_info + api255_files_post_with_http_info = files_post_with_http_info + api256_files_post_with_http_info = files_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/fleets_api_v_2_39.py b/pypureclient/flasharray/_common/apis/fleets_api_v_2_39.py index 0e24116821..6b093915d6 100644 --- a/pypureclient/flasharray/_common/apis/fleets_api_v_2_39.py +++ b/pypureclient/flasharray/_common/apis/fleets_api_v_2_39.py @@ -1504,3 +1504,21 @@ def fleets_post_with_http_info( api254_fleets_members_post_with_http_info = fleets_members_post_with_http_info api254_fleets_patch_with_http_info = fleets_patch_with_http_info api254_fleets_post_with_http_info = fleets_post_with_http_info + api255_fleets_delete_with_http_info = fleets_delete_with_http_info + api255_fleets_fleet_key_get_with_http_info = fleets_fleet_key_get_with_http_info + api255_fleets_fleet_key_post_with_http_info = fleets_fleet_key_post_with_http_info + api255_fleets_get_with_http_info = fleets_get_with_http_info + api255_fleets_members_delete_with_http_info = fleets_members_delete_with_http_info + api255_fleets_members_get_with_http_info = fleets_members_get_with_http_info + api255_fleets_members_post_with_http_info = fleets_members_post_with_http_info + api255_fleets_patch_with_http_info = fleets_patch_with_http_info + api255_fleets_post_with_http_info = fleets_post_with_http_info + api256_fleets_delete_with_http_info = fleets_delete_with_http_info + api256_fleets_fleet_key_get_with_http_info = fleets_fleet_key_get_with_http_info + api256_fleets_fleet_key_post_with_http_info = fleets_fleet_key_post_with_http_info + api256_fleets_get_with_http_info = fleets_get_with_http_info + api256_fleets_members_delete_with_http_info = fleets_members_delete_with_http_info + api256_fleets_members_get_with_http_info = fleets_members_get_with_http_info + api256_fleets_members_post_with_http_info = fleets_members_post_with_http_info + api256_fleets_patch_with_http_info = fleets_patch_with_http_info + api256_fleets_post_with_http_info = fleets_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/hardware_api_v_2_36.py b/pypureclient/flasharray/_common/apis/hardware_api_v_2_36.py index ae160a84db..a1e1649c03 100644 --- a/pypureclient/flasharray/_common/apis/hardware_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/hardware_api_v_2_36.py @@ -382,3 +382,7 @@ def hardware_patch_with_http_info( api253_hardware_patch_with_http_info = hardware_patch_with_http_info api254_hardware_get_with_http_info = hardware_get_with_http_info api254_hardware_patch_with_http_info = hardware_patch_with_http_info + api255_hardware_get_with_http_info = hardware_get_with_http_info + api255_hardware_patch_with_http_info = hardware_patch_with_http_info + api256_hardware_get_with_http_info = hardware_get_with_http_info + api256_hardware_patch_with_http_info = hardware_patch_with_http_info diff --git a/pypureclient/flasharray/_common/apis/host_groups_api_v_2_50.py b/pypureclient/flasharray/_common/apis/host_groups_api_v_2_50.py index 579920adb6..4085a989fc 100644 --- a/pypureclient/flasharray/_common/apis/host_groups_api_v_2_50.py +++ b/pypureclient/flasharray/_common/apis/host_groups_api_v_2_50.py @@ -3063,3 +3063,37 @@ def host_groups_tags_get_with_http_info( api254_host_groups_tags_batch_put_with_http_info = host_groups_tags_batch_put_with_http_info api254_host_groups_tags_delete_with_http_info = host_groups_tags_delete_with_http_info api254_host_groups_tags_get_with_http_info = host_groups_tags_get_with_http_info + api255_host_groups_delete_with_http_info = host_groups_delete_with_http_info + api255_host_groups_get_with_http_info = host_groups_get_with_http_info + api255_host_groups_hosts_delete_with_http_info = host_groups_hosts_delete_with_http_info + api255_host_groups_hosts_get_with_http_info = host_groups_hosts_get_with_http_info + api255_host_groups_hosts_post_with_http_info = host_groups_hosts_post_with_http_info + api255_host_groups_patch_with_http_info = host_groups_patch_with_http_info + api255_host_groups_performance_by_array_get_with_http_info = host_groups_performance_by_array_get_with_http_info + api255_host_groups_performance_get_with_http_info = host_groups_performance_get_with_http_info + api255_host_groups_post_with_http_info = host_groups_post_with_http_info + api255_host_groups_protection_groups_delete_with_http_info = host_groups_protection_groups_delete_with_http_info + api255_host_groups_protection_groups_get_with_http_info = host_groups_protection_groups_get_with_http_info + api255_host_groups_protection_groups_post_with_http_info = host_groups_protection_groups_post_with_http_info + api255_host_groups_qos_get_with_http_info = host_groups_qos_get_with_http_info + api255_host_groups_space_get_with_http_info = host_groups_space_get_with_http_info + api255_host_groups_tags_batch_put_with_http_info = host_groups_tags_batch_put_with_http_info + api255_host_groups_tags_delete_with_http_info = host_groups_tags_delete_with_http_info + api255_host_groups_tags_get_with_http_info = host_groups_tags_get_with_http_info + api256_host_groups_delete_with_http_info = host_groups_delete_with_http_info + api256_host_groups_get_with_http_info = host_groups_get_with_http_info + api256_host_groups_hosts_delete_with_http_info = host_groups_hosts_delete_with_http_info + api256_host_groups_hosts_get_with_http_info = host_groups_hosts_get_with_http_info + api256_host_groups_hosts_post_with_http_info = host_groups_hosts_post_with_http_info + api256_host_groups_patch_with_http_info = host_groups_patch_with_http_info + api256_host_groups_performance_by_array_get_with_http_info = host_groups_performance_by_array_get_with_http_info + api256_host_groups_performance_get_with_http_info = host_groups_performance_get_with_http_info + api256_host_groups_post_with_http_info = host_groups_post_with_http_info + api256_host_groups_protection_groups_delete_with_http_info = host_groups_protection_groups_delete_with_http_info + api256_host_groups_protection_groups_get_with_http_info = host_groups_protection_groups_get_with_http_info + api256_host_groups_protection_groups_post_with_http_info = host_groups_protection_groups_post_with_http_info + api256_host_groups_qos_get_with_http_info = host_groups_qos_get_with_http_info + api256_host_groups_space_get_with_http_info = host_groups_space_get_with_http_info + api256_host_groups_tags_batch_put_with_http_info = host_groups_tags_batch_put_with_http_info + api256_host_groups_tags_delete_with_http_info = host_groups_tags_delete_with_http_info + api256_host_groups_tags_get_with_http_info = host_groups_tags_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/hosts_api_v_2_50.py b/pypureclient/flasharray/_common/apis/hosts_api_v_2_50.py index a38e6dec3f..aa1f359aa7 100644 --- a/pypureclient/flasharray/_common/apis/hosts_api_v_2_50.py +++ b/pypureclient/flasharray/_common/apis/hosts_api_v_2_50.py @@ -3251,3 +3251,39 @@ def hosts_tags_get_with_http_info( api254_hosts_tags_batch_put_with_http_info = hosts_tags_batch_put_with_http_info api254_hosts_tags_delete_with_http_info = hosts_tags_delete_with_http_info api254_hosts_tags_get_with_http_info = hosts_tags_get_with_http_info + api255_hosts_delete_with_http_info = hosts_delete_with_http_info + api255_hosts_get_with_http_info = hosts_get_with_http_info + api255_hosts_host_groups_delete_with_http_info = hosts_host_groups_delete_with_http_info + api255_hosts_host_groups_get_with_http_info = hosts_host_groups_get_with_http_info + api255_hosts_host_groups_post_with_http_info = hosts_host_groups_post_with_http_info + api255_hosts_patch_with_http_info = hosts_patch_with_http_info + api255_hosts_performance_balance_get_with_http_info = hosts_performance_balance_get_with_http_info + api255_hosts_performance_by_array_get_with_http_info = hosts_performance_by_array_get_with_http_info + api255_hosts_performance_get_with_http_info = hosts_performance_get_with_http_info + api255_hosts_post_with_http_info = hosts_post_with_http_info + api255_hosts_protection_groups_delete_with_http_info = hosts_protection_groups_delete_with_http_info + api255_hosts_protection_groups_get_with_http_info = hosts_protection_groups_get_with_http_info + api255_hosts_protection_groups_post_with_http_info = hosts_protection_groups_post_with_http_info + api255_hosts_qos_get_with_http_info = hosts_qos_get_with_http_info + api255_hosts_space_get_with_http_info = hosts_space_get_with_http_info + api255_hosts_tags_batch_put_with_http_info = hosts_tags_batch_put_with_http_info + api255_hosts_tags_delete_with_http_info = hosts_tags_delete_with_http_info + api255_hosts_tags_get_with_http_info = hosts_tags_get_with_http_info + api256_hosts_delete_with_http_info = hosts_delete_with_http_info + api256_hosts_get_with_http_info = hosts_get_with_http_info + api256_hosts_host_groups_delete_with_http_info = hosts_host_groups_delete_with_http_info + api256_hosts_host_groups_get_with_http_info = hosts_host_groups_get_with_http_info + api256_hosts_host_groups_post_with_http_info = hosts_host_groups_post_with_http_info + api256_hosts_patch_with_http_info = hosts_patch_with_http_info + api256_hosts_performance_balance_get_with_http_info = hosts_performance_balance_get_with_http_info + api256_hosts_performance_by_array_get_with_http_info = hosts_performance_by_array_get_with_http_info + api256_hosts_performance_get_with_http_info = hosts_performance_get_with_http_info + api256_hosts_post_with_http_info = hosts_post_with_http_info + api256_hosts_protection_groups_delete_with_http_info = hosts_protection_groups_delete_with_http_info + api256_hosts_protection_groups_get_with_http_info = hosts_protection_groups_get_with_http_info + api256_hosts_protection_groups_post_with_http_info = hosts_protection_groups_post_with_http_info + api256_hosts_qos_get_with_http_info = hosts_qos_get_with_http_info + api256_hosts_space_get_with_http_info = hosts_space_get_with_http_info + api256_hosts_tags_batch_put_with_http_info = hosts_tags_batch_put_with_http_info + api256_hosts_tags_delete_with_http_info = hosts_tags_delete_with_http_info + api256_hosts_tags_get_with_http_info = hosts_tags_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/kmip_api_v_2_36.py b/pypureclient/flasharray/_common/apis/kmip_api_v_2_36.py index c748cb9e7b..9a047751a8 100644 --- a/pypureclient/flasharray/_common/apis/kmip_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/kmip_api_v_2_36.py @@ -825,3 +825,13 @@ def kmip_test_get_with_http_info( api254_kmip_patch_with_http_info = kmip_patch_with_http_info api254_kmip_post_with_http_info = kmip_post_with_http_info api254_kmip_test_get_with_http_info = kmip_test_get_with_http_info + api255_kmip_delete_with_http_info = kmip_delete_with_http_info + api255_kmip_get_with_http_info = kmip_get_with_http_info + api255_kmip_patch_with_http_info = kmip_patch_with_http_info + api255_kmip_post_with_http_info = kmip_post_with_http_info + api255_kmip_test_get_with_http_info = kmip_test_get_with_http_info + api256_kmip_delete_with_http_info = kmip_delete_with_http_info + api256_kmip_get_with_http_info = kmip_get_with_http_info + api256_kmip_patch_with_http_info = kmip_patch_with_http_info + api256_kmip_post_with_http_info = kmip_post_with_http_info + api256_kmip_test_get_with_http_info = kmip_test_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/lifecycle_rules_api_v_2_51.py b/pypureclient/flasharray/_common/apis/lifecycle_rules_api_v_2_51.py index 49aaaa31a6..ee0bc8e20d 100644 --- a/pypureclient/flasharray/_common/apis/lifecycle_rules_api_v_2_51.py +++ b/pypureclient/flasharray/_common/apis/lifecycle_rules_api_v_2_51.py @@ -712,3 +712,11 @@ def lifecycle_rules_post_with_http_info( api254_lifecycle_rules_get_with_http_info = lifecycle_rules_get_with_http_info api254_lifecycle_rules_patch_with_http_info = lifecycle_rules_patch_with_http_info api254_lifecycle_rules_post_with_http_info = lifecycle_rules_post_with_http_info + api255_lifecycle_rules_delete_with_http_info = lifecycle_rules_delete_with_http_info + api255_lifecycle_rules_get_with_http_info = lifecycle_rules_get_with_http_info + api255_lifecycle_rules_patch_with_http_info = lifecycle_rules_patch_with_http_info + api255_lifecycle_rules_post_with_http_info = lifecycle_rules_post_with_http_info + api256_lifecycle_rules_delete_with_http_info = lifecycle_rules_delete_with_http_info + api256_lifecycle_rules_get_with_http_info = lifecycle_rules_get_with_http_info + api256_lifecycle_rules_patch_with_http_info = lifecycle_rules_patch_with_http_info + api256_lifecycle_rules_post_with_http_info = lifecycle_rules_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/log_targets_api_v_2_49.py b/pypureclient/flasharray/_common/apis/log_targets_api_v_2_49.py index f2777cfe8a..f620d2f5cc 100644 --- a/pypureclient/flasharray/_common/apis/log_targets_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/log_targets_api_v_2_49.py @@ -1989,3 +1989,27 @@ def log_targets_syslog_test_get_with_http_info( api254_log_targets_syslog_settings_get_with_http_info = log_targets_syslog_settings_get_with_http_info api254_log_targets_syslog_settings_patch_with_http_info = log_targets_syslog_settings_patch_with_http_info api254_log_targets_syslog_test_get_with_http_info = log_targets_syslog_test_get_with_http_info + api255_log_targets_file_delete_with_http_info = log_targets_file_delete_with_http_info + api255_log_targets_file_get_with_http_info = log_targets_file_get_with_http_info + api255_log_targets_file_patch_with_http_info = log_targets_file_patch_with_http_info + api255_log_targets_file_post_with_http_info = log_targets_file_post_with_http_info + api255_log_targets_get_with_http_info = log_targets_get_with_http_info + api255_log_targets_syslog_delete_with_http_info = log_targets_syslog_delete_with_http_info + api255_log_targets_syslog_get_with_http_info = log_targets_syslog_get_with_http_info + api255_log_targets_syslog_patch_with_http_info = log_targets_syslog_patch_with_http_info + api255_log_targets_syslog_post_with_http_info = log_targets_syslog_post_with_http_info + api255_log_targets_syslog_settings_get_with_http_info = log_targets_syslog_settings_get_with_http_info + api255_log_targets_syslog_settings_patch_with_http_info = log_targets_syslog_settings_patch_with_http_info + api255_log_targets_syslog_test_get_with_http_info = log_targets_syslog_test_get_with_http_info + api256_log_targets_file_delete_with_http_info = log_targets_file_delete_with_http_info + api256_log_targets_file_get_with_http_info = log_targets_file_get_with_http_info + api256_log_targets_file_patch_with_http_info = log_targets_file_patch_with_http_info + api256_log_targets_file_post_with_http_info = log_targets_file_post_with_http_info + api256_log_targets_get_with_http_info = log_targets_get_with_http_info + api256_log_targets_syslog_delete_with_http_info = log_targets_syslog_delete_with_http_info + api256_log_targets_syslog_get_with_http_info = log_targets_syslog_get_with_http_info + api256_log_targets_syslog_patch_with_http_info = log_targets_syslog_patch_with_http_info + api256_log_targets_syslog_post_with_http_info = log_targets_syslog_post_with_http_info + api256_log_targets_syslog_settings_get_with_http_info = log_targets_syslog_settings_get_with_http_info + api256_log_targets_syslog_settings_patch_with_http_info = log_targets_syslog_settings_patch_with_http_info + api256_log_targets_syslog_test_get_with_http_info = log_targets_syslog_test_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/maintenance_windows_api_v_2_36.py b/pypureclient/flasharray/_common/apis/maintenance_windows_api_v_2_36.py index ca501dd5c5..3d6b9e6b31 100644 --- a/pypureclient/flasharray/_common/apis/maintenance_windows_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/maintenance_windows_api_v_2_36.py @@ -525,3 +525,9 @@ def maintenance_windows_post_with_http_info( api254_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info api254_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info api254_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info + api255_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info + api255_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info + api255_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info + api256_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info + api256_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info + api256_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/network_interfaces_api_v_2_55.py b/pypureclient/flasharray/_common/apis/network_interfaces_api_v_2_55.py new file mode 100644 index 0000000000..714cfdfa43 --- /dev/null +++ b/pypureclient/flasharray/_common/apis/network_interfaces_api_v_2_55.py @@ -0,0 +1,1170 @@ + +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flasharray._common.models.network_interface_get_response_v_2_55 import NetworkInterfaceGetResponse +from pypureclient.flasharray._common.models.network_interface_neighbor_get_response_v_2_22 import NetworkInterfaceNeighborGetResponse +from pypureclient.flasharray._common.models.network_interface_patch_v_2_55 import NetworkInterfacePatch +from pypureclient.flasharray._common.models.network_interface_performance_get_response_v_2_36 import NetworkInterfacePerformanceGetResponse +from pypureclient.flasharray._common.models.network_interface_post_v_2_55 import NetworkInterfacePost +from pypureclient.flasharray._common.models.network_interface_response_v_2_55 import NetworkInterfaceResponse +from pypureclient.flasharray._common.models.network_interfaces_port_details_get_response_v_2_16 import NetworkInterfacesPortDetailsGetResponse + +class NetworkInterfacesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def network_interfaces_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete network interface + + Deletes a network interface on a controller. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_network_interfaces_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/network-interfaces', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def network_interfaces_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List network interfaces + + Displays all network interfaces for all controllers on the array. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NetworkInterfaceGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'limit', + 'names', + 'offset', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_network_interfaces_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "NetworkInterfaceGetResponse", + '207': "NetworkInterfaceGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/network-interfaces', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def network_interfaces_neighbors_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_port_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique local port name specified. Enter multiple names in comma-separated format. For example, `ct0.eth0,ct1.eth0`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List network interface neighbors + + Displays all neighbors for all network interfaces on the array. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param local_port_names: Performs the operation on the unique local port name specified. Enter multiple names in comma-separated format. For example, `ct0.eth0,ct1.eth0`. + :type local_port_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NetworkInterfaceNeighborGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'filter', + 'limit', + 'local_port_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_network_interfaces_neighbors_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('local_port_names') is not None: # noqa: E501 + _query_params.append(('local_port_names', _params['local_port_names'])) + _collection_formats['local_port_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "NetworkInterfaceNeighborGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/network-interfaces/neighbors', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def network_interfaces_patch_with_http_info( + self, + network: NetworkInterfacePatch, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + remediate: Annotated[Optional[StrictBool], Field(description="The boolean value that, if `true`, indicates that `network interfaces` with a `remediation_mode` of `manual` will migrate to their `preferred_arrays`, if configured.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify network interface + + Modifies a network interface on a controller. + + :param network: (required) + :type network: NetworkInterfacePatch + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param remediate: The boolean value that, if `true`, indicates that `network interfaces` with a `remediation_mode` of `manual` will migrate to their `preferred_arrays`, if configured. + :type remediate: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NetworkInterfaceResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'network', + 'authorization', + 'x_request_id', + 'context_names', + 'names', + 'remediate' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_network_interfaces_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('remediate') is not None: # noqa: E501 + _query_params.append(('remediate', _params['remediate'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['network'] is not None: + _body_params = _params['network'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "NetworkInterfaceResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/network-interfaces', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def network_interfaces_performance_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List network performance statistics + + Displays network statistics, historical bandwidth, and error reporting for all specified network interfaces. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param end_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NetworkInterfacePerformanceGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'end_time', + 'filter', + 'limit', + 'names', + 'offset', + 'resolution', + 'sort', + 'start_time', + 'total_item_count', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_network_interfaces_performance_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('end_time') is not None: # noqa: E501 + _query_params.append(('end_time', _params['end_time'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('resolution') is not None: # noqa: E501 + _query_params.append(('resolution', _params['resolution'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('start_time') is not None: # noqa: E501 + _query_params.append(('start_time', _params['start_time'])) + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "NetworkInterfacePerformanceGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/network-interfaces/performance', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def network_interfaces_port_details_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List SFP port details + + Displays Ethernet and Fibre Channel SFP details. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NetworkInterfacesPortDetailsGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'filter', + 'limit', + 'names', + 'offset', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_network_interfaces_port_details_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "NetworkInterfacesPortDetailsGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/network-interfaces/port-details', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def network_interfaces_post_with_http_info( + self, + network: NetworkInterfacePost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create network interface + + Creates a network interface on a controller on the array. + + :param network: (required) + :type network: NetworkInterfacePost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NetworkInterfaceResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'network', + 'authorization', + 'x_request_id', + 'context_names', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_network_interfaces_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['network'] is not None: + _body_params = _params['network'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "NetworkInterfaceResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/network-interfaces', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api255_network_interfaces_delete_with_http_info = network_interfaces_delete_with_http_info + api255_network_interfaces_get_with_http_info = network_interfaces_get_with_http_info + api255_network_interfaces_neighbors_get_with_http_info = network_interfaces_neighbors_get_with_http_info + api255_network_interfaces_patch_with_http_info = network_interfaces_patch_with_http_info + api255_network_interfaces_performance_get_with_http_info = network_interfaces_performance_get_with_http_info + api255_network_interfaces_port_details_get_with_http_info = network_interfaces_port_details_get_with_http_info + api255_network_interfaces_post_with_http_info = network_interfaces_post_with_http_info + api256_network_interfaces_delete_with_http_info = network_interfaces_delete_with_http_info + api256_network_interfaces_get_with_http_info = network_interfaces_get_with_http_info + api256_network_interfaces_neighbors_get_with_http_info = network_interfaces_neighbors_get_with_http_info + api256_network_interfaces_patch_with_http_info = network_interfaces_patch_with_http_info + api256_network_interfaces_performance_get_with_http_info = network_interfaces_performance_get_with_http_info + api256_network_interfaces_port_details_get_with_http_info = network_interfaces_port_details_get_with_http_info + api256_network_interfaces_post_with_http_info = network_interfaces_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/object_store_access_keys_api_v_2_51.py b/pypureclient/flasharray/_common/apis/object_store_access_keys_api_v_2_51.py index 9c1ecb79d1..e4aa9fe972 100644 --- a/pypureclient/flasharray/_common/apis/object_store_access_keys_api_v_2_51.py +++ b/pypureclient/flasharray/_common/apis/object_store_access_keys_api_v_2_51.py @@ -626,3 +626,11 @@ def object_store_access_keys_post_with_http_info( api254_object_store_access_keys_get_with_http_info = object_store_access_keys_get_with_http_info api254_object_store_access_keys_patch_with_http_info = object_store_access_keys_patch_with_http_info api254_object_store_access_keys_post_with_http_info = object_store_access_keys_post_with_http_info + api255_object_store_access_keys_delete_with_http_info = object_store_access_keys_delete_with_http_info + api255_object_store_access_keys_get_with_http_info = object_store_access_keys_get_with_http_info + api255_object_store_access_keys_patch_with_http_info = object_store_access_keys_patch_with_http_info + api255_object_store_access_keys_post_with_http_info = object_store_access_keys_post_with_http_info + api256_object_store_access_keys_delete_with_http_info = object_store_access_keys_delete_with_http_info + api256_object_store_access_keys_get_with_http_info = object_store_access_keys_get_with_http_info + api256_object_store_access_keys_patch_with_http_info = object_store_access_keys_patch_with_http_info + api256_object_store_access_keys_post_with_http_info = object_store_access_keys_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/object_store_accounts_api_v_2_52.py b/pypureclient/flasharray/_common/apis/object_store_accounts_api_v_2_52.py index 8fed4a77d7..0ea692853e 100644 --- a/pypureclient/flasharray/_common/apis/object_store_accounts_api_v_2_52.py +++ b/pypureclient/flasharray/_common/apis/object_store_accounts_api_v_2_52.py @@ -718,3 +718,11 @@ def object_store_accounts_space_get_with_http_info( api254_object_store_accounts_get_with_http_info = object_store_accounts_get_with_http_info api254_object_store_accounts_post_with_http_info = object_store_accounts_post_with_http_info api254_object_store_accounts_space_get_with_http_info = object_store_accounts_space_get_with_http_info + api255_object_store_accounts_delete_with_http_info = object_store_accounts_delete_with_http_info + api255_object_store_accounts_get_with_http_info = object_store_accounts_get_with_http_info + api255_object_store_accounts_post_with_http_info = object_store_accounts_post_with_http_info + api255_object_store_accounts_space_get_with_http_info = object_store_accounts_space_get_with_http_info + api256_object_store_accounts_delete_with_http_info = object_store_accounts_delete_with_http_info + api256_object_store_accounts_get_with_http_info = object_store_accounts_get_with_http_info + api256_object_store_accounts_post_with_http_info = object_store_accounts_post_with_http_info + api256_object_store_accounts_space_get_with_http_info = object_store_accounts_space_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/object_store_users_api_v_2_51.py b/pypureclient/flasharray/_common/apis/object_store_users_api_v_2_51.py index 55d5dbed23..63d2ebcef3 100644 --- a/pypureclient/flasharray/_common/apis/object_store_users_api_v_2_51.py +++ b/pypureclient/flasharray/_common/apis/object_store_users_api_v_2_51.py @@ -995,3 +995,15 @@ def object_store_users_post_with_http_info( api254_object_store_users_policies_object_store_access_get_with_http_info = object_store_users_policies_object_store_access_get_with_http_info api254_object_store_users_policies_object_store_access_post_with_http_info = object_store_users_policies_object_store_access_post_with_http_info api254_object_store_users_post_with_http_info = object_store_users_post_with_http_info + api255_object_store_users_delete_with_http_info = object_store_users_delete_with_http_info + api255_object_store_users_get_with_http_info = object_store_users_get_with_http_info + api255_object_store_users_policies_object_store_access_delete_with_http_info = object_store_users_policies_object_store_access_delete_with_http_info + api255_object_store_users_policies_object_store_access_get_with_http_info = object_store_users_policies_object_store_access_get_with_http_info + api255_object_store_users_policies_object_store_access_post_with_http_info = object_store_users_policies_object_store_access_post_with_http_info + api255_object_store_users_post_with_http_info = object_store_users_post_with_http_info + api256_object_store_users_delete_with_http_info = object_store_users_delete_with_http_info + api256_object_store_users_get_with_http_info = object_store_users_get_with_http_info + api256_object_store_users_policies_object_store_access_delete_with_http_info = object_store_users_policies_object_store_access_delete_with_http_info + api256_object_store_users_policies_object_store_access_get_with_http_info = object_store_users_policies_object_store_access_get_with_http_info + api256_object_store_users_policies_object_store_access_post_with_http_info = object_store_users_policies_object_store_access_post_with_http_info + api256_object_store_users_post_with_http_info = object_store_users_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/object_store_virtual_hosts_api_v_2_51.py b/pypureclient/flasharray/_common/apis/object_store_virtual_hosts_api_v_2_51.py index 05670ff77f..15a5acfcff 100644 --- a/pypureclient/flasharray/_common/apis/object_store_virtual_hosts_api_v_2_51.py +++ b/pypureclient/flasharray/_common/apis/object_store_virtual_hosts_api_v_2_51.py @@ -492,3 +492,9 @@ def object_store_virtual_hosts_post_with_http_info( api254_object_store_virtual_hosts_delete_with_http_info = object_store_virtual_hosts_delete_with_http_info api254_object_store_virtual_hosts_get_with_http_info = object_store_virtual_hosts_get_with_http_info api254_object_store_virtual_hosts_post_with_http_info = object_store_virtual_hosts_post_with_http_info + api255_object_store_virtual_hosts_delete_with_http_info = object_store_virtual_hosts_delete_with_http_info + api255_object_store_virtual_hosts_get_with_http_info = object_store_virtual_hosts_get_with_http_info + api255_object_store_virtual_hosts_post_with_http_info = object_store_virtual_hosts_post_with_http_info + api256_object_store_virtual_hosts_delete_with_http_info = object_store_virtual_hosts_delete_with_http_info + api256_object_store_virtual_hosts_get_with_http_info = object_store_virtual_hosts_get_with_http_info + api256_object_store_virtual_hosts_post_with_http_info = object_store_virtual_hosts_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/offloads_api_v_2_50.py b/pypureclient/flasharray/_common/apis/offloads_api_v_2_50.py index e1c3fb1e9f..baefe9ff01 100644 --- a/pypureclient/flasharray/_common/apis/offloads_api_v_2_50.py +++ b/pypureclient/flasharray/_common/apis/offloads_api_v_2_50.py @@ -687,3 +687,11 @@ def offloads_post_with_http_info( api254_offloads_get_with_http_info = offloads_get_with_http_info api254_offloads_patch_with_http_info = offloads_patch_with_http_info api254_offloads_post_with_http_info = offloads_post_with_http_info + api255_offloads_delete_with_http_info = offloads_delete_with_http_info + api255_offloads_get_with_http_info = offloads_get_with_http_info + api255_offloads_patch_with_http_info = offloads_patch_with_http_info + api255_offloads_post_with_http_info = offloads_post_with_http_info + api256_offloads_delete_with_http_info = offloads_delete_with_http_info + api256_offloads_get_with_http_info = offloads_get_with_http_info + api256_offloads_patch_with_http_info = offloads_patch_with_http_info + api256_offloads_post_with_http_info = offloads_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/pod_replica_links_api_v_2_52.py b/pypureclient/flasharray/_common/apis/pod_replica_links_api_v_2_52.py index 938cffe670..4416eba341 100644 --- a/pypureclient/flasharray/_common/apis/pod_replica_links_api_v_2_52.py +++ b/pypureclient/flasharray/_common/apis/pod_replica_links_api_v_2_52.py @@ -2054,3 +2054,21 @@ def pod_replica_links_post_with_http_info( api254_pod_replica_links_performance_replication_by_array_get_with_http_info = pod_replica_links_performance_replication_by_array_get_with_http_info api254_pod_replica_links_performance_replication_get_with_http_info = pod_replica_links_performance_replication_get_with_http_info api254_pod_replica_links_post_with_http_info = pod_replica_links_post_with_http_info + api255_pod_replica_links_delete_with_http_info = pod_replica_links_delete_with_http_info + api255_pod_replica_links_get_with_http_info = pod_replica_links_get_with_http_info + api255_pod_replica_links_lag_get_with_http_info = pod_replica_links_lag_get_with_http_info + api255_pod_replica_links_mappings_policies_get_with_http_info = pod_replica_links_mappings_policies_get_with_http_info + api255_pod_replica_links_mappings_policies_patch_with_http_info = pod_replica_links_mappings_policies_patch_with_http_info + api255_pod_replica_links_patch_with_http_info = pod_replica_links_patch_with_http_info + api255_pod_replica_links_performance_replication_by_array_get_with_http_info = pod_replica_links_performance_replication_by_array_get_with_http_info + api255_pod_replica_links_performance_replication_get_with_http_info = pod_replica_links_performance_replication_get_with_http_info + api255_pod_replica_links_post_with_http_info = pod_replica_links_post_with_http_info + api256_pod_replica_links_delete_with_http_info = pod_replica_links_delete_with_http_info + api256_pod_replica_links_get_with_http_info = pod_replica_links_get_with_http_info + api256_pod_replica_links_lag_get_with_http_info = pod_replica_links_lag_get_with_http_info + api256_pod_replica_links_mappings_policies_get_with_http_info = pod_replica_links_mappings_policies_get_with_http_info + api256_pod_replica_links_mappings_policies_patch_with_http_info = pod_replica_links_mappings_policies_patch_with_http_info + api256_pod_replica_links_patch_with_http_info = pod_replica_links_patch_with_http_info + api256_pod_replica_links_performance_replication_by_array_get_with_http_info = pod_replica_links_performance_replication_by_array_get_with_http_info + api256_pod_replica_links_performance_replication_get_with_http_info = pod_replica_links_performance_replication_get_with_http_info + api256_pod_replica_links_post_with_http_info = pod_replica_links_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/pods_api_v_2_55.py b/pypureclient/flasharray/_common/apis/pods_api_v_2_55.py new file mode 100644 index 0000000000..d6cd029325 --- /dev/null +++ b/pypureclient/flasharray/_common/apis/pods_api_v_2_55.py @@ -0,0 +1,3694 @@ + +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flasharray._common.models.container_performance_get_response_v_2_52 import ContainerPerformanceGetResponse +from pypureclient.flasharray._common.models.member_get_response_v_2_50 import MemberGetResponse +from pypureclient.flasharray._common.models.member_response_v_2_50 import MemberResponse +from pypureclient.flasharray._common.models.pod_get_response_v_2_55 import PodGetResponse +from pypureclient.flasharray._common.models.pod_member_get_response_v_2_54 import PodMemberGetResponse +from pypureclient.flasharray._common.models.pod_member_response_v_2_54 import PodMemberResponse +from pypureclient.flasharray._common.models.pod_patch_v_2_55 import PodPatch +from pypureclient.flasharray._common.models.pod_performance_by_array_get_response_v_2_52 import PodPerformanceByArrayGetResponse +from pypureclient.flasharray._common.models.pod_performance_replication_by_array_get_response_v_2_55 import PodPerformanceReplicationByArrayGetResponse +from pypureclient.flasharray._common.models.pod_performance_replication_get_response_v_2_55 import PodPerformanceReplicationGetResponse +from pypureclient.flasharray._common.models.pod_post_v_2_55 import PodPost +from pypureclient.flasharray._common.models.pod_response_v_2_55 import PodResponse +from pypureclient.flasharray._common.models.resource_pod_space_get_response_v_2_50 import ResourcePodSpaceGetResponse +from pypureclient.flasharray._common.models.tag_get_response_v_2_50 import TagGetResponse +from pypureclient.flasharray._common.models.tag_response_v_2_50 import TagResponse +from pypureclient.flasharray._common.models.tag_v_2_50 import Tag +from pypureclient.flasharray._common.models.test_result_with_resource_with_id_post_response_v_2_50 import TestResultWithResourceWithIdPostResponse + +class PodsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def pods_arrays_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + with_unknown: Annotated[Optional[StrictBool], Field(description="If set to `true`, unstretches the specified pod from the specified array by force. Use the `with_unknown` parameter in the following rare event: the local array goes offline while the pod is still stretched across two arrays, the status of the remote array becomes unknown, and there is no guarantee that the pod is online elsewhere.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete a pod that was stretched to an array + + Deletes a pod that was stretchd to an array, collapsing the pod to a single array. Unstretch a pod from an array when the volumes within the stretched pod no longer need to be synchronously replicated between the two arrays. After a pod has been unstretched, synchronous replication stops. A destroyed version of the pod with 'restretch' appended to the pod name is created on the array that no longer has the pod. The restretched pod represents a point-in-time snapshot of the pod, just before it was unstretched. The restretch pod enters an eradication pending period starting from the time that the pod was unstretched. A restretched pod can be cloned or destroyed, but it cannot be explicitly recovered. The `group_names` parameter represents the name of the pod to be unstretched. The `member_names` parameter represents the name of the array from which the pod is to be unstretched. The `group_names` and `member_names` parameters are required and must be set together. (Deprecated) Use pods/members instead. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param with_unknown: If set to `true`, unstretches the specified pod from the specified array by force. Use the `with_unknown` parameter in the following rare event: the local array goes offline while the pod is still stretched across two arrays, the status of the remote array becomes unknown, and there is no guarantee that the pod is online elsewhere. + :type with_unknown: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'group_ids', + 'group_names', + 'member_ids', + 'member_names', + 'with_unknown' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_arrays_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('group_ids') is not None: # noqa: E501 + _query_params.append(('group_ids', _params['group_ids'])) + _collection_formats['group_ids'] = 'csv' + + if _params.get('group_names') is not None: # noqa: E501 + _query_params.append(('group_names', _params['group_names'])) + _collection_formats['group_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('with_unknown') is not None: # noqa: E501 + _query_params.append(('with_unknown', _params['with_unknown'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/pods/arrays', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_arrays_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List pods and their the array members + + Displays a list of pods and the local and remote arrays over which the pods are stretched. Pods with realm members will not be returned. The optional `group_names` parameter represents the name of the pod. The optional `member_names` parameter represents the name of the array over which the pod is stretched. (Deprecated) Use pods/members instead.) + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'group_ids', + 'group_names', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_arrays_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('group_ids') is not None: # noqa: E501 + _query_params.append(('group_ids', _params['group_ids'])) + _collection_formats['group_ids'] = 'csv' + + if _params.get('group_names') is not None: # noqa: E501 + _query_params.append(('group_names', _params['group_names'])) + _collection_formats['group_names'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "MemberGetResponse", + '207': "MemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/pods/arrays', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_arrays_post_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of group IDs.")] = None, + group_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Creates a pod to be stretched to an array + + Creates a pod to be stretched to an array. When a pod is stretched to an array, the data in the arrays over which the pod is stretched is synchronously replicated. The `group_names` parameter represents the name of the pod to be stretched. The `member_names` parameter represents the name of the array over which the pod is to be stretched. The `group_names` and `member_names` parameters are required and must be set together. (Deprecated) Use pods/members instead. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param group_ids: A comma-separated list of group IDs. + :type group_ids: List[str] + :param group_names: Performs the operation on the unique group name specified. Examples of groups include host groups, pods, protection groups, and volume groups. Enter multiple names in comma-separated format. For example, `hgroup01,hgroup02`. + :type group_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MemberResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'group_ids', + 'group_names', + 'member_ids', + 'member_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_arrays_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('group_ids') is not None: # noqa: E501 + _query_params.append(('group_ids', _params['group_ids'])) + _collection_formats['group_ids'] = 'csv' + + if _params.get('group_names') is not None: # noqa: E501 + _query_params.append(('group_names', _params['group_names'])) + _collection_formats['group_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "MemberResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/pods/arrays', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + eradicate_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to eradicate contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups). This enables you to eradicate containers with contents.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete a pod + + Deletes a pod that has been destroyed and is pending eradication. Eradicated pods cannot be recovered. Pods are destroyed using the PATCH method. The `ids` or `names` parameter is required, but they cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param eradicate_contents: Set to `true` to eradicate contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups). This enables you to eradicate containers with contents. + :type eradicate_contents: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'eradicate_contents', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('eradicate_contents') is not None: # noqa: E501 + _query_params.append(('eradicate_contents', _params['eradicate_contents'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/pods', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List pods + + Displays a list of pods that are stretched to this array. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PodGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort', + 'total_item_count', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PodGetResponse", + '207': "PodGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/pods', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_members_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of pod IDs.")] = None, + pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique pod name specified. Enter multiple names in comma-separated format. For example, `pod01,pod02`.")] = None, + with_unknown: Annotated[Optional[StrictBool], Field(description="If set to `true`, unstretches the specified pod from the specified array by force. Use the `with_unknown` parameter in the following rare event: the local array goes offline while the pod is still stretched across two arrays, the status of the remote array becomes unknown, and there is no guarantee that the pod is online elsewhere.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete a member from a pod + + Deletes a stretched pod from an array or realm, collapsing the pod to a member array or realm. Unstretch a pod from an array or realm when the volumes within the stretched podno longer need to be synchronously replicated between the two members. After a pod has been unstretched, synchronous replication stops. A destroyed version of the pod with 'restretch' appended to the pod name is created on the member that no longer has the pod. The restretched pod represents a point-in-time snapshot of the pod, just before it was unstretched. The restretched pod enters an eradication pending period starting from the time that the pod was unstretched. A restretched pod can be cloned or destroyed, but it cannot be explicitly recovered. The `member_names` parameter represents the name of the array or realm from which the pod is to be unstretched. Both pod and member must be specified by name or ID. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param pod_ids: A comma-separated list of pod IDs. + :type pod_ids: List[str] + :param pod_names: Performs the operation on the unique pod name specified. Enter multiple names in comma-separated format. For example, `pod01,pod02`. + :type pod_names: List[str] + :param with_unknown: If set to `true`, unstretches the specified pod from the specified array by force. Use the `with_unknown` parameter in the following rare event: the local array goes offline while the pod is still stretched across two arrays, the status of the remote array becomes unknown, and there is no guarantee that the pod is online elsewhere. + :type with_unknown: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names', + 'pod_ids', + 'pod_names', + 'with_unknown' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_members_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('pod_ids') is not None: # noqa: E501 + _query_params.append(('pod_ids', _params['pod_ids'])) + _collection_formats['pod_ids'] = 'csv' + + if _params.get('pod_names') is not None: # noqa: E501 + _query_params.append(('pod_names', _params['pod_names'])) + _collection_formats['pod_names'] = 'csv' + + if _params.get('with_unknown') is not None: # noqa: E501 + _query_params.append(('with_unknown', _params['with_unknown'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/pods/members', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_members_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of pod IDs.")] = None, + pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique pod name specified. Enter multiple names in comma-separated format. For example, `pod01,pod02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List pods and their members + + Displays a list of pods and the local and remote members over which the pods are stretched. Currently either array or realm is supported as member. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param pod_ids: A comma-separated list of pod IDs. + :type pod_ids: List[str] + :param pod_names: Performs the operation on the unique pod name specified. Enter multiple names in comma-separated format. For example, `pod01,pod02`. + :type pod_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PodMemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'pod_ids', + 'pod_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_members_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('pod_ids') is not None: # noqa: E501 + _query_params.append(('pod_ids', _params['pod_ids'])) + _collection_formats['pod_ids'] = 'csv' + + if _params.get('pod_names') is not None: # noqa: E501 + _query_params.append(('pod_names', _params['pod_names'])) + _collection_formats['pod_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PodMemberGetResponse", + '207': "PodMemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/pods/members', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_members_post_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + pod_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of pod IDs.")] = None, + pod_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique pod name specified. Enter multiple names in comma-separated format. For example, `pod01,pod02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Creates a pod to be stretched to a member + + Creates a pod to be stretched to a member. When a pod is stretched to an array or a realm on another array, the data in the arrays or realms over which the pod is stretched is synchronously replicated. The `member_names` or `member_ids` parameter represents the array or realm over which the pod is to be stretched. Both pod and member must be specified by name or ID. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param pod_ids: A comma-separated list of pod IDs. + :type pod_ids: List[str] + :param pod_names: Performs the operation on the unique pod name specified. Enter multiple names in comma-separated format. For example, `pod01,pod02`. + :type pod_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PodMemberResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names', + 'pod_ids', + 'pod_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_members_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('pod_ids') is not None: # noqa: E501 + _query_params.append(('pod_ids', _params['pod_ids'])) + _collection_formats['pod_ids'] = 'csv' + + if _params.get('pod_names') is not None: # noqa: E501 + _query_params.append(('pod_names', _params['pod_names'])) + _collection_formats['pod_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PodMemberResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/pods/members', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_patch_with_http_info( + self, + pod: PodPatch, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + abort_quiesce: Annotated[Optional[StrictBool], Field(description="Set to `true` to promote the pod when the `pod-replica-link` is in the `quiescing` state and abort when waiting for the `pod-replica-link` to complete the quiescing operation.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + destroy_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups), including eradicating containers with content.")] = None, + from_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays from which the resource should be removed. Enter multiple IDs in a comma-separated format.")] = None, + from_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays to be removed from the specified resource. Enter multiple names in a comma-separated format.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + move_with_host_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="The host groups to be moved together with the pods to the specified local member realm or array. All the hosts in the host groups will also be moved. Enter multiple names in a comma-separated format.")] = None, + move_with_host_names: Annotated[Optional[conlist(StrictStr)], Field(description="The hosts to be moved together with the pods to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + promote_from: Annotated[Optional[StrictStr], Field(description="The `undo-demote` pod that should be used to promote the pod. After the pod has been promoted, it will have the same data as the `undo-demote` pod and the `undo-demote` pod will be eradicated.")] = None, + quiesce: Annotated[Optional[StrictBool], Field(description="Set to `true` to demote the pod after the `pod-replica-link` goes into `quiesced` state and allow the pod to become a target of the remote pod. This ensures that all local data has been replicated to the remote pod before the pod is demoted.")] = None, + skip_quiesce: Annotated[Optional[StrictBool], Field(description="Set to `true` to demote the pod without quiescing the `pod-replica-link` and allow the pod to become a target of the remote pod. This stops all pending replication to the remote pod.")] = None, + to_member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format.")] = None, + to_member_names: Annotated[Optional[conlist(StrictStr)], Field(description="The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify a pod + + Modifies pod details. + + :param pod: (required) + :type pod: PodPatch + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param abort_quiesce: Set to `true` to promote the pod when the `pod-replica-link` is in the `quiescing` state and abort when waiting for the `pod-replica-link` to complete the quiescing operation. + :type abort_quiesce: bool + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param destroy_contents: Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups), including eradicating containers with content. + :type destroy_contents: bool + :param from_member_ids: Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays from which the resource should be removed. Enter multiple IDs in a comma-separated format. + :type from_member_ids: List[str] + :param from_member_names: Move the resource from the specified local member realm or array. This should be a union of all local realms and arrays to be removed from the specified resource. Enter multiple names in a comma-separated format. + :type from_member_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param move_with_host_group_names: The host groups to be moved together with the pods to the specified local member realm or array. All the hosts in the host groups will also be moved. Enter multiple names in a comma-separated format. + :type move_with_host_group_names: List[str] + :param move_with_host_names: The hosts to be moved together with the pods to the specified local member realm or array. Enter multiple names in a comma-separated format. + :type move_with_host_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param promote_from: The `undo-demote` pod that should be used to promote the pod. After the pod has been promoted, it will have the same data as the `undo-demote` pod and the `undo-demote` pod will be eradicated. + :type promote_from: str + :param quiesce: Set to `true` to demote the pod after the `pod-replica-link` goes into `quiesced` state and allow the pod to become a target of the remote pod. This ensures that all local data has been replicated to the remote pod before the pod is demoted. + :type quiesce: bool + :param skip_quiesce: Set to `true` to demote the pod without quiescing the `pod-replica-link` and allow the pod to become a target of the remote pod. This stops all pending replication to the remote pod. + :type skip_quiesce: bool + :param to_member_ids: The resource will be moved to the specified local member realm or array. Enter multiple IDs in a comma-separated format. + :type to_member_ids: List[str] + :param to_member_names: The resource will be moved to the specified local member realm or array. Enter multiple names in a comma-separated format. + :type to_member_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PodResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'pod', + 'authorization', + 'x_request_id', + 'abort_quiesce', + 'context_names', + 'destroy_contents', + 'from_member_ids', + 'from_member_names', + 'ids', + 'move_with_host_group_names', + 'move_with_host_names', + 'names', + 'promote_from', + 'quiesce', + 'skip_quiesce', + 'to_member_ids', + 'to_member_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('abort_quiesce') is not None: # noqa: E501 + _query_params.append(('abort_quiesce', _params['abort_quiesce'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('destroy_contents') is not None: # noqa: E501 + _query_params.append(('destroy_contents', _params['destroy_contents'])) + + if _params.get('from_member_ids') is not None: # noqa: E501 + _query_params.append(('from_member_ids', _params['from_member_ids'])) + _collection_formats['from_member_ids'] = 'csv' + + if _params.get('from_member_names') is not None: # noqa: E501 + _query_params.append(('from_member_names', _params['from_member_names'])) + _collection_formats['from_member_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('move_with_host_group_names') is not None: # noqa: E501 + _query_params.append(('move_with_host_group_names', _params['move_with_host_group_names'])) + _collection_formats['move_with_host_group_names'] = 'csv' + + if _params.get('move_with_host_names') is not None: # noqa: E501 + _query_params.append(('move_with_host_names', _params['move_with_host_names'])) + _collection_formats['move_with_host_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('promote_from') is not None: # noqa: E501 + _query_params.append(('promote_from', _params['promote_from'])) + + if _params.get('quiesce') is not None: # noqa: E501 + _query_params.append(('quiesce', _params['quiesce'])) + + if _params.get('skip_quiesce') is not None: # noqa: E501 + _query_params.append(('skip_quiesce', _params['skip_quiesce'])) + + if _params.get('to_member_ids') is not None: # noqa: E501 + _query_params.append(('to_member_ids', _params['to_member_ids'])) + _collection_formats['to_member_ids'] = 'csv' + + if _params.get('to_member_names') is not None: # noqa: E501 + _query_params.append(('to_member_names', _params['to_member_names'])) + _collection_formats['to_member_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['pod'] is not None: + _body_params = _params['pod'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PodResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/pods', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_performance_by_array_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`.")] = None, + protocol_group: Annotated[Optional[StrictStr], Field(description="Protocol group type. Valid values are `block`, `file`, `object-store`, and `all`.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List pod performance data by array + + Displays real-time and historical performance data, real-time latency data, and average I/O size data. The data is displayed as a total across all pods on the local array and by individual pod. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`. + :type protocol: str + :param protocol_group: Protocol group type. Valid values are `block`, `file`, `object-store`, and `all`. + :type protocol_group: str + :param resolution: The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PodPerformanceByArrayGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'end_time', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'protocol', + 'protocol_group', + 'resolution', + 'sort', + 'start_time', + 'total_item_count', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_performance_by_array_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('end_time') is not None: # noqa: E501 + _query_params.append(('end_time', _params['end_time'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('protocol') is not None: # noqa: E501 + _query_params.append(('protocol', _params['protocol'])) + + if _params.get('protocol_group') is not None: # noqa: E501 + _query_params.append(('protocol_group', _params['protocol_group'])) + + if _params.get('resolution') is not None: # noqa: E501 + _query_params.append(('resolution', _params['resolution'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('start_time') is not None: # noqa: E501 + _query_params.append(('start_time', _params['start_time'])) + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PodPerformanceByArrayGetResponse", + '207': "PodPerformanceByArrayGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/pods/performance/by-array', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_performance_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + protocol: Annotated[Optional[StrictStr], Field(description="Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`.")] = None, + protocol_group: Annotated[Optional[StrictStr], Field(description="Protocol group type. Valid values are `block`, `file`, `object-store`, and `all`.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List pod performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes across all pods, displayed both by pod and as a total across all pods. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param protocol: Protocol type. Valid values are `nfs`, `smb`, `s3`, and `all`. + :type protocol: str + :param protocol_group: Protocol group type. Valid values are `block`, `file`, `object-store`, and `all`. + :type protocol_group: str + :param resolution: The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ContainerPerformanceGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'end_time', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'protocol', + 'protocol_group', + 'resolution', + 'sort', + 'start_time', + 'total_item_count', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_performance_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('end_time') is not None: # noqa: E501 + _query_params.append(('end_time', _params['end_time'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('protocol') is not None: # noqa: E501 + _query_params.append(('protocol', _params['protocol'])) + + if _params.get('protocol_group') is not None: # noqa: E501 + _query_params.append(('protocol_group', _params['protocol_group'])) + + if _params.get('resolution') is not None: # noqa: E501 + _query_params.append(('resolution', _params['resolution'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('start_time') is not None: # noqa: E501 + _query_params.append(('start_time', _params['start_time'])) + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ContainerPerformanceGetResponse", + '207': "ContainerPerformanceGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/pods/performance', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_performance_replication_by_array_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List pod replication performance data by array + + Displays pod replication performance data, organized by array. The data returned is the real-time and historical performance data for each replication type at the pod level. Values include `continuous`, `periodic`, `resync`, and `sync`. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PodPerformanceReplicationByArrayGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'end_time', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'resolution', + 'sort', + 'start_time', + 'total_item_count', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_performance_replication_by_array_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('end_time') is not None: # noqa: E501 + _query_params.append(('end_time', _params['end_time'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('resolution') is not None: # noqa: E501 + _query_params.append(('resolution', _params['resolution'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('start_time') is not None: # noqa: E501 + _query_params.append(('start_time', _params['start_time'])) + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PodPerformanceReplicationByArrayGetResponse", + '207': "PodPerformanceReplicationByArrayGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/pods/performance/replication/by-array', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_performance_replication_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, only return the aggregate value of all items after filtering. For real-time performance, the values are aggregated for the latest timestamp. For historical performance, the values are aggregated for each timestamp from `start_time` to `end_time`. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List pod replication performance data + + Displays pod replication performance data. The data returned is the real-time and historical performance data for each replication type at the pod level. Values include `continuous`, `periodic`, `resync`, and `sync`. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param total_only: If set to `true`, only return the aggregate value of all items after filtering. For real-time performance, the values are aggregated for the latest timestamp. For historical performance, the values are aggregated for each timestamp from `start_time` to `end_time`. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PodPerformanceReplicationGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'end_time', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'resolution', + 'sort', + 'start_time', + 'total_item_count', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_performance_replication_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('end_time') is not None: # noqa: E501 + _query_params.append(('end_time', _params['end_time'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('resolution') is not None: # noqa: E501 + _query_params.append(('resolution', _params['resolution'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('start_time') is not None: # noqa: E501 + _query_params.append(('start_time', _params['start_time'])) + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PodPerformanceReplicationGetResponse", + '207': "PodPerformanceReplicationGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/pods/performance/replication', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_post_with_http_info( + self, + pod: PodPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows operation to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the newly created container (pod or realm) will inherit the default protection configuration from its parent container (realm or array). If specified as `false`, the default protection of the parent container will not be applied automatically. If not specified, defaults to `true`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a pod + + Creates a pod on the local array. Each pod must be given a unique name across the arrays to which they are stretched. A pod cannot be stretched to an array that already contains a pod with the same name. After a pod has been created, add volumes and protection groups, and then stretch the pod to another connected array or realm. + + :param pod: (required) + :type pod: PodPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows operation to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param with_default_protection: If specified as `true`, the newly created container (pod or realm) will inherit the default protection configuration from its parent container (realm or array). If specified as `false`, the default protection of the parent container will not be applied automatically. If not specified, defaults to `true`. + :type with_default_protection: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PodResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'pod', + 'authorization', + 'x_request_id', + 'allow_throttle', + 'context_names', + 'names', + 'with_default_protection' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_throttle') is not None: # noqa: E501 + _query_params.append(('allow_throttle', _params['allow_throttle'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('with_default_protection') is not None: # noqa: E501 + _query_params.append(('with_default_protection', _params['with_default_protection'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['pod'] is not None: + _body_params = _params['pod'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PodResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/pods', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_space_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List pod space information + + Displays provisioned size and physical storage consumption data for each pod on the local array. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ResourcePodSpaceGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'end_time', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'resolution', + 'sort', + 'start_time', + 'total_item_count', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_space_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('end_time') is not None: # noqa: E501 + _query_params.append(('end_time', _params['end_time'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('resolution') is not None: # noqa: E501 + _query_params.append(('resolution', _params['resolution'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('start_time') is not None: # noqa: E501 + _query_params.append(('start_time', _params['start_time'])) + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ResourcePodSpaceGetResponse", + '207': "ResourcePodSpaceGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/pods/space', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_tags_batch_put_with_http_info( + self, + tag: Annotated[conlist(Tag, max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if already existing, updated.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Update tags + + Updates tags for all specified objects. + + :param tag: A list of tags to be created or, if already existing, updated. (required) + :type tag: List[Tag] + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TagResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tag', + 'authorization', + 'x_request_id', + 'context_names', + 'resource_ids', + 'resource_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_tags_batch_put" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('resource_ids') is not None: # noqa: E501 + _query_params.append(('resource_ids', _params['resource_ids'])) + _collection_formats['resource_ids'] = 'csv' + + if _params.get('resource_names') is not None: # noqa: E501 + _query_params.append(('resource_names', _params['resource_names'])) + _collection_formats['resource_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['tag'] is not None: + _body_params = _params['tag'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "TagResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/pods/tags/batch', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_tags_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete tags + + Deletes specified tags. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'keys', + 'namespaces', + 'resource_ids', + 'resource_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_tags_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('keys') is not None: # noqa: E501 + _query_params.append(('keys', _params['keys'])) + _collection_formats['keys'] = 'csv' + + if _params.get('namespaces') is not None: # noqa: E501 + _query_params.append(('namespaces', _params['namespaces'])) + _collection_formats['namespaces'] = 'csv' + + if _params.get('resource_ids') is not None: # noqa: E501 + _query_params.append(('resource_ids', _params['resource_ids'])) + _collection_formats['resource_ids'] = 'csv' + + if _params.get('resource_names') is not None: # noqa: E501 + _query_params.append(('resource_names', _params['resource_names'])) + _collection_formats['resource_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/pods/tags', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_tags_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List tags + + Displays the list of tags. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TagGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'limit', + 'namespaces', + 'offset', + 'resource_destroyed', + 'resource_ids', + 'resource_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_tags_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('namespaces') is not None: # noqa: E501 + _query_params.append(('namespaces', _params['namespaces'])) + _collection_formats['namespaces'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('resource_destroyed') is not None: # noqa: E501 + _query_params.append(('resource_destroyed', _params['resource_destroyed'])) + + if _params.get('resource_ids') is not None: # noqa: E501 + _query_params.append(('resource_ids', _params['resource_ids'])) + _collection_formats['resource_ids'] = 'csv' + + if _params.get('resource_names') is not None: # noqa: E501 + _query_params.append(('resource_names', _params['resource_names'])) + _collection_formats['resource_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "TagGetResponse", + '207': "TagGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/pods/tags', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def pods_test_post_with_http_info( + self, + pod: PodPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_throttle: Annotated[Optional[StrictBool], Field(description="If set to `true`, allows operation to fail if array health is not optimal.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the newly created container (pod or realm) will inherit the default protection configuration from its parent container (realm or array). If specified as `false`, the default protection of the parent container will not be applied automatically. If not specified, defaults to `true`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create an attempt to clone a pod + + Creates an attempt to clone a pod on the local array without actually cloning it to test whether the pod can be successfully cloned. This action does not suppport pod creation. + + :param pod: (required) + :type pod: PodPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_throttle: If set to `true`, allows operation to fail if array health is not optimal. + :type allow_throttle: bool + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param with_default_protection: If specified as `true`, the newly created container (pod or realm) will inherit the default protection configuration from its parent container (realm or array). If specified as `false`, the default protection of the parent container will not be applied automatically. If not specified, defaults to `true`. + :type with_default_protection: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TestResultWithResourceWithIdPostResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'pod', + 'authorization', + 'x_request_id', + 'allow_throttle', + 'context_names', + 'names', + 'with_default_protection' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_pods_test_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_throttle') is not None: # noqa: E501 + _query_params.append(('allow_throttle', _params['allow_throttle'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('with_default_protection') is not None: # noqa: E501 + _query_params.append(('with_default_protection', _params['with_default_protection'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['pod'] is not None: + _body_params = _params['pod'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "TestResultWithResourceWithIdPostResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/pods/test', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api255_pods_arrays_delete_with_http_info = pods_arrays_delete_with_http_info + api255_pods_arrays_get_with_http_info = pods_arrays_get_with_http_info + api255_pods_arrays_post_with_http_info = pods_arrays_post_with_http_info + api255_pods_delete_with_http_info = pods_delete_with_http_info + api255_pods_get_with_http_info = pods_get_with_http_info + api255_pods_members_delete_with_http_info = pods_members_delete_with_http_info + api255_pods_members_get_with_http_info = pods_members_get_with_http_info + api255_pods_members_post_with_http_info = pods_members_post_with_http_info + api255_pods_patch_with_http_info = pods_patch_with_http_info + api255_pods_performance_by_array_get_with_http_info = pods_performance_by_array_get_with_http_info + api255_pods_performance_get_with_http_info = pods_performance_get_with_http_info + api255_pods_performance_replication_by_array_get_with_http_info = pods_performance_replication_by_array_get_with_http_info + api255_pods_performance_replication_get_with_http_info = pods_performance_replication_get_with_http_info + api255_pods_post_with_http_info = pods_post_with_http_info + api255_pods_space_get_with_http_info = pods_space_get_with_http_info + api255_pods_tags_batch_put_with_http_info = pods_tags_batch_put_with_http_info + api255_pods_tags_delete_with_http_info = pods_tags_delete_with_http_info + api255_pods_tags_get_with_http_info = pods_tags_get_with_http_info + api255_pods_test_post_with_http_info = pods_test_post_with_http_info + api256_pods_arrays_delete_with_http_info = pods_arrays_delete_with_http_info + api256_pods_arrays_get_with_http_info = pods_arrays_get_with_http_info + api256_pods_arrays_post_with_http_info = pods_arrays_post_with_http_info + api256_pods_delete_with_http_info = pods_delete_with_http_info + api256_pods_get_with_http_info = pods_get_with_http_info + api256_pods_members_delete_with_http_info = pods_members_delete_with_http_info + api256_pods_members_get_with_http_info = pods_members_get_with_http_info + api256_pods_members_post_with_http_info = pods_members_post_with_http_info + api256_pods_patch_with_http_info = pods_patch_with_http_info + api256_pods_performance_by_array_get_with_http_info = pods_performance_by_array_get_with_http_info + api256_pods_performance_get_with_http_info = pods_performance_get_with_http_info + api256_pods_performance_replication_by_array_get_with_http_info = pods_performance_replication_by_array_get_with_http_info + api256_pods_performance_replication_get_with_http_info = pods_performance_replication_get_with_http_info + api256_pods_post_with_http_info = pods_post_with_http_info + api256_pods_space_get_with_http_info = pods_space_get_with_http_info + api256_pods_tags_batch_put_with_http_info = pods_tags_batch_put_with_http_info + api256_pods_tags_delete_with_http_info = pods_tags_delete_with_http_info + api256_pods_tags_get_with_http_info = pods_tags_get_with_http_info + api256_pods_test_post_with_http_info = pods_test_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/policies_api_v_2_54.py b/pypureclient/flasharray/_common/apis/policies_api_v_2_54.py index 5245de6c2f..7a1deca01d 100644 --- a/pypureclient/flasharray/_common/apis/policies_api_v_2_54.py +++ b/pypureclient/flasharray/_common/apis/policies_api_v_2_54.py @@ -20472,3 +20472,241 @@ def policies_user_group_quota_rules_post_with_http_info( api254_policies_user_group_quota_rules_get_with_http_info = policies_user_group_quota_rules_get_with_http_info api254_policies_user_group_quota_rules_patch_with_http_info = policies_user_group_quota_rules_patch_with_http_info api254_policies_user_group_quota_rules_post_with_http_info = policies_user_group_quota_rules_post_with_http_info + api255_policies_alert_watcher_delete_with_http_info = policies_alert_watcher_delete_with_http_info + api255_policies_alert_watcher_get_with_http_info = policies_alert_watcher_get_with_http_info + api255_policies_alert_watcher_members_delete_with_http_info = policies_alert_watcher_members_delete_with_http_info + api255_policies_alert_watcher_members_get_with_http_info = policies_alert_watcher_members_get_with_http_info + api255_policies_alert_watcher_members_post_with_http_info = policies_alert_watcher_members_post_with_http_info + api255_policies_alert_watcher_patch_with_http_info = policies_alert_watcher_patch_with_http_info + api255_policies_alert_watcher_post_with_http_info = policies_alert_watcher_post_with_http_info + api255_policies_alert_watcher_rules_delete_with_http_info = policies_alert_watcher_rules_delete_with_http_info + api255_policies_alert_watcher_rules_get_with_http_info = policies_alert_watcher_rules_get_with_http_info + api255_policies_alert_watcher_rules_patch_with_http_info = policies_alert_watcher_rules_patch_with_http_info + api255_policies_alert_watcher_rules_post_with_http_info = policies_alert_watcher_rules_post_with_http_info + api255_policies_alert_watcher_rules_test_get_with_http_info = policies_alert_watcher_rules_test_get_with_http_info + api255_policies_audit_file_delete_with_http_info = policies_audit_file_delete_with_http_info + api255_policies_audit_file_get_with_http_info = policies_audit_file_get_with_http_info + api255_policies_audit_file_members_delete_with_http_info = policies_audit_file_members_delete_with_http_info + api255_policies_audit_file_members_get_with_http_info = policies_audit_file_members_get_with_http_info + api255_policies_audit_file_members_post_with_http_info = policies_audit_file_members_post_with_http_info + api255_policies_audit_file_patch_with_http_info = policies_audit_file_patch_with_http_info + api255_policies_audit_file_post_with_http_info = policies_audit_file_post_with_http_info + api255_policies_autodir_delete_with_http_info = policies_autodir_delete_with_http_info + api255_policies_autodir_get_with_http_info = policies_autodir_get_with_http_info + api255_policies_autodir_members_delete_with_http_info = policies_autodir_members_delete_with_http_info + api255_policies_autodir_members_get_with_http_info = policies_autodir_members_get_with_http_info + api255_policies_autodir_members_post_with_http_info = policies_autodir_members_post_with_http_info + api255_policies_autodir_patch_with_http_info = policies_autodir_patch_with_http_info + api255_policies_autodir_post_with_http_info = policies_autodir_post_with_http_info + api255_policies_get_with_http_info = policies_get_with_http_info + api255_policies_management_access_delete_with_http_info = policies_management_access_delete_with_http_info + api255_policies_management_access_get_with_http_info = policies_management_access_get_with_http_info + api255_policies_management_access_members_delete_with_http_info = policies_management_access_members_delete_with_http_info + api255_policies_management_access_members_get_with_http_info = policies_management_access_members_get_with_http_info + api255_policies_management_access_members_post_with_http_info = policies_management_access_members_post_with_http_info + api255_policies_management_access_patch_with_http_info = policies_management_access_patch_with_http_info + api255_policies_management_access_post_with_http_info = policies_management_access_post_with_http_info + api255_policies_members_get_with_http_info = policies_members_get_with_http_info + api255_policies_network_access_delete_with_http_info = policies_network_access_delete_with_http_info + api255_policies_network_access_get_with_http_info = policies_network_access_get_with_http_info + api255_policies_network_access_members_get_with_http_info = policies_network_access_members_get_with_http_info + api255_policies_network_access_patch_with_http_info = policies_network_access_patch_with_http_info + api255_policies_network_access_post_with_http_info = policies_network_access_post_with_http_info + api255_policies_network_access_rules_delete_with_http_info = policies_network_access_rules_delete_with_http_info + api255_policies_network_access_rules_get_with_http_info = policies_network_access_rules_get_with_http_info + api255_policies_network_access_rules_patch_with_http_info = policies_network_access_rules_patch_with_http_info + api255_policies_network_access_rules_post_with_http_info = policies_network_access_rules_post_with_http_info + api255_policies_nfs_client_rules_delete_with_http_info = policies_nfs_client_rules_delete_with_http_info + api255_policies_nfs_client_rules_get_with_http_info = policies_nfs_client_rules_get_with_http_info + api255_policies_nfs_client_rules_patch_with_http_info = policies_nfs_client_rules_patch_with_http_info + api255_policies_nfs_client_rules_post_with_http_info = policies_nfs_client_rules_post_with_http_info + api255_policies_nfs_delete_with_http_info = policies_nfs_delete_with_http_info + api255_policies_nfs_get_with_http_info = policies_nfs_get_with_http_info + api255_policies_nfs_members_delete_with_http_info = policies_nfs_members_delete_with_http_info + api255_policies_nfs_members_get_with_http_info = policies_nfs_members_get_with_http_info + api255_policies_nfs_members_post_with_http_info = policies_nfs_members_post_with_http_info + api255_policies_nfs_patch_with_http_info = policies_nfs_patch_with_http_info + api255_policies_nfs_post_with_http_info = policies_nfs_post_with_http_info + api255_policies_object_store_access_get_with_http_info = policies_object_store_access_get_with_http_info + api255_policies_object_store_access_members_delete_with_http_info = policies_object_store_access_members_delete_with_http_info + api255_policies_object_store_access_members_get_with_http_info = policies_object_store_access_members_get_with_http_info + api255_policies_object_store_access_members_post_with_http_info = policies_object_store_access_members_post_with_http_info + api255_policies_object_store_access_rules_get_with_http_info = policies_object_store_access_rules_get_with_http_info + api255_policies_password_get_with_http_info = policies_password_get_with_http_info + api255_policies_password_patch_with_http_info = policies_password_patch_with_http_info + api255_policies_qos_delete_with_http_info = policies_qos_delete_with_http_info + api255_policies_qos_get_with_http_info = policies_qos_get_with_http_info + api255_policies_qos_members_delete_with_http_info = policies_qos_members_delete_with_http_info + api255_policies_qos_members_get_with_http_info = policies_qos_members_get_with_http_info + api255_policies_qos_members_post_with_http_info = policies_qos_members_post_with_http_info + api255_policies_qos_patch_with_http_info = policies_qos_patch_with_http_info + api255_policies_qos_post_with_http_info = policies_qos_post_with_http_info + api255_policies_quota_delete_with_http_info = policies_quota_delete_with_http_info + api255_policies_quota_get_with_http_info = policies_quota_get_with_http_info + api255_policies_quota_members_delete_with_http_info = policies_quota_members_delete_with_http_info + api255_policies_quota_members_get_with_http_info = policies_quota_members_get_with_http_info + api255_policies_quota_members_post_with_http_info = policies_quota_members_post_with_http_info + api255_policies_quota_patch_with_http_info = policies_quota_patch_with_http_info + api255_policies_quota_post_with_http_info = policies_quota_post_with_http_info + api255_policies_quota_rules_delete_with_http_info = policies_quota_rules_delete_with_http_info + api255_policies_quota_rules_get_with_http_info = policies_quota_rules_get_with_http_info + api255_policies_quota_rules_patch_with_http_info = policies_quota_rules_patch_with_http_info + api255_policies_quota_rules_post_with_http_info = policies_quota_rules_post_with_http_info + api255_policies_smb_client_rules_delete_with_http_info = policies_smb_client_rules_delete_with_http_info + api255_policies_smb_client_rules_get_with_http_info = policies_smb_client_rules_get_with_http_info + api255_policies_smb_client_rules_post_with_http_info = policies_smb_client_rules_post_with_http_info + api255_policies_smb_delete_with_http_info = policies_smb_delete_with_http_info + api255_policies_smb_get_with_http_info = policies_smb_get_with_http_info + api255_policies_smb_members_delete_with_http_info = policies_smb_members_delete_with_http_info + api255_policies_smb_members_get_with_http_info = policies_smb_members_get_with_http_info + api255_policies_smb_members_post_with_http_info = policies_smb_members_post_with_http_info + api255_policies_smb_patch_with_http_info = policies_smb_patch_with_http_info + api255_policies_smb_post_with_http_info = policies_smb_post_with_http_info + api255_policies_snapshot_delete_with_http_info = policies_snapshot_delete_with_http_info + api255_policies_snapshot_get_with_http_info = policies_snapshot_get_with_http_info + api255_policies_snapshot_members_delete_with_http_info = policies_snapshot_members_delete_with_http_info + api255_policies_snapshot_members_get_with_http_info = policies_snapshot_members_get_with_http_info + api255_policies_snapshot_members_post_with_http_info = policies_snapshot_members_post_with_http_info + api255_policies_snapshot_patch_with_http_info = policies_snapshot_patch_with_http_info + api255_policies_snapshot_post_with_http_info = policies_snapshot_post_with_http_info + api255_policies_snapshot_rules_delete_with_http_info = policies_snapshot_rules_delete_with_http_info + api255_policies_snapshot_rules_get_with_http_info = policies_snapshot_rules_get_with_http_info + api255_policies_snapshot_rules_patch_with_http_info = policies_snapshot_rules_patch_with_http_info + api255_policies_snapshot_rules_post_with_http_info = policies_snapshot_rules_post_with_http_info + api255_policies_tls_delete_with_http_info = policies_tls_delete_with_http_info + api255_policies_tls_get_with_http_info = policies_tls_get_with_http_info + api255_policies_tls_members_delete_with_http_info = policies_tls_members_delete_with_http_info + api255_policies_tls_members_get_with_http_info = policies_tls_members_get_with_http_info + api255_policies_tls_members_post_with_http_info = policies_tls_members_post_with_http_info + api255_policies_tls_patch_with_http_info = policies_tls_patch_with_http_info + api255_policies_tls_post_with_http_info = policies_tls_post_with_http_info + api255_policies_user_group_quota_delete_with_http_info = policies_user_group_quota_delete_with_http_info + api255_policies_user_group_quota_get_with_http_info = policies_user_group_quota_get_with_http_info + api255_policies_user_group_quota_members_delete_with_http_info = policies_user_group_quota_members_delete_with_http_info + api255_policies_user_group_quota_members_get_with_http_info = policies_user_group_quota_members_get_with_http_info + api255_policies_user_group_quota_members_post_with_http_info = policies_user_group_quota_members_post_with_http_info + api255_policies_user_group_quota_patch_with_http_info = policies_user_group_quota_patch_with_http_info + api255_policies_user_group_quota_post_with_http_info = policies_user_group_quota_post_with_http_info + api255_policies_user_group_quota_rules_delete_with_http_info = policies_user_group_quota_rules_delete_with_http_info + api255_policies_user_group_quota_rules_get_with_http_info = policies_user_group_quota_rules_get_with_http_info + api255_policies_user_group_quota_rules_patch_with_http_info = policies_user_group_quota_rules_patch_with_http_info + api255_policies_user_group_quota_rules_post_with_http_info = policies_user_group_quota_rules_post_with_http_info + api256_policies_alert_watcher_delete_with_http_info = policies_alert_watcher_delete_with_http_info + api256_policies_alert_watcher_get_with_http_info = policies_alert_watcher_get_with_http_info + api256_policies_alert_watcher_members_delete_with_http_info = policies_alert_watcher_members_delete_with_http_info + api256_policies_alert_watcher_members_get_with_http_info = policies_alert_watcher_members_get_with_http_info + api256_policies_alert_watcher_members_post_with_http_info = policies_alert_watcher_members_post_with_http_info + api256_policies_alert_watcher_patch_with_http_info = policies_alert_watcher_patch_with_http_info + api256_policies_alert_watcher_post_with_http_info = policies_alert_watcher_post_with_http_info + api256_policies_alert_watcher_rules_delete_with_http_info = policies_alert_watcher_rules_delete_with_http_info + api256_policies_alert_watcher_rules_get_with_http_info = policies_alert_watcher_rules_get_with_http_info + api256_policies_alert_watcher_rules_patch_with_http_info = policies_alert_watcher_rules_patch_with_http_info + api256_policies_alert_watcher_rules_post_with_http_info = policies_alert_watcher_rules_post_with_http_info + api256_policies_alert_watcher_rules_test_get_with_http_info = policies_alert_watcher_rules_test_get_with_http_info + api256_policies_audit_file_delete_with_http_info = policies_audit_file_delete_with_http_info + api256_policies_audit_file_get_with_http_info = policies_audit_file_get_with_http_info + api256_policies_audit_file_members_delete_with_http_info = policies_audit_file_members_delete_with_http_info + api256_policies_audit_file_members_get_with_http_info = policies_audit_file_members_get_with_http_info + api256_policies_audit_file_members_post_with_http_info = policies_audit_file_members_post_with_http_info + api256_policies_audit_file_patch_with_http_info = policies_audit_file_patch_with_http_info + api256_policies_audit_file_post_with_http_info = policies_audit_file_post_with_http_info + api256_policies_autodir_delete_with_http_info = policies_autodir_delete_with_http_info + api256_policies_autodir_get_with_http_info = policies_autodir_get_with_http_info + api256_policies_autodir_members_delete_with_http_info = policies_autodir_members_delete_with_http_info + api256_policies_autodir_members_get_with_http_info = policies_autodir_members_get_with_http_info + api256_policies_autodir_members_post_with_http_info = policies_autodir_members_post_with_http_info + api256_policies_autodir_patch_with_http_info = policies_autodir_patch_with_http_info + api256_policies_autodir_post_with_http_info = policies_autodir_post_with_http_info + api256_policies_get_with_http_info = policies_get_with_http_info + api256_policies_management_access_delete_with_http_info = policies_management_access_delete_with_http_info + api256_policies_management_access_get_with_http_info = policies_management_access_get_with_http_info + api256_policies_management_access_members_delete_with_http_info = policies_management_access_members_delete_with_http_info + api256_policies_management_access_members_get_with_http_info = policies_management_access_members_get_with_http_info + api256_policies_management_access_members_post_with_http_info = policies_management_access_members_post_with_http_info + api256_policies_management_access_patch_with_http_info = policies_management_access_patch_with_http_info + api256_policies_management_access_post_with_http_info = policies_management_access_post_with_http_info + api256_policies_members_get_with_http_info = policies_members_get_with_http_info + api256_policies_network_access_delete_with_http_info = policies_network_access_delete_with_http_info + api256_policies_network_access_get_with_http_info = policies_network_access_get_with_http_info + api256_policies_network_access_members_get_with_http_info = policies_network_access_members_get_with_http_info + api256_policies_network_access_patch_with_http_info = policies_network_access_patch_with_http_info + api256_policies_network_access_post_with_http_info = policies_network_access_post_with_http_info + api256_policies_network_access_rules_delete_with_http_info = policies_network_access_rules_delete_with_http_info + api256_policies_network_access_rules_get_with_http_info = policies_network_access_rules_get_with_http_info + api256_policies_network_access_rules_patch_with_http_info = policies_network_access_rules_patch_with_http_info + api256_policies_network_access_rules_post_with_http_info = policies_network_access_rules_post_with_http_info + api256_policies_nfs_client_rules_delete_with_http_info = policies_nfs_client_rules_delete_with_http_info + api256_policies_nfs_client_rules_get_with_http_info = policies_nfs_client_rules_get_with_http_info + api256_policies_nfs_client_rules_patch_with_http_info = policies_nfs_client_rules_patch_with_http_info + api256_policies_nfs_client_rules_post_with_http_info = policies_nfs_client_rules_post_with_http_info + api256_policies_nfs_delete_with_http_info = policies_nfs_delete_with_http_info + api256_policies_nfs_get_with_http_info = policies_nfs_get_with_http_info + api256_policies_nfs_members_delete_with_http_info = policies_nfs_members_delete_with_http_info + api256_policies_nfs_members_get_with_http_info = policies_nfs_members_get_with_http_info + api256_policies_nfs_members_post_with_http_info = policies_nfs_members_post_with_http_info + api256_policies_nfs_patch_with_http_info = policies_nfs_patch_with_http_info + api256_policies_nfs_post_with_http_info = policies_nfs_post_with_http_info + api256_policies_object_store_access_get_with_http_info = policies_object_store_access_get_with_http_info + api256_policies_object_store_access_members_delete_with_http_info = policies_object_store_access_members_delete_with_http_info + api256_policies_object_store_access_members_get_with_http_info = policies_object_store_access_members_get_with_http_info + api256_policies_object_store_access_members_post_with_http_info = policies_object_store_access_members_post_with_http_info + api256_policies_object_store_access_rules_get_with_http_info = policies_object_store_access_rules_get_with_http_info + api256_policies_password_get_with_http_info = policies_password_get_with_http_info + api256_policies_password_patch_with_http_info = policies_password_patch_with_http_info + api256_policies_qos_delete_with_http_info = policies_qos_delete_with_http_info + api256_policies_qos_get_with_http_info = policies_qos_get_with_http_info + api256_policies_qos_members_delete_with_http_info = policies_qos_members_delete_with_http_info + api256_policies_qos_members_get_with_http_info = policies_qos_members_get_with_http_info + api256_policies_qos_members_post_with_http_info = policies_qos_members_post_with_http_info + api256_policies_qos_patch_with_http_info = policies_qos_patch_with_http_info + api256_policies_qos_post_with_http_info = policies_qos_post_with_http_info + api256_policies_quota_delete_with_http_info = policies_quota_delete_with_http_info + api256_policies_quota_get_with_http_info = policies_quota_get_with_http_info + api256_policies_quota_members_delete_with_http_info = policies_quota_members_delete_with_http_info + api256_policies_quota_members_get_with_http_info = policies_quota_members_get_with_http_info + api256_policies_quota_members_post_with_http_info = policies_quota_members_post_with_http_info + api256_policies_quota_patch_with_http_info = policies_quota_patch_with_http_info + api256_policies_quota_post_with_http_info = policies_quota_post_with_http_info + api256_policies_quota_rules_delete_with_http_info = policies_quota_rules_delete_with_http_info + api256_policies_quota_rules_get_with_http_info = policies_quota_rules_get_with_http_info + api256_policies_quota_rules_patch_with_http_info = policies_quota_rules_patch_with_http_info + api256_policies_quota_rules_post_with_http_info = policies_quota_rules_post_with_http_info + api256_policies_smb_client_rules_delete_with_http_info = policies_smb_client_rules_delete_with_http_info + api256_policies_smb_client_rules_get_with_http_info = policies_smb_client_rules_get_with_http_info + api256_policies_smb_client_rules_post_with_http_info = policies_smb_client_rules_post_with_http_info + api256_policies_smb_delete_with_http_info = policies_smb_delete_with_http_info + api256_policies_smb_get_with_http_info = policies_smb_get_with_http_info + api256_policies_smb_members_delete_with_http_info = policies_smb_members_delete_with_http_info + api256_policies_smb_members_get_with_http_info = policies_smb_members_get_with_http_info + api256_policies_smb_members_post_with_http_info = policies_smb_members_post_with_http_info + api256_policies_smb_patch_with_http_info = policies_smb_patch_with_http_info + api256_policies_smb_post_with_http_info = policies_smb_post_with_http_info + api256_policies_snapshot_delete_with_http_info = policies_snapshot_delete_with_http_info + api256_policies_snapshot_get_with_http_info = policies_snapshot_get_with_http_info + api256_policies_snapshot_members_delete_with_http_info = policies_snapshot_members_delete_with_http_info + api256_policies_snapshot_members_get_with_http_info = policies_snapshot_members_get_with_http_info + api256_policies_snapshot_members_post_with_http_info = policies_snapshot_members_post_with_http_info + api256_policies_snapshot_patch_with_http_info = policies_snapshot_patch_with_http_info + api256_policies_snapshot_post_with_http_info = policies_snapshot_post_with_http_info + api256_policies_snapshot_rules_delete_with_http_info = policies_snapshot_rules_delete_with_http_info + api256_policies_snapshot_rules_get_with_http_info = policies_snapshot_rules_get_with_http_info + api256_policies_snapshot_rules_patch_with_http_info = policies_snapshot_rules_patch_with_http_info + api256_policies_snapshot_rules_post_with_http_info = policies_snapshot_rules_post_with_http_info + api256_policies_tls_delete_with_http_info = policies_tls_delete_with_http_info + api256_policies_tls_get_with_http_info = policies_tls_get_with_http_info + api256_policies_tls_members_delete_with_http_info = policies_tls_members_delete_with_http_info + api256_policies_tls_members_get_with_http_info = policies_tls_members_get_with_http_info + api256_policies_tls_members_post_with_http_info = policies_tls_members_post_with_http_info + api256_policies_tls_patch_with_http_info = policies_tls_patch_with_http_info + api256_policies_tls_post_with_http_info = policies_tls_post_with_http_info + api256_policies_user_group_quota_delete_with_http_info = policies_user_group_quota_delete_with_http_info + api256_policies_user_group_quota_get_with_http_info = policies_user_group_quota_get_with_http_info + api256_policies_user_group_quota_members_delete_with_http_info = policies_user_group_quota_members_delete_with_http_info + api256_policies_user_group_quota_members_get_with_http_info = policies_user_group_quota_members_get_with_http_info + api256_policies_user_group_quota_members_post_with_http_info = policies_user_group_quota_members_post_with_http_info + api256_policies_user_group_quota_patch_with_http_info = policies_user_group_quota_patch_with_http_info + api256_policies_user_group_quota_post_with_http_info = policies_user_group_quota_post_with_http_info + api256_policies_user_group_quota_rules_delete_with_http_info = policies_user_group_quota_rules_delete_with_http_info + api256_policies_user_group_quota_rules_get_with_http_info = policies_user_group_quota_rules_get_with_http_info + api256_policies_user_group_quota_rules_patch_with_http_info = policies_user_group_quota_rules_patch_with_http_info + api256_policies_user_group_quota_rules_post_with_http_info = policies_user_group_quota_rules_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/ports_api_v_2_49.py b/pypureclient/flasharray/_common/apis/ports_api_v_2_49.py index 2a24595d69..7dd2d4e20f 100644 --- a/pypureclient/flasharray/_common/apis/ports_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/ports_api_v_2_49.py @@ -423,3 +423,7 @@ def ports_initiators_get_with_http_info( api253_ports_initiators_get_with_http_info = ports_initiators_get_with_http_info api254_ports_get_with_http_info = ports_get_with_http_info api254_ports_initiators_get_with_http_info = ports_initiators_get_with_http_info + api255_ports_get_with_http_info = ports_get_with_http_info + api255_ports_initiators_get_with_http_info = ports_initiators_get_with_http_info + api256_ports_get_with_http_info = ports_get_with_http_info + api256_ports_initiators_get_with_http_info = ports_initiators_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/presets_api_v_2_51.py b/pypureclient/flasharray/_common/apis/presets_api_v_2_51.py index bc65690ea6..02a3fc5a5c 100644 --- a/pypureclient/flasharray/_common/apis/presets_api_v_2_51.py +++ b/pypureclient/flasharray/_common/apis/presets_api_v_2_51.py @@ -807,3 +807,13 @@ def presets_workload_put_with_http_info( api254_presets_workload_patch_with_http_info = presets_workload_patch_with_http_info api254_presets_workload_post_with_http_info = presets_workload_post_with_http_info api254_presets_workload_put_with_http_info = presets_workload_put_with_http_info + api255_presets_workload_delete_with_http_info = presets_workload_delete_with_http_info + api255_presets_workload_get_with_http_info = presets_workload_get_with_http_info + api255_presets_workload_patch_with_http_info = presets_workload_patch_with_http_info + api255_presets_workload_post_with_http_info = presets_workload_post_with_http_info + api255_presets_workload_put_with_http_info = presets_workload_put_with_http_info + api256_presets_workload_delete_with_http_info = presets_workload_delete_with_http_info + api256_presets_workload_get_with_http_info = presets_workload_get_with_http_info + api256_presets_workload_patch_with_http_info = presets_workload_patch_with_http_info + api256_presets_workload_post_with_http_info = presets_workload_post_with_http_info + api256_presets_workload_put_with_http_info = presets_workload_put_with_http_info diff --git a/pypureclient/flasharray/_common/apis/protection_group_snapshots_api_v_2_49.py b/pypureclient/flasharray/_common/apis/protection_group_snapshots_api_v_2_49.py index 250266603a..954cd84cb6 100644 --- a/pypureclient/flasharray/_common/apis/protection_group_snapshots_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/protection_group_snapshots_api_v_2_49.py @@ -1878,3 +1878,23 @@ def protection_group_snapshots_transfer_get_with_http_info( api254_protection_group_snapshots_tags_get_with_http_info = protection_group_snapshots_tags_get_with_http_info api254_protection_group_snapshots_test_post_with_http_info = protection_group_snapshots_test_post_with_http_info api254_protection_group_snapshots_transfer_get_with_http_info = protection_group_snapshots_transfer_get_with_http_info + api255_protection_group_snapshots_delete_with_http_info = protection_group_snapshots_delete_with_http_info + api255_protection_group_snapshots_get_with_http_info = protection_group_snapshots_get_with_http_info + api255_protection_group_snapshots_patch_with_http_info = protection_group_snapshots_patch_with_http_info + api255_protection_group_snapshots_post_with_http_info = protection_group_snapshots_post_with_http_info + api255_protection_group_snapshots_replica_post_with_http_info = protection_group_snapshots_replica_post_with_http_info + api255_protection_group_snapshots_tags_batch_put_with_http_info = protection_group_snapshots_tags_batch_put_with_http_info + api255_protection_group_snapshots_tags_delete_with_http_info = protection_group_snapshots_tags_delete_with_http_info + api255_protection_group_snapshots_tags_get_with_http_info = protection_group_snapshots_tags_get_with_http_info + api255_protection_group_snapshots_test_post_with_http_info = protection_group_snapshots_test_post_with_http_info + api255_protection_group_snapshots_transfer_get_with_http_info = protection_group_snapshots_transfer_get_with_http_info + api256_protection_group_snapshots_delete_with_http_info = protection_group_snapshots_delete_with_http_info + api256_protection_group_snapshots_get_with_http_info = protection_group_snapshots_get_with_http_info + api256_protection_group_snapshots_patch_with_http_info = protection_group_snapshots_patch_with_http_info + api256_protection_group_snapshots_post_with_http_info = protection_group_snapshots_post_with_http_info + api256_protection_group_snapshots_replica_post_with_http_info = protection_group_snapshots_replica_post_with_http_info + api256_protection_group_snapshots_tags_batch_put_with_http_info = protection_group_snapshots_tags_batch_put_with_http_info + api256_protection_group_snapshots_tags_delete_with_http_info = protection_group_snapshots_tags_delete_with_http_info + api256_protection_group_snapshots_tags_get_with_http_info = protection_group_snapshots_tags_get_with_http_info + api256_protection_group_snapshots_test_post_with_http_info = protection_group_snapshots_test_post_with_http_info + api256_protection_group_snapshots_transfer_get_with_http_info = protection_group_snapshots_transfer_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/protection_groups_api_v_2_49.py b/pypureclient/flasharray/_common/apis/protection_groups_api_v_2_49.py index 6a197bd841..83b4e9a0f7 100644 --- a/pypureclient/flasharray/_common/apis/protection_groups_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/protection_groups_api_v_2_49.py @@ -4180,3 +4180,49 @@ def protection_groups_volumes_post_with_http_info( api254_protection_groups_volumes_delete_with_http_info = protection_groups_volumes_delete_with_http_info api254_protection_groups_volumes_get_with_http_info = protection_groups_volumes_get_with_http_info api254_protection_groups_volumes_post_with_http_info = protection_groups_volumes_post_with_http_info + api255_protection_groups_delete_with_http_info = protection_groups_delete_with_http_info + api255_protection_groups_get_with_http_info = protection_groups_get_with_http_info + api255_protection_groups_host_groups_delete_with_http_info = protection_groups_host_groups_delete_with_http_info + api255_protection_groups_host_groups_get_with_http_info = protection_groups_host_groups_get_with_http_info + api255_protection_groups_host_groups_post_with_http_info = protection_groups_host_groups_post_with_http_info + api255_protection_groups_hosts_delete_with_http_info = protection_groups_hosts_delete_with_http_info + api255_protection_groups_hosts_get_with_http_info = protection_groups_hosts_get_with_http_info + api255_protection_groups_hosts_post_with_http_info = protection_groups_hosts_post_with_http_info + api255_protection_groups_patch_with_http_info = protection_groups_patch_with_http_info + api255_protection_groups_performance_replication_by_array_get_with_http_info = protection_groups_performance_replication_by_array_get_with_http_info + api255_protection_groups_performance_replication_get_with_http_info = protection_groups_performance_replication_get_with_http_info + api255_protection_groups_post_with_http_info = protection_groups_post_with_http_info + api255_protection_groups_space_get_with_http_info = protection_groups_space_get_with_http_info + api255_protection_groups_tags_batch_put_with_http_info = protection_groups_tags_batch_put_with_http_info + api255_protection_groups_tags_delete_with_http_info = protection_groups_tags_delete_with_http_info + api255_protection_groups_tags_get_with_http_info = protection_groups_tags_get_with_http_info + api255_protection_groups_targets_delete_with_http_info = protection_groups_targets_delete_with_http_info + api255_protection_groups_targets_get_with_http_info = protection_groups_targets_get_with_http_info + api255_protection_groups_targets_patch_with_http_info = protection_groups_targets_patch_with_http_info + api255_protection_groups_targets_post_with_http_info = protection_groups_targets_post_with_http_info + api255_protection_groups_volumes_delete_with_http_info = protection_groups_volumes_delete_with_http_info + api255_protection_groups_volumes_get_with_http_info = protection_groups_volumes_get_with_http_info + api255_protection_groups_volumes_post_with_http_info = protection_groups_volumes_post_with_http_info + api256_protection_groups_delete_with_http_info = protection_groups_delete_with_http_info + api256_protection_groups_get_with_http_info = protection_groups_get_with_http_info + api256_protection_groups_host_groups_delete_with_http_info = protection_groups_host_groups_delete_with_http_info + api256_protection_groups_host_groups_get_with_http_info = protection_groups_host_groups_get_with_http_info + api256_protection_groups_host_groups_post_with_http_info = protection_groups_host_groups_post_with_http_info + api256_protection_groups_hosts_delete_with_http_info = protection_groups_hosts_delete_with_http_info + api256_protection_groups_hosts_get_with_http_info = protection_groups_hosts_get_with_http_info + api256_protection_groups_hosts_post_with_http_info = protection_groups_hosts_post_with_http_info + api256_protection_groups_patch_with_http_info = protection_groups_patch_with_http_info + api256_protection_groups_performance_replication_by_array_get_with_http_info = protection_groups_performance_replication_by_array_get_with_http_info + api256_protection_groups_performance_replication_get_with_http_info = protection_groups_performance_replication_get_with_http_info + api256_protection_groups_post_with_http_info = protection_groups_post_with_http_info + api256_protection_groups_space_get_with_http_info = protection_groups_space_get_with_http_info + api256_protection_groups_tags_batch_put_with_http_info = protection_groups_tags_batch_put_with_http_info + api256_protection_groups_tags_delete_with_http_info = protection_groups_tags_delete_with_http_info + api256_protection_groups_tags_get_with_http_info = protection_groups_tags_get_with_http_info + api256_protection_groups_targets_delete_with_http_info = protection_groups_targets_delete_with_http_info + api256_protection_groups_targets_get_with_http_info = protection_groups_targets_get_with_http_info + api256_protection_groups_targets_patch_with_http_info = protection_groups_targets_patch_with_http_info + api256_protection_groups_targets_post_with_http_info = protection_groups_targets_post_with_http_info + api256_protection_groups_volumes_delete_with_http_info = protection_groups_volumes_delete_with_http_info + api256_protection_groups_volumes_get_with_http_info = protection_groups_volumes_get_with_http_info + api256_protection_groups_volumes_post_with_http_info = protection_groups_volumes_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/realm_connections_api_v_2_55.py b/pypureclient/flasharray/_common/apis/realm_connections_api_v_2_55.py new file mode 100644 index 0000000000..eacef435f2 --- /dev/null +++ b/pypureclient/flasharray/_common/apis/realm_connections_api_v_2_55.py @@ -0,0 +1,1260 @@ + +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flasharray._common.models.realm_connection_key_get_response_v_2_54 import RealmConnectionKeyGetResponse +from pypureclient.flasharray._common.models.realm_connection_key_post_response_v_2_54 import RealmConnectionKeyPostResponse +from pypureclient.flasharray._common.models.realm_connection_key_post_v_2_50 import RealmConnectionKeyPost +from pypureclient.flasharray._common.models.realm_connection_with_key_v_2_54 import RealmConnectionWithKey +from pypureclient.flasharray._common.models.realm_connections_get_response_v_2_54 import RealmConnectionsGetResponse +from pypureclient.flasharray._common.models.realm_connections_response_v_2_54 import RealmConnectionsResponse + +class RealmConnectionsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def realm_connections_connection_keys_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete realm connection keys + + Deletes all connection keys for a given realm. Note that every realm connection key is a one-time key and is deleted automatically upon a successful connection or once it expires. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'realm_ids', + 'realm_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realm_connections_connection_keys_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('realm_ids') is not None: # noqa: E501 + _query_params.append(('realm_ids', _params['realm_ids'])) + _collection_formats['realm_ids'] = 'csv' + + if _params.get('realm_names') is not None: # noqa: E501 + _query_params.append(('realm_names', _params['realm_names'])) + _collection_formats['realm_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/realm-connections/connection-keys', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realm_connections_connection_keys_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Get realm connection key information + + Displays information about existing realm connection keys. Secret keys are not displayed, as they are only available at the time of key creation. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RealmConnectionKeyGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'limit', + 'offset', + 'realm_ids', + 'realm_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realm_connections_connection_keys_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('realm_ids') is not None: # noqa: E501 + _query_params.append(('realm_ids', _params['realm_ids'])) + _collection_formats['realm_ids'] = 'csv' + + if _params.get('realm_names') is not None: # noqa: E501 + _query_params.append(('realm_names', _params['realm_names'])) + _collection_formats['realm_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "RealmConnectionKeyGetResponse", + '207': "RealmConnectionKeyGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/realm-connections/connection-keys', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realm_connections_connection_keys_post_with_http_info( + self, + connection_key: RealmConnectionKeyPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create realm connection key + + Creates a new one-time connection key to allow establishing a connection to the specified realm. The key is valid until a successful connection is established or its expiration time is reached. Note that this is the only time the connection key is displayed; it cannot be retrieved subsequently. + + :param connection_key: (required) + :type connection_key: RealmConnectionKeyPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RealmConnectionKeyPostResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'connection_key', + 'authorization', + 'x_request_id', + 'context_names', + 'realm_ids', + 'realm_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realm_connections_connection_keys_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('realm_ids') is not None: # noqa: E501 + _query_params.append(('realm_ids', _params['realm_ids'])) + _collection_formats['realm_ids'] = 'csv' + + if _params.get('realm_names') is not None: # noqa: E501 + _query_params.append(('realm_names', _params['realm_names'])) + _collection_formats['realm_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['connection_key'] is not None: + _body_params = _params['connection_key'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "RealmConnectionKeyPostResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/realm-connections/connection-keys', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realm_connections_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format.")] = None, + local_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together.")] = None, + local_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together.")] = None, + remote_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + remote_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete realm connections. + + Deletes connections between realms. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format. + :type ids: List[str] + :param local_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together. + :type local_realm_ids: List[str] + :param local_realm_names: Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together. + :type local_realm_names: List[str] + :param remote_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together. + :type remote_realm_ids: List[str] + :param remote_realm_names: Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together. + :type remote_realm_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'local_realm_ids', + 'local_realm_names', + 'remote_realm_ids', + 'remote_realm_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realm_connections_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('local_realm_ids') is not None: # noqa: E501 + _query_params.append(('local_realm_ids', _params['local_realm_ids'])) + _collection_formats['local_realm_ids'] = 'csv' + + if _params.get('local_realm_names') is not None: # noqa: E501 + _query_params.append(('local_realm_names', _params['local_realm_names'])) + _collection_formats['local_realm_names'] = 'csv' + + if _params.get('remote_realm_ids') is not None: # noqa: E501 + _query_params.append(('remote_realm_ids', _params['remote_realm_ids'])) + _collection_formats['remote_realm_ids'] = 'csv' + + if _params.get('remote_realm_names') is not None: # noqa: E501 + _query_params.append(('remote_realm_names', _params['remote_realm_names'])) + _collection_formats['remote_realm_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/realm-connections', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realm_connections_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + local_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together.")] = None, + local_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + remote_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + remote_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List realm connections. + + Displays a list of configured realm connections. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param local_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together. + :type local_realm_ids: List[str] + :param local_realm_names: Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together. + :type local_realm_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param remote_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together. + :type remote_realm_ids: List[str] + :param remote_realm_names: Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together. + :type remote_realm_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RealmConnectionsGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'local_realm_ids', + 'local_realm_names', + 'offset', + 'remote_realm_ids', + 'remote_realm_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realm_connections_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('local_realm_ids') is not None: # noqa: E501 + _query_params.append(('local_realm_ids', _params['local_realm_ids'])) + _collection_formats['local_realm_ids'] = 'csv' + + if _params.get('local_realm_names') is not None: # noqa: E501 + _query_params.append(('local_realm_names', _params['local_realm_names'])) + _collection_formats['local_realm_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('remote_realm_ids') is not None: # noqa: E501 + _query_params.append(('remote_realm_ids', _params['remote_realm_ids'])) + _collection_formats['remote_realm_ids'] = 'csv' + + if _params.get('remote_realm_names') is not None: # noqa: E501 + _query_params.append(('remote_realm_names', _params['remote_realm_names'])) + _collection_formats['remote_realm_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "RealmConnectionsGetResponse", + '207': "RealmConnectionsGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/realm-connections', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realm_connections_patch_with_http_info( + self, + connection: RealmConnectionWithKey, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format.")] = None, + local_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together.")] = None, + local_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together.")] = None, + remote_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + remote_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify realm connections. + + Modifies the connection type between realms. + + :param connection: (required) + :type connection: RealmConnectionWithKey + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Enter multiple resource IDs in comma-separated format. + :type ids: List[str] + :param local_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together. + :type local_realm_ids: List[str] + :param local_realm_names: Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together. + :type local_realm_names: List[str] + :param remote_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together. + :type remote_realm_ids: List[str] + :param remote_realm_names: Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together. + :type remote_realm_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RealmConnectionsResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'connection', + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'local_realm_ids', + 'local_realm_names', + 'remote_realm_ids', + 'remote_realm_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realm_connections_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('local_realm_ids') is not None: # noqa: E501 + _query_params.append(('local_realm_ids', _params['local_realm_ids'])) + _collection_formats['local_realm_ids'] = 'csv' + + if _params.get('local_realm_names') is not None: # noqa: E501 + _query_params.append(('local_realm_names', _params['local_realm_names'])) + _collection_formats['local_realm_names'] = 'csv' + + if _params.get('remote_realm_ids') is not None: # noqa: E501 + _query_params.append(('remote_realm_ids', _params['remote_realm_ids'])) + _collection_formats['remote_realm_ids'] = 'csv' + + if _params.get('remote_realm_names') is not None: # noqa: E501 + _query_params.append(('remote_realm_names', _params['remote_realm_names'])) + _collection_formats['remote_realm_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['connection'] is not None: + _body_params = _params['connection'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "RealmConnectionsResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/realm-connections', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realm_connections_post_with_http_info( + self, + connection: RealmConnectionWithKey, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + local_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together.")] = None, + local_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together.")] = None, + remote_realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + remote_realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create realm connection. + + Creates a new connection between two realms. + + :param connection: (required) + :type connection: RealmConnectionWithKey + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param local_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The local_realm_ids and local_realm_names parameters cannot be set together. + :type local_realm_ids: List[str] + :param local_realm_names: Performs the operation on the specified unique resource names. Enter multiple resource names in comma-separated format. The local_realm_names and local_realm_ids parameters cannot be set together. + :type local_realm_names: List[str] + :param remote_realm_ids: Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together. + :type remote_realm_ids: List[str] + :param remote_realm_names: Performs the operation on the specified unique resource IDs. Enter multiple resource IDs in comma-separated format. The remote_realm_ids and remote_realm_names parameters cannot be set together. + :type remote_realm_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RealmConnectionsResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'connection', + 'authorization', + 'x_request_id', + 'context_names', + 'local_realm_ids', + 'local_realm_names', + 'remote_realm_ids', + 'remote_realm_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realm_connections_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('local_realm_ids') is not None: # noqa: E501 + _query_params.append(('local_realm_ids', _params['local_realm_ids'])) + _collection_formats['local_realm_ids'] = 'csv' + + if _params.get('local_realm_names') is not None: # noqa: E501 + _query_params.append(('local_realm_names', _params['local_realm_names'])) + _collection_formats['local_realm_names'] = 'csv' + + if _params.get('remote_realm_ids') is not None: # noqa: E501 + _query_params.append(('remote_realm_ids', _params['remote_realm_ids'])) + _collection_formats['remote_realm_ids'] = 'csv' + + if _params.get('remote_realm_names') is not None: # noqa: E501 + _query_params.append(('remote_realm_names', _params['remote_realm_names'])) + _collection_formats['remote_realm_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['connection'] is not None: + _body_params = _params['connection'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "RealmConnectionsResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/realm-connections', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api255_realm_connections_connection_keys_delete_with_http_info = realm_connections_connection_keys_delete_with_http_info + api255_realm_connections_connection_keys_get_with_http_info = realm_connections_connection_keys_get_with_http_info + api255_realm_connections_connection_keys_post_with_http_info = realm_connections_connection_keys_post_with_http_info + api255_realm_connections_delete_with_http_info = realm_connections_delete_with_http_info + api255_realm_connections_get_with_http_info = realm_connections_get_with_http_info + api255_realm_connections_patch_with_http_info = realm_connections_patch_with_http_info + api255_realm_connections_post_with_http_info = realm_connections_post_with_http_info + api256_realm_connections_connection_keys_delete_with_http_info = realm_connections_connection_keys_delete_with_http_info + api256_realm_connections_connection_keys_get_with_http_info = realm_connections_connection_keys_get_with_http_info + api256_realm_connections_connection_keys_post_with_http_info = realm_connections_connection_keys_post_with_http_info + api256_realm_connections_delete_with_http_info = realm_connections_delete_with_http_info + api256_realm_connections_get_with_http_info = realm_connections_get_with_http_info + api256_realm_connections_patch_with_http_info = realm_connections_patch_with_http_info + api256_realm_connections_post_with_http_info = realm_connections_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/realms_api_v_2_55.py b/pypureclient/flasharray/_common/apis/realms_api_v_2_55.py new file mode 100644 index 0000000000..4b7bdaaaa5 --- /dev/null +++ b/pypureclient/flasharray/_common/apis/realms_api_v_2_55.py @@ -0,0 +1,2410 @@ + +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flasharray._common.models.container_performance_get_response_v_2_52 import ContainerPerformanceGetResponse +from pypureclient.flasharray._common.models.non_copyable_tag_v_2_49 import NonCopyableTag +from pypureclient.flasharray._common.models.realm_get_response_v_2_55 import RealmGetResponse +from pypureclient.flasharray._common.models.realm_member_get_response_v_2_55 import RealmMemberGetResponse +from pypureclient.flasharray._common.models.realm_member_response_v_2_55 import RealmMemberResponse +from pypureclient.flasharray._common.models.realm_patch_v_2_55 import RealmPatch +from pypureclient.flasharray._common.models.realm_post_v_2_55 import RealmPost +from pypureclient.flasharray._common.models.realm_qos_get_response_v_2_50 import RealmQosGetResponse +from pypureclient.flasharray._common.models.realm_response_v_2_55 import RealmResponse +from pypureclient.flasharray._common.models.realm_space_get_response_v_2_50 import RealmSpaceGetResponse +from pypureclient.flasharray._common.models.tag_get_response_v_2_50 import TagGetResponse +from pypureclient.flasharray._common.models.tag_response_v_2_50 import TagResponse + +class RealmsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def realms_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + eradicate_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to eradicate contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups). This enables you to eradicate containers with contents.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete realms + + Deletes realms that have been destroyed and are pending eradication. Eradicated realms cannot be recovered. Realms are destroyed using the PATCH method. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param eradicate_contents: Set to `true` to eradicate contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups). This enables you to eradicate containers with contents. + :type eradicate_contents: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'eradicate_contents', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realms_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('eradicate_contents') is not None: # noqa: E501 + _query_params.append(('eradicate_contents', _params['eradicate_contents'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/realms', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realms_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List realms + + Displays a list of realms. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RealmGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort', + 'total_item_count', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realms_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "RealmGetResponse", + '207': "RealmGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/realms', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realms_members_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete a member from a realm + + The deletion of a `stretched realm` from an `array`, collapsing the `realm` to a `member array`. Unstretch a `realm` from an `array` when the `data` within the `stretched realm` no longer needs to be synchronously replicated between the two `members`. After a `realm` has been unstretched, synchronous replication stops. A `destroyed` version of the `realm` with `restretch` appended to the `realm name` is created on the `member` that no longer has the `realm`. The `restretched realm` represents a point-in-time `snapshot` of the `realm`, just before it was unstretched. The `restretched realm` enters an `eradication pending period` starting from the time that the `realm` was unstretched. A `restretched realm` can be `destroyed`, but it cannot be explicitly recovered. The `member_names` parameter represents the `name` of the `array` from which the `realm` is to be unstretched. Both `realm` and `member` must be specified by `name` or `ID`. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names', + 'realm_ids', + 'realm_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realms_members_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('realm_ids') is not None: # noqa: E501 + _query_params.append(('realm_ids', _params['realm_ids'])) + _collection_formats['realm_ids'] = 'csv' + + if _params.get('realm_names') is not None: # noqa: E501 + _query_params.append(('realm_names', _params['realm_names'])) + _collection_formats['realm_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/realms/members', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realms_members_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List realms and their members + + The list of `realms` and the `local` and `remote array members` over which the `realms` are stretched. Currently, either `array` is supported as a `member`. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RealmMemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'realm_ids', + 'realm_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realms_members_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('realm_ids') is not None: # noqa: E501 + _query_params.append(('realm_ids', _params['realm_ids'])) + _collection_formats['realm_ids'] = 'csv' + + if _params.get('realm_names') is not None: # noqa: E501 + _query_params.append(('realm_names', _params['realm_names'])) + _collection_formats['realm_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "RealmMemberGetResponse", + '207': "RealmMemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/realms/members', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realms_members_post_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + realm_ids: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `realm` `IDs`.")] = None, + realm_names: Annotated[Optional[conlist(StrictStr)], Field(description="The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Creates a stretched realm + + The creation of a `stretched realm`. When a `realm` is stretched to an `array`, the `data` in the `arrays` over which the `realm` is stretched is synchronously replicated. The `member_names` or `member_ids` parameter represents the `array` over which the `realm` is to be stretched. Both `realm` and `member` must be specified by `name` or `ID`. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param realm_ids: The comma-separated list of `realm` `IDs`. + :type realm_ids: List[str] + :param realm_names: The unique `realm` `names` on which to perform the operation. Multiple `names` can be entered in a comma-separated format, for example, `realm01,realm02`. + :type realm_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RealmMemberResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names', + 'realm_ids', + 'realm_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realms_members_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('realm_ids') is not None: # noqa: E501 + _query_params.append(('realm_ids', _params['realm_ids'])) + _collection_formats['realm_ids'] = 'csv' + + if _params.get('realm_names') is not None: # noqa: E501 + _query_params.append(('realm_names', _params['realm_names'])) + _collection_formats['realm_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "RealmMemberResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/realms/members', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realms_patch_with_http_info( + self, + realm: RealmPatch, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + destroy_contents: Annotated[Optional[StrictBool], Field(description="Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups), including eradicating containers with content.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + ignore_usage: Annotated[Optional[StrictBool], Field(description="Set to `true` to set a `quota_limit` that is lower than the existing usage. This ensures that no new volumes can be created until the existing usage drops below the `quota_limit`. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify realms + + Modifies realm details. + + :param realm: (required) + :type realm: RealmPatch + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param destroy_contents: Set to `true` to destroy contents (e.g., volumes, protection groups, snapshots) and containers (e.g., realms, pods, volume groups), including eradicating containers with content. + :type destroy_contents: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param ignore_usage: Set to `true` to set a `quota_limit` that is lower than the existing usage. This ensures that no new volumes can be created until the existing usage drops below the `quota_limit`. If not specified, defaults to `false`. + :type ignore_usage: bool + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RealmResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'realm', + 'authorization', + 'x_request_id', + 'context_names', + 'destroy_contents', + 'ids', + 'ignore_usage', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realms_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('destroy_contents') is not None: # noqa: E501 + _query_params.append(('destroy_contents', _params['destroy_contents'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('ignore_usage') is not None: # noqa: E501 + _query_params.append(('ignore_usage', _params['ignore_usage'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['realm'] is not None: + _body_params = _params['realm'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "RealmResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/realms', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realms_performance_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List realm performance data + + Displays real-time and historical performance data, real-time latency data, and average I/O sizes across all realms, displayed both by realm and as a total across all realms. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ContainerPerformanceGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'end_time', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'resolution', + 'sort', + 'start_time', + 'total_item_count', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realms_performance_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('end_time') is not None: # noqa: E501 + _query_params.append(('end_time', _params['end_time'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('resolution') is not None: # noqa: E501 + _query_params.append(('resolution', _params['resolution'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('start_time') is not None: # noqa: E501 + _query_params.append(('start_time', _params['start_time'])) + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ContainerPerformanceGetResponse", + '207': "ContainerPerformanceGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/realms/performance', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realms_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + with_default_protection: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the newly created container (pod or realm) will inherit the default protection configuration from its parent container (realm or array). If specified as `false`, the default protection of the parent container will not be applied automatically. If not specified, defaults to `true`.")] = None, + realm: Optional[RealmPost] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create realms + + Creates realms on the local array. Each realm must be given a name that is unique across the connected arrays. + + :param names: Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param with_default_protection: If specified as `true`, the newly created container (pod or realm) will inherit the default protection configuration from its parent container (realm or array). If specified as `false`, the default protection of the parent container will not be applied automatically. If not specified, defaults to `true`. + :type with_default_protection: bool + :param realm: + :type realm: RealmPost + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RealmResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'authorization', + 'x_request_id', + 'context_names', + 'with_default_protection', + 'realm' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realms_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('with_default_protection') is not None: # noqa: E501 + _query_params.append(('with_default_protection', _params['with_default_protection'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['realm'] is not None: + _body_params = _params['realm'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "RealmResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/realms', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realms_qos_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List realm QoS config + + Displays real-time and historical QoS configuration data for each realm. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RealmQosGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'end_time', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'resolution', + 'sort', + 'start_time', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realms_qos_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('end_time') is not None: # noqa: E501 + _query_params.append(('end_time', _params['end_time'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('resolution') is not None: # noqa: E501 + _query_params.append(('resolution', _params['resolution'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('start_time') is not None: # noqa: E501 + _query_params.append(('start_time', _params['start_time'])) + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "RealmQosGetResponse", + '207': "RealmQosGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/realms/qos', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realms_space_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + end_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + start_time: Annotated[Optional[StrictInt], Field(description="Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List realm space information + + Displays provisioned size and storage consumption data for each realm on the local array. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param end_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type end_time: int + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param resolution: The number of milliseconds between samples of historical data. For array-wide performance metrics (`/arrays/performance` endpoint), valid values are `1000` (1 second), `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For performance metrics on storage objects (`/performance` endpoint), such as volumes, valid values are `30000` (30 seconds), `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). For space metrics, (`/space` endpoint), valid values are `300000` (5 minutes), `1800000` (30 minutes), `7200000` (2 hours), `28800000` (8 hours), and `86400000` (24 hours). Include the `start_time` parameter to display the performance data starting at the specified start time. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. Include the `end_time` parameter to display the performance data until the specified end time. If `end_time`is not specified, the end time will default to the current time. If the `resolution` parameter is not specified but either the `start_time` or `end_time` parameter is, then `resolution` will default to the lowest valid resolution. + :type resolution: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param start_time: Displays historical performance data for the specified time window, where `start_time` is the beginning of the time window, and `end_time` is the end of the time window. The `start_time` and `end_time` parameters are specified in milliseconds since the UNIX epoch. If `start_time` is not specified, the start time will default to one resolution before the end time, meaning that the most recent sample of performance data will be displayed. If `end_time`is not specified, the end time will default to the current time. Include the `resolution` parameter to display the performance data at the specified resolution. If not specified, `resolution` defaults to the lowest valid resolution. + :type start_time: int + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RealmSpaceGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'destroyed', + 'end_time', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'resolution', + 'sort', + 'start_time', + 'total_item_count', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realms_space_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('end_time') is not None: # noqa: E501 + _query_params.append(('end_time', _params['end_time'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('resolution') is not None: # noqa: E501 + _query_params.append(('resolution', _params['resolution'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('start_time') is not None: # noqa: E501 + _query_params.append(('start_time', _params['start_time'])) + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "RealmSpaceGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/realms/space', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realms_tags_batch_put_with_http_info( + self, + tag: Annotated[conlist(NonCopyableTag, max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if already existing, updated.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Update tags + + Updates or creates tags for all specified objects. + + :param tag: A list of tags to be created or, if already existing, updated. (required) + :type tag: List[NonCopyableTag] + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TagResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tag', + 'authorization', + 'x_request_id', + 'context_names', + 'resource_ids', + 'resource_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realms_tags_batch_put" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('resource_ids') is not None: # noqa: E501 + _query_params.append(('resource_ids', _params['resource_ids'])) + _collection_formats['resource_ids'] = 'csv' + + if _params.get('resource_names') is not None: # noqa: E501 + _query_params.append(('resource_names', _params['resource_names'])) + _collection_formats['resource_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['tag'] is not None: + _body_params = _params['tag'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "TagResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/realms/tags/batch', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realms_tags_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete tags + + Deletes specified tags. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete request. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'keys', + 'namespaces', + 'resource_ids', + 'resource_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realms_tags_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('keys') is not None: # noqa: E501 + _query_params.append(('keys', _params['keys'])) + _collection_formats['keys'] = 'csv' + + if _params.get('namespaces') is not None: # noqa: E501 + _query_params.append(('namespaces', _params['namespaces'])) + _collection_formats['namespaces'] = 'csv' + + if _params.get('resource_ids') is not None: # noqa: E501 + _query_params.append(('resource_ids', _params['resource_ids'])) + _collection_formats['resource_ids'] = 'csv' + + if _params.get('resource_names') is not None: # noqa: E501 + _query_params.append(('resource_names', _params['resource_names'])) + _collection_formats['resource_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/realms/tags', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def realms_tags_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + resource_destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List tags + + Displays the list of tags. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param resource_destroyed: If set to `true`, returns only objects from destroyed resources. Returns an error if the name of a live resource is specified in the `resource_names` query parameter. If set to `false`, returns only objects from live resources. Returns an error if the name of a destroyed resource is specified in the `resource_names` query parameter. + :type resource_destroyed: bool + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TagGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'limit', + 'namespaces', + 'offset', + 'resource_destroyed', + 'resource_ids', + 'resource_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_realms_tags_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('namespaces') is not None: # noqa: E501 + _query_params.append(('namespaces', _params['namespaces'])) + _collection_formats['namespaces'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('resource_destroyed') is not None: # noqa: E501 + _query_params.append(('resource_destroyed', _params['resource_destroyed'])) + + if _params.get('resource_ids') is not None: # noqa: E501 + _query_params.append(('resource_ids', _params['resource_ids'])) + _collection_formats['resource_ids'] = 'csv' + + if _params.get('resource_names') is not None: # noqa: E501 + _query_params.append(('resource_names', _params['resource_names'])) + _collection_formats['resource_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "TagGetResponse", + '207': "TagGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/realms/tags', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api255_realms_delete_with_http_info = realms_delete_with_http_info + api255_realms_get_with_http_info = realms_get_with_http_info + api255_realms_members_delete_with_http_info = realms_members_delete_with_http_info + api255_realms_members_get_with_http_info = realms_members_get_with_http_info + api255_realms_members_post_with_http_info = realms_members_post_with_http_info + api255_realms_patch_with_http_info = realms_patch_with_http_info + api255_realms_performance_get_with_http_info = realms_performance_get_with_http_info + api255_realms_post_with_http_info = realms_post_with_http_info + api255_realms_qos_get_with_http_info = realms_qos_get_with_http_info + api255_realms_space_get_with_http_info = realms_space_get_with_http_info + api255_realms_tags_batch_put_with_http_info = realms_tags_batch_put_with_http_info + api255_realms_tags_delete_with_http_info = realms_tags_delete_with_http_info + api255_realms_tags_get_with_http_info = realms_tags_get_with_http_info + api256_realms_delete_with_http_info = realms_delete_with_http_info + api256_realms_get_with_http_info = realms_get_with_http_info + api256_realms_members_delete_with_http_info = realms_members_delete_with_http_info + api256_realms_members_get_with_http_info = realms_members_get_with_http_info + api256_realms_members_post_with_http_info = realms_members_post_with_http_info + api256_realms_patch_with_http_info = realms_patch_with_http_info + api256_realms_performance_get_with_http_info = realms_performance_get_with_http_info + api256_realms_post_with_http_info = realms_post_with_http_info + api256_realms_qos_get_with_http_info = realms_qos_get_with_http_info + api256_realms_space_get_with_http_info = realms_space_get_with_http_info + api256_realms_tags_batch_put_with_http_info = realms_tags_batch_put_with_http_info + api256_realms_tags_delete_with_http_info = realms_tags_delete_with_http_info + api256_realms_tags_get_with_http_info = realms_tags_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/remote_arrays_api_v_2_54.py b/pypureclient/flasharray/_common/apis/remote_arrays_api_v_2_54.py index 3812e740f6..3cc94f6445 100644 --- a/pypureclient/flasharray/_common/apis/remote_arrays_api_v_2_54.py +++ b/pypureclient/flasharray/_common/apis/remote_arrays_api_v_2_54.py @@ -377,3 +377,7 @@ def remote_arrays_patch_with_http_info( # Method Aliases api254_remote_arrays_get_with_http_info = remote_arrays_get_with_http_info api254_remote_arrays_patch_with_http_info = remote_arrays_patch_with_http_info + api255_remote_arrays_get_with_http_info = remote_arrays_get_with_http_info + api255_remote_arrays_patch_with_http_info = remote_arrays_patch_with_http_info + api256_remote_arrays_get_with_http_info = remote_arrays_get_with_http_info + api256_remote_arrays_patch_with_http_info = remote_arrays_patch_with_http_info diff --git a/pypureclient/flasharray/_common/apis/remote_pods_api_v_2_50.py b/pypureclient/flasharray/_common/apis/remote_pods_api_v_2_50.py index 05efd9c153..f944463364 100644 --- a/pypureclient/flasharray/_common/apis/remote_pods_api_v_2_50.py +++ b/pypureclient/flasharray/_common/apis/remote_pods_api_v_2_50.py @@ -477,3 +477,7 @@ def remote_pods_tags_get_with_http_info( api253_remote_pods_tags_get_with_http_info = remote_pods_tags_get_with_http_info api254_remote_pods_get_with_http_info = remote_pods_get_with_http_info api254_remote_pods_tags_get_with_http_info = remote_pods_tags_get_with_http_info + api255_remote_pods_get_with_http_info = remote_pods_get_with_http_info + api255_remote_pods_tags_get_with_http_info = remote_pods_tags_get_with_http_info + api256_remote_pods_get_with_http_info = remote_pods_get_with_http_info + api256_remote_pods_tags_get_with_http_info = remote_pods_tags_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/remote_protection_group_snapshots_api_v_2_49.py b/pypureclient/flasharray/_common/apis/remote_protection_group_snapshots_api_v_2_49.py index 6c09734d12..52af153e98 100644 --- a/pypureclient/flasharray/_common/apis/remote_protection_group_snapshots_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/remote_protection_group_snapshots_api_v_2_49.py @@ -1272,3 +1272,15 @@ def remote_protection_group_snapshots_transfer_get_with_http_info( api254_remote_protection_group_snapshots_post_with_http_info = remote_protection_group_snapshots_post_with_http_info api254_remote_protection_group_snapshots_test_post_with_http_info = remote_protection_group_snapshots_test_post_with_http_info api254_remote_protection_group_snapshots_transfer_get_with_http_info = remote_protection_group_snapshots_transfer_get_with_http_info + api255_remote_protection_group_snapshots_delete_with_http_info = remote_protection_group_snapshots_delete_with_http_info + api255_remote_protection_group_snapshots_get_with_http_info = remote_protection_group_snapshots_get_with_http_info + api255_remote_protection_group_snapshots_patch_with_http_info = remote_protection_group_snapshots_patch_with_http_info + api255_remote_protection_group_snapshots_post_with_http_info = remote_protection_group_snapshots_post_with_http_info + api255_remote_protection_group_snapshots_test_post_with_http_info = remote_protection_group_snapshots_test_post_with_http_info + api255_remote_protection_group_snapshots_transfer_get_with_http_info = remote_protection_group_snapshots_transfer_get_with_http_info + api256_remote_protection_group_snapshots_delete_with_http_info = remote_protection_group_snapshots_delete_with_http_info + api256_remote_protection_group_snapshots_get_with_http_info = remote_protection_group_snapshots_get_with_http_info + api256_remote_protection_group_snapshots_patch_with_http_info = remote_protection_group_snapshots_patch_with_http_info + api256_remote_protection_group_snapshots_post_with_http_info = remote_protection_group_snapshots_post_with_http_info + api256_remote_protection_group_snapshots_test_post_with_http_info = remote_protection_group_snapshots_test_post_with_http_info + api256_remote_protection_group_snapshots_transfer_get_with_http_info = remote_protection_group_snapshots_transfer_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/remote_protection_groups_api_v_2_49.py b/pypureclient/flasharray/_common/apis/remote_protection_groups_api_v_2_49.py index b6d1bfb318..9f66054681 100644 --- a/pypureclient/flasharray/_common/apis/remote_protection_groups_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/remote_protection_groups_api_v_2_49.py @@ -571,3 +571,9 @@ def remote_protection_groups_patch_with_http_info( api254_remote_protection_groups_delete_with_http_info = remote_protection_groups_delete_with_http_info api254_remote_protection_groups_get_with_http_info = remote_protection_groups_get_with_http_info api254_remote_protection_groups_patch_with_http_info = remote_protection_groups_patch_with_http_info + api255_remote_protection_groups_delete_with_http_info = remote_protection_groups_delete_with_http_info + api255_remote_protection_groups_get_with_http_info = remote_protection_groups_get_with_http_info + api255_remote_protection_groups_patch_with_http_info = remote_protection_groups_patch_with_http_info + api256_remote_protection_groups_delete_with_http_info = remote_protection_groups_delete_with_http_info + api256_remote_protection_groups_get_with_http_info = remote_protection_groups_get_with_http_info + api256_remote_protection_groups_patch_with_http_info = remote_protection_groups_patch_with_http_info diff --git a/pypureclient/flasharray/_common/apis/remote_realms_api_v_2_50.py b/pypureclient/flasharray/_common/apis/remote_realms_api_v_2_50.py index e31fcad2e4..dfaa481a16 100644 --- a/pypureclient/flasharray/_common/apis/remote_realms_api_v_2_50.py +++ b/pypureclient/flasharray/_common/apis/remote_realms_api_v_2_50.py @@ -477,3 +477,7 @@ def remote_realms_tags_get_with_http_info( api253_remote_realms_tags_get_with_http_info = remote_realms_tags_get_with_http_info api254_remote_realms_get_with_http_info = remote_realms_get_with_http_info api254_remote_realms_tags_get_with_http_info = remote_realms_tags_get_with_http_info + api255_remote_realms_get_with_http_info = remote_realms_get_with_http_info + api255_remote_realms_tags_get_with_http_info = remote_realms_tags_get_with_http_info + api256_remote_realms_get_with_http_info = remote_realms_get_with_http_info + api256_remote_realms_tags_get_with_http_info = remote_realms_tags_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/remote_volume_snapshots_api_v_2_49.py b/pypureclient/flasharray/_common/apis/remote_volume_snapshots_api_v_2_49.py index 3f8200482f..9fcce479e9 100644 --- a/pypureclient/flasharray/_common/apis/remote_volume_snapshots_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/remote_volume_snapshots_api_v_2_49.py @@ -987,3 +987,13 @@ def remote_volume_snapshots_transfer_get_with_http_info( api254_remote_volume_snapshots_patch_with_http_info = remote_volume_snapshots_patch_with_http_info api254_remote_volume_snapshots_post_with_http_info = remote_volume_snapshots_post_with_http_info api254_remote_volume_snapshots_transfer_get_with_http_info = remote_volume_snapshots_transfer_get_with_http_info + api255_remote_volume_snapshots_delete_with_http_info = remote_volume_snapshots_delete_with_http_info + api255_remote_volume_snapshots_get_with_http_info = remote_volume_snapshots_get_with_http_info + api255_remote_volume_snapshots_patch_with_http_info = remote_volume_snapshots_patch_with_http_info + api255_remote_volume_snapshots_post_with_http_info = remote_volume_snapshots_post_with_http_info + api255_remote_volume_snapshots_transfer_get_with_http_info = remote_volume_snapshots_transfer_get_with_http_info + api256_remote_volume_snapshots_delete_with_http_info = remote_volume_snapshots_delete_with_http_info + api256_remote_volume_snapshots_get_with_http_info = remote_volume_snapshots_get_with_http_info + api256_remote_volume_snapshots_patch_with_http_info = remote_volume_snapshots_patch_with_http_info + api256_remote_volume_snapshots_post_with_http_info = remote_volume_snapshots_post_with_http_info + api256_remote_volume_snapshots_transfer_get_with_http_info = remote_volume_snapshots_transfer_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/resource_accesses_api_v_2_40.py b/pypureclient/flasharray/_common/apis/resource_accesses_api_v_2_40.py index 301995d9f1..64d9f43657 100644 --- a/pypureclient/flasharray/_common/apis/resource_accesses_api_v_2_40.py +++ b/pypureclient/flasharray/_common/apis/resource_accesses_api_v_2_40.py @@ -679,3 +679,11 @@ def resource_accesses_status_get_with_http_info( api254_resource_accesses_delete_with_http_info = resource_accesses_delete_with_http_info api254_resource_accesses_get_with_http_info = resource_accesses_get_with_http_info api254_resource_accesses_status_get_with_http_info = resource_accesses_status_get_with_http_info + api255_resource_accesses_batch_post_with_http_info = resource_accesses_batch_post_with_http_info + api255_resource_accesses_delete_with_http_info = resource_accesses_delete_with_http_info + api255_resource_accesses_get_with_http_info = resource_accesses_get_with_http_info + api255_resource_accesses_status_get_with_http_info = resource_accesses_status_get_with_http_info + api256_resource_accesses_batch_post_with_http_info = resource_accesses_batch_post_with_http_info + api256_resource_accesses_delete_with_http_info = resource_accesses_delete_with_http_info + api256_resource_accesses_get_with_http_info = resource_accesses_get_with_http_info + api256_resource_accesses_status_get_with_http_info = resource_accesses_status_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/saml2_sso_api_v_2_38.py b/pypureclient/flasharray/_common/apis/saml2_sso_api_v_2_38.py index c7e0ce2c0e..1c1a7a3341 100644 --- a/pypureclient/flasharray/_common/apis/saml2_sso_api_v_2_38.py +++ b/pypureclient/flasharray/_common/apis/saml2_sso_api_v_2_38.py @@ -1076,3 +1076,15 @@ def sso_saml2_idps_test_patch_with_http_info( api254_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info api254_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info api254_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info + api255_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info + api255_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info + api255_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info + api255_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info + api255_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info + api255_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info + api256_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info + api256_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info + api256_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info + api256_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info + api256_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info + api256_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info diff --git a/pypureclient/flasharray/_common/apis/servers_api_v_2_55.py b/pypureclient/flasharray/_common/apis/servers_api_v_2_55.py new file mode 100644 index 0000000000..a838b10e29 --- /dev/null +++ b/pypureclient/flasharray/_common/apis/servers_api_v_2_55.py @@ -0,0 +1,1219 @@ + +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flasharray._common.models.policy_assignment_post_v_2_49 import PolicyAssignmentPost +from pypureclient.flasharray._common.models.policy_member_clean_get_response_v_2_50 import PolicyMemberCleanGetResponse +from pypureclient.flasharray._common.models.policy_member_clean_response_v_2_50 import PolicyMemberCleanResponse +from pypureclient.flasharray._common.models.server_get_response_v_2_55 import ServerGetResponse +from pypureclient.flasharray._common.models.server_patch_v_2_49 import ServerPatch +from pypureclient.flasharray._common.models.server_post_v_2_49 import ServerPost +from pypureclient.flasharray._common.models.server_response_v_2_55 import ServerResponse + +class ServersApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def servers_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + cascade_delete: Annotated[Optional[conlist(StrictStr)], Field(description="The resource types to delete when deleting the object. It will fail if the resources are referenced by other objects. Valid values include `directory-services`.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete server + + Deletes a server. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param cascade_delete: The resource types to delete when deleting the object. It will fail if the resources are referenced by other objects. Valid values include `directory-services`. + :type cascade_delete: List[str] + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'cascade_delete', + 'context_names', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_servers_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('cascade_delete') is not None: # noqa: E501 + _query_params.append(('cascade_delete', _params['cascade_delete'])) + _collection_formats['cascade_delete'] = 'csv' + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/servers', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def servers_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List servers + + Displays a list of servers. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param total_only: If set to `true`, returns the aggregate value of all items after filtering. Where it makes more sense, the average value is displayed instead. The values are displayed for each name where meaningful. If `total_only=true`, the `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ServerGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort', + 'total_item_count', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_servers_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ServerGetResponse", + '207': "ServerGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/servers', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def servers_patch_with_http_info( + self, + server: ServerPatch, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify server + + Modifies server details. + + :param server: (required) + :type server: ServerPatch + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ServerResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'server', + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_servers_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['server'] is not None: + _body_params = _params['server'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ServerResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/servers', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def servers_policies_tls_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete membership between TLS policies and attached object + + The operation that deletes a `membership` between a `server` and a `TLS policy`. For this request, either `policy_ids` or `policy_names` must be provided, and either `member_ids` or `member_names` must be provided; however, the ID and name parameters for each respective category cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_servers_policies_tls_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/servers/policies/tls', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def servers_policies_tls_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List TLS policies attached to servers + + The operation that displays a list of `TLS policies` that are attached to `servers`. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param policy_ids: Performs the operation on the unique policy IDs specified. Enter multiple policy IDs in comma-separated format. The `policy_ids` or `policy_names` parameter is required, but they cannot be set together. + :type policy_ids: List[str] + :param policy_names: Performs the operation on the policy names specified. Enter multiple policy names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `policy01,pod01::policy01`. + :type policy_names: List[str] + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberCleanGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_servers_policies_tls_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberCleanGetResponse", + '207': "PolicyMemberCleanGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/servers/policies/tls', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def servers_policies_tls_post_with_http_info( + self, + policies: PolicyAssignmentPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a membership between a server and a TLS policy + + The operation that creates a `membership` between a `server` and a `TLS policy`. For this request, either the `member_ids` or `member_names` parameter is required, but they cannot be set together. + + :param policies: (required) + :type policies: PolicyAssignmentPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberCleanResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'policies', + 'authorization', + 'x_request_id', + 'context_names', + 'member_ids', + 'member_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_servers_policies_tls_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['policies'] is not None: + _body_params = _params['policies'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberCleanResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/servers/policies/tls', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def servers_post_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + create_local_directory_service: Annotated[Optional[StrictStr], Field(description="The name of the local directory service object to be created and associated to the server. This parameter cannot be used together with `local_directory_service` property in the request entity.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`.")] = None, + server: Optional[ServerPost] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create server + + Creates a server on the local array. The server must be given a unique name. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param create_local_directory_service: The name of the local directory service object to be created and associated to the server. This parameter cannot be used together with `local_directory_service` property in the request entity. + :type create_local_directory_service: str + :param names: Performs the operation on the unique name specified. Enter multiple names in comma-separated format. The name is expected to be fully qualified, meaning if the object is contained in some context, the corresponding name would provide complete information about the containment hierarchy. For example, `name01,pod01::name01`. + :type names: List[str] + :param server: + :type server: ServerPost + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ServerResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'create_local_directory_service', + 'names', + 'server' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_servers_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('create_local_directory_service') is not None: # noqa: E501 + _query_params.append(('create_local_directory_service', _params['create_local_directory_service'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['server'] is not None: + _body_params = _params['server'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ServerResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/servers', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api255_servers_delete_with_http_info = servers_delete_with_http_info + api255_servers_get_with_http_info = servers_get_with_http_info + api255_servers_patch_with_http_info = servers_patch_with_http_info + api255_servers_policies_tls_delete_with_http_info = servers_policies_tls_delete_with_http_info + api255_servers_policies_tls_get_with_http_info = servers_policies_tls_get_with_http_info + api255_servers_policies_tls_post_with_http_info = servers_policies_tls_post_with_http_info + api255_servers_post_with_http_info = servers_post_with_http_info + api256_servers_delete_with_http_info = servers_delete_with_http_info + api256_servers_get_with_http_info = servers_get_with_http_info + api256_servers_patch_with_http_info = servers_patch_with_http_info + api256_servers_policies_tls_delete_with_http_info = servers_policies_tls_delete_with_http_info + api256_servers_policies_tls_get_with_http_info = servers_policies_tls_get_with_http_info + api256_servers_policies_tls_post_with_http_info = servers_policies_tls_post_with_http_info + api256_servers_post_with_http_info = servers_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/sessions_api_v_2_36.py b/pypureclient/flasharray/_common/apis/sessions_api_v_2_36.py index e08c6ad98c..9623be01e7 100644 --- a/pypureclient/flasharray/_common/apis/sessions_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/sessions_api_v_2_36.py @@ -239,3 +239,5 @@ def sessions_get_with_http_info( api252_sessions_get_with_http_info = sessions_get_with_http_info api253_sessions_get_with_http_info = sessions_get_with_http_info api254_sessions_get_with_http_info = sessions_get_with_http_info + api255_sessions_get_with_http_info = sessions_get_with_http_info + api256_sessions_get_with_http_info = sessions_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/smis_api_v_2_36.py b/pypureclient/flasharray/_common/apis/smis_api_v_2_36.py index 73b0a61436..33b4ac37e9 100644 --- a/pypureclient/flasharray/_common/apis/smis_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/smis_api_v_2_36.py @@ -366,3 +366,7 @@ def smi_s_patch_with_http_info( api253_smi_s_patch_with_http_info = smi_s_patch_with_http_info api254_smi_s_get_with_http_info = smi_s_get_with_http_info api254_smi_s_patch_with_http_info = smi_s_patch_with_http_info + api255_smi_s_get_with_http_info = smi_s_get_with_http_info + api255_smi_s_patch_with_http_info = smi_s_patch_with_http_info + api256_smi_s_get_with_http_info = smi_s_get_with_http_info + api256_smi_s_patch_with_http_info = smi_s_patch_with_http_info diff --git a/pypureclient/flasharray/_common/apis/smtp_api_v_2_36.py b/pypureclient/flasharray/_common/apis/smtp_api_v_2_36.py index 0c7ef7b6ae..7ce0f5f18c 100644 --- a/pypureclient/flasharray/_common/apis/smtp_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/smtp_api_v_2_36.py @@ -366,3 +366,7 @@ def smtp_servers_patch_with_http_info( api253_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info api254_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info api254_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info + api255_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info + api255_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info + api256_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info + api256_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info diff --git a/pypureclient/flasharray/_common/apis/snmp_agents_api_v_2_36.py b/pypureclient/flasharray/_common/apis/snmp_agents_api_v_2_36.py index 4a2edb06de..c828cffc9a 100644 --- a/pypureclient/flasharray/_common/apis/snmp_agents_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/snmp_agents_api_v_2_36.py @@ -537,3 +537,9 @@ def snmp_agents_patch_with_http_info( api254_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info api254_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info api254_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info + api255_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info + api255_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info + api255_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info + api256_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info + api256_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info + api256_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info diff --git a/pypureclient/flasharray/_common/apis/snmp_managers_api_v_2_49.py b/pypureclient/flasharray/_common/apis/snmp_managers_api_v_2_49.py index bb5108ee47..d2bce001ef 100644 --- a/pypureclient/flasharray/_common/apis/snmp_managers_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/snmp_managers_api_v_2_49.py @@ -819,3 +819,13 @@ def snmp_managers_test_get_with_http_info( api254_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info api254_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info api254_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info + api255_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info + api255_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info + api255_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info + api255_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info + api255_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info + api256_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info + api256_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info + api256_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info + api256_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info + api256_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/software_api_v_2_36.py b/pypureclient/flasharray/_common/apis/software_api_v_2_36.py index c6e2e4fa21..3edeb00286 100644 --- a/pypureclient/flasharray/_common/apis/software_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/software_api_v_2_36.py @@ -2757,3 +2757,35 @@ def software_versions_get_with_http_info( api254_software_patches_post_with_http_info = software_patches_post_with_http_info api254_software_post_with_http_info = software_post_with_http_info api254_software_versions_get_with_http_info = software_versions_get_with_http_info + api255_software_bundle_get_with_http_info = software_bundle_get_with_http_info + api255_software_bundle_post_with_http_info = software_bundle_post_with_http_info + api255_software_check_delete_with_http_info = software_check_delete_with_http_info + api255_software_check_get_with_http_info = software_check_get_with_http_info + api255_software_check_post_with_http_info = software_check_post_with_http_info + api255_software_delete_with_http_info = software_delete_with_http_info + api255_software_get_with_http_info = software_get_with_http_info + api255_software_installation_steps_get_with_http_info = software_installation_steps_get_with_http_info + api255_software_installations_get_with_http_info = software_installations_get_with_http_info + api255_software_installations_patch_with_http_info = software_installations_patch_with_http_info + api255_software_installations_post_with_http_info = software_installations_post_with_http_info + api255_software_patches_catalog_get_with_http_info = software_patches_catalog_get_with_http_info + api255_software_patches_get_with_http_info = software_patches_get_with_http_info + api255_software_patches_post_with_http_info = software_patches_post_with_http_info + api255_software_post_with_http_info = software_post_with_http_info + api255_software_versions_get_with_http_info = software_versions_get_with_http_info + api256_software_bundle_get_with_http_info = software_bundle_get_with_http_info + api256_software_bundle_post_with_http_info = software_bundle_post_with_http_info + api256_software_check_delete_with_http_info = software_check_delete_with_http_info + api256_software_check_get_with_http_info = software_check_get_with_http_info + api256_software_check_post_with_http_info = software_check_post_with_http_info + api256_software_delete_with_http_info = software_delete_with_http_info + api256_software_get_with_http_info = software_get_with_http_info + api256_software_installation_steps_get_with_http_info = software_installation_steps_get_with_http_info + api256_software_installations_get_with_http_info = software_installations_get_with_http_info + api256_software_installations_patch_with_http_info = software_installations_patch_with_http_info + api256_software_installations_post_with_http_info = software_installations_post_with_http_info + api256_software_patches_catalog_get_with_http_info = software_patches_catalog_get_with_http_info + api256_software_patches_get_with_http_info = software_patches_get_with_http_info + api256_software_patches_post_with_http_info = software_patches_post_with_http_info + api256_software_post_with_http_info = software_post_with_http_info + api256_software_versions_get_with_http_info = software_versions_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/storage_classes_api_v_2_56.py b/pypureclient/flasharray/_common/apis/storage_classes_api_v_2_56.py new file mode 100644 index 0000000000..5125e3f002 --- /dev/null +++ b/pypureclient/flasharray/_common/apis/storage_classes_api_v_2_56.py @@ -0,0 +1,231 @@ + +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.56 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flasharray._common.models.storage_classes_members_get_response_v_2_56 import StorageClassesMembersGetResponse + +class StorageClassesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def storage_classes_members_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + storage_class_names: Annotated[Optional[conlist(StrictStr)], Field(description="The comma-separated list of `storage class` `names` to select.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List storage class members + + A list of the `storage class members` in the `fleet`. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param member_ids: Performs the operation on the unique member IDs specified. Enter multiple member IDs in comma-separated format. The `member_ids` or `member_names` parameter is required, but they cannot be set together. + :type member_ids: List[str] + :param member_names: Performs the operation on the unique member name specified. Examples of members include volumes, hosts, host groups, and directories. Enter multiple names in comma-separated format. For example, `vol01,vol02`. + :type member_names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param storage_class_names: The comma-separated list of `storage class` `names` to select. + :type storage_class_names: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(StorageClassesMembersGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'continuation_token', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'sort', + 'storage_class_names', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api256_storage_classes_members_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('storage_class_names') is not None: # noqa: E501 + _query_params.append(('storage_class_names', _params['storage_class_names'])) + _collection_formats['storage_class_names'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "StorageClassesMembersGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/storage-classes/members', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api256_storage_classes_members_get_with_http_info = storage_classes_members_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/subnets_api_v_2_55.py b/pypureclient/flasharray/_common/apis/subnets_api_v_2_55.py new file mode 100644 index 0000000000..ce5d89aba8 --- /dev/null +++ b/pypureclient/flasharray/_common/apis/subnets_api_v_2_55.py @@ -0,0 +1,656 @@ + +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flasharray._common.models.subnet_get_response_v_2_55 import SubnetGetResponse +from pypureclient.flasharray._common.models.subnet_patch_v_2_2 import SubnetPatch +from pypureclient.flasharray._common.models.subnet_post_v_2_2 import SubnetPost +from pypureclient.flasharray._common.models.subnet_response_v_2_55 import SubnetResponse + +class SubnetsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def subnets_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete subnet + + Deletes subnets. A subnet can only be deleted if it has no interfaces. Interfaces must be removed by using the `network-interfaces` endpoint. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_subnets_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/subnets', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def subnets_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Narrows down the results to only the response objects that satisfy the filter criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The starting position based on the results of the query in relation to the full set of response objects returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List subnets + + Displays a list of subnets with statuses and attributes. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param filter: Narrows down the results to only the response objects that satisfy the filter criteria. + :type filter: str + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param offset: The starting position based on the results of the query in relation to the full set of response objects returned. + :type offset: int + :param sort: Sorts the response objects by the specified fields. Sorting can be applied to any field name in the response, in ascending order by default, or in descending order by prefixing the field name with a minus sign (-). Multiple fields can be specified as a comma-separated list (e.g., sort volumes by size descending, then by name ascending). If sort is provided, the response will not include a continuation_token. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SubnetGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'filter', + 'limit', + 'names', + 'offset', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_subnets_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "SubnetGetResponse", + '207': "SubnetGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/subnets', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def subnets_patch_with_http_info( + self, + subnet: SubnetPatch, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify subnet + + Modifies one or more specified subnet properties. + + :param subnet: (required) + :type subnet: SubnetPatch + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SubnetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'subnet', + 'authorization', + 'x_request_id', + 'context_names', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_subnets_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['subnet'] is not None: + _body_params = _params['subnet'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "SubnetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/subnets', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def subnets_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format.")], + subnet: SubnetPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create subnet + + Creates a subnet with the specified parameters. + + :param names: Performs the operation on the unique name specified. For example, `name01`. Enter multiple names in comma-separated format. (required) + :type names: List[str] + :param subnet: (required) + :type subnet: SubnetPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SubnetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'subnet', + 'authorization', + 'x_request_id', + 'context_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_subnets_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['subnet'] is not None: + _body_params = _params['subnet'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "SubnetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/subnets', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api255_subnets_delete_with_http_info = subnets_delete_with_http_info + api255_subnets_get_with_http_info = subnets_get_with_http_info + api255_subnets_patch_with_http_info = subnets_patch_with_http_info + api255_subnets_post_with_http_info = subnets_post_with_http_info + api256_subnets_delete_with_http_info = subnets_delete_with_http_info + api256_subnets_get_with_http_info = subnets_get_with_http_info + api256_subnets_patch_with_http_info = subnets_patch_with_http_info + api256_subnets_post_with_http_info = subnets_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/subscription_assets_api_v_2_36.py b/pypureclient/flasharray/_common/apis/subscription_assets_api_v_2_36.py index dc88535a47..b3d0747a80 100644 --- a/pypureclient/flasharray/_common/apis/subscription_assets_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/subscription_assets_api_v_2_36.py @@ -239,3 +239,5 @@ def subscription_assets_get_with_http_info( api252_subscription_assets_get_with_http_info = subscription_assets_get_with_http_info api253_subscription_assets_get_with_http_info = subscription_assets_get_with_http_info api254_subscription_assets_get_with_http_info = subscription_assets_get_with_http_info + api255_subscription_assets_get_with_http_info = subscription_assets_get_with_http_info + api256_subscription_assets_get_with_http_info = subscription_assets_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/subscriptions_api_v_2_36.py b/pypureclient/flasharray/_common/apis/subscriptions_api_v_2_36.py index 137d9e46af..9fbe1b61e8 100644 --- a/pypureclient/flasharray/_common/apis/subscriptions_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/subscriptions_api_v_2_36.py @@ -231,3 +231,5 @@ def subscriptions_get_with_http_info( api252_subscriptions_get_with_http_info = subscriptions_get_with_http_info api253_subscriptions_get_with_http_info = subscriptions_get_with_http_info api254_subscriptions_get_with_http_info = subscriptions_get_with_http_info + api255_subscriptions_get_with_http_info = subscriptions_get_with_http_info + api256_subscriptions_get_with_http_info = subscriptions_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/support_api_v_2_51.py b/pypureclient/flasharray/_common/apis/support_api_v_2_51.py index 5035bfc7ea..52e1c8dbbf 100644 --- a/pypureclient/flasharray/_common/apis/support_api_v_2_51.py +++ b/pypureclient/flasharray/_common/apis/support_api_v_2_51.py @@ -1718,3 +1718,25 @@ def support_test_get_with_http_info( api254_support_remote_assist_sessions_settings_patch_with_http_info = support_remote_assist_sessions_settings_patch_with_http_info api254_support_system_manifest_get_with_http_info = support_system_manifest_get_with_http_info api254_support_test_get_with_http_info = support_test_get_with_http_info + api255_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info + api255_support_diagnostics_settings_get_with_http_info = support_diagnostics_settings_get_with_http_info + api255_support_diagnostics_settings_patch_with_http_info = support_diagnostics_settings_patch_with_http_info + api255_support_get_with_http_info = support_get_with_http_info + api255_support_patch_with_http_info = support_patch_with_http_info + api255_support_remote_assist_sessions_get_with_http_info = support_remote_assist_sessions_get_with_http_info + api255_support_remote_assist_sessions_patch_with_http_info = support_remote_assist_sessions_patch_with_http_info + api255_support_remote_assist_sessions_settings_get_with_http_info = support_remote_assist_sessions_settings_get_with_http_info + api255_support_remote_assist_sessions_settings_patch_with_http_info = support_remote_assist_sessions_settings_patch_with_http_info + api255_support_system_manifest_get_with_http_info = support_system_manifest_get_with_http_info + api255_support_test_get_with_http_info = support_test_get_with_http_info + api256_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info + api256_support_diagnostics_settings_get_with_http_info = support_diagnostics_settings_get_with_http_info + api256_support_diagnostics_settings_patch_with_http_info = support_diagnostics_settings_patch_with_http_info + api256_support_get_with_http_info = support_get_with_http_info + api256_support_patch_with_http_info = support_patch_with_http_info + api256_support_remote_assist_sessions_get_with_http_info = support_remote_assist_sessions_get_with_http_info + api256_support_remote_assist_sessions_patch_with_http_info = support_remote_assist_sessions_patch_with_http_info + api256_support_remote_assist_sessions_settings_get_with_http_info = support_remote_assist_sessions_settings_get_with_http_info + api256_support_remote_assist_sessions_settings_patch_with_http_info = support_remote_assist_sessions_settings_patch_with_http_info + api256_support_system_manifest_get_with_http_info = support_system_manifest_get_with_http_info + api256_support_test_get_with_http_info = support_test_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/syslog_api_v_2_49.py b/pypureclient/flasharray/_common/apis/syslog_api_v_2_49.py index 27b28d39c6..223f664ae4 100644 --- a/pypureclient/flasharray/_common/apis/syslog_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/syslog_api_v_2_49.py @@ -1176,3 +1176,17 @@ def syslog_servers_test_get_with_http_info( api254_syslog_servers_settings_get_with_http_info = syslog_servers_settings_get_with_http_info api254_syslog_servers_settings_patch_with_http_info = syslog_servers_settings_patch_with_http_info api254_syslog_servers_test_get_with_http_info = syslog_servers_test_get_with_http_info + api255_syslog_servers_delete_with_http_info = syslog_servers_delete_with_http_info + api255_syslog_servers_get_with_http_info = syslog_servers_get_with_http_info + api255_syslog_servers_patch_with_http_info = syslog_servers_patch_with_http_info + api255_syslog_servers_post_with_http_info = syslog_servers_post_with_http_info + api255_syslog_servers_settings_get_with_http_info = syslog_servers_settings_get_with_http_info + api255_syslog_servers_settings_patch_with_http_info = syslog_servers_settings_patch_with_http_info + api255_syslog_servers_test_get_with_http_info = syslog_servers_test_get_with_http_info + api256_syslog_servers_delete_with_http_info = syslog_servers_delete_with_http_info + api256_syslog_servers_get_with_http_info = syslog_servers_get_with_http_info + api256_syslog_servers_patch_with_http_info = syslog_servers_patch_with_http_info + api256_syslog_servers_post_with_http_info = syslog_servers_post_with_http_info + api256_syslog_servers_settings_get_with_http_info = syslog_servers_settings_get_with_http_info + api256_syslog_servers_settings_patch_with_http_info = syslog_servers_settings_patch_with_http_info + api256_syslog_servers_test_get_with_http_info = syslog_servers_test_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/topology_groups_api_v_2_54.py b/pypureclient/flasharray/_common/apis/topology_groups_api_v_2_54.py index dd388d5232..13ee5ec51c 100644 --- a/pypureclient/flasharray/_common/apis/topology_groups_api_v_2_54.py +++ b/pypureclient/flasharray/_common/apis/topology_groups_api_v_2_54.py @@ -1402,3 +1402,19 @@ def topology_groups_post_with_http_info( api254_topology_groups_members_post_with_http_info = topology_groups_members_post_with_http_info api254_topology_groups_patch_with_http_info = topology_groups_patch_with_http_info api254_topology_groups_post_with_http_info = topology_groups_post_with_http_info + api255_topology_groups_arrays_get_with_http_info = topology_groups_arrays_get_with_http_info + api255_topology_groups_delete_with_http_info = topology_groups_delete_with_http_info + api255_topology_groups_get_with_http_info = topology_groups_get_with_http_info + api255_topology_groups_members_delete_with_http_info = topology_groups_members_delete_with_http_info + api255_topology_groups_members_get_with_http_info = topology_groups_members_get_with_http_info + api255_topology_groups_members_post_with_http_info = topology_groups_members_post_with_http_info + api255_topology_groups_patch_with_http_info = topology_groups_patch_with_http_info + api255_topology_groups_post_with_http_info = topology_groups_post_with_http_info + api256_topology_groups_arrays_get_with_http_info = topology_groups_arrays_get_with_http_info + api256_topology_groups_delete_with_http_info = topology_groups_delete_with_http_info + api256_topology_groups_get_with_http_info = topology_groups_get_with_http_info + api256_topology_groups_members_delete_with_http_info = topology_groups_members_delete_with_http_info + api256_topology_groups_members_get_with_http_info = topology_groups_members_get_with_http_info + api256_topology_groups_members_post_with_http_info = topology_groups_members_post_with_http_info + api256_topology_groups_patch_with_http_info = topology_groups_patch_with_http_info + api256_topology_groups_post_with_http_info = topology_groups_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/user_group_quotas_api_v_2_49.py b/pypureclient/flasharray/_common/apis/user_group_quotas_api_v_2_49.py index 72f1038994..5d8f13cfe9 100644 --- a/pypureclient/flasharray/_common/apis/user_group_quotas_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/user_group_quotas_api_v_2_49.py @@ -519,3 +519,7 @@ def directory_user_quotas_get_with_http_info( api253_directory_user_quotas_get_with_http_info = directory_user_quotas_get_with_http_info api254_directory_group_quotas_get_with_http_info = directory_group_quotas_get_with_http_info api254_directory_user_quotas_get_with_http_info = directory_user_quotas_get_with_http_info + api255_directory_group_quotas_get_with_http_info = directory_group_quotas_get_with_http_info + api255_directory_user_quotas_get_with_http_info = directory_user_quotas_get_with_http_info + api256_directory_group_quotas_get_with_http_info = directory_group_quotas_get_with_http_info + api256_directory_user_quotas_get_with_http_info = directory_user_quotas_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/vchost_connections_api_v_2_36.py b/pypureclient/flasharray/_common/apis/vchost_connections_api_v_2_36.py index e904cc75f0..ab538d4dac 100644 --- a/pypureclient/flasharray/_common/apis/vchost_connections_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/vchost_connections_api_v_2_36.py @@ -610,3 +610,9 @@ def vchost_connections_post_with_http_info( api254_vchost_connections_delete_with_http_info = vchost_connections_delete_with_http_info api254_vchost_connections_get_with_http_info = vchost_connections_get_with_http_info api254_vchost_connections_post_with_http_info = vchost_connections_post_with_http_info + api255_vchost_connections_delete_with_http_info = vchost_connections_delete_with_http_info + api255_vchost_connections_get_with_http_info = vchost_connections_get_with_http_info + api255_vchost_connections_post_with_http_info = vchost_connections_post_with_http_info + api256_vchost_connections_delete_with_http_info = vchost_connections_delete_with_http_info + api256_vchost_connections_get_with_http_info = vchost_connections_get_with_http_info + api256_vchost_connections_post_with_http_info = vchost_connections_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/vchosts_api_v_2_36.py b/pypureclient/flasharray/_common/apis/vchosts_api_v_2_36.py index ddd35973eb..19e468a977 100644 --- a/pypureclient/flasharray/_common/apis/vchosts_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/vchosts_api_v_2_36.py @@ -2140,3 +2140,27 @@ def vchosts_post_with_http_info( api254_vchosts_get_with_http_info = vchosts_get_with_http_info api254_vchosts_patch_with_http_info = vchosts_patch_with_http_info api254_vchosts_post_with_http_info = vchosts_post_with_http_info + api255_vchosts_certificates_delete_with_http_info = vchosts_certificates_delete_with_http_info + api255_vchosts_certificates_get_with_http_info = vchosts_certificates_get_with_http_info + api255_vchosts_certificates_patch_with_http_info = vchosts_certificates_patch_with_http_info + api255_vchosts_certificates_post_with_http_info = vchosts_certificates_post_with_http_info + api255_vchosts_delete_with_http_info = vchosts_delete_with_http_info + api255_vchosts_endpoints_delete_with_http_info = vchosts_endpoints_delete_with_http_info + api255_vchosts_endpoints_get_with_http_info = vchosts_endpoints_get_with_http_info + api255_vchosts_endpoints_patch_with_http_info = vchosts_endpoints_patch_with_http_info + api255_vchosts_endpoints_post_with_http_info = vchosts_endpoints_post_with_http_info + api255_vchosts_get_with_http_info = vchosts_get_with_http_info + api255_vchosts_patch_with_http_info = vchosts_patch_with_http_info + api255_vchosts_post_with_http_info = vchosts_post_with_http_info + api256_vchosts_certificates_delete_with_http_info = vchosts_certificates_delete_with_http_info + api256_vchosts_certificates_get_with_http_info = vchosts_certificates_get_with_http_info + api256_vchosts_certificates_patch_with_http_info = vchosts_certificates_patch_with_http_info + api256_vchosts_certificates_post_with_http_info = vchosts_certificates_post_with_http_info + api256_vchosts_delete_with_http_info = vchosts_delete_with_http_info + api256_vchosts_endpoints_delete_with_http_info = vchosts_endpoints_delete_with_http_info + api256_vchosts_endpoints_get_with_http_info = vchosts_endpoints_get_with_http_info + api256_vchosts_endpoints_patch_with_http_info = vchosts_endpoints_patch_with_http_info + api256_vchosts_endpoints_post_with_http_info = vchosts_endpoints_post_with_http_info + api256_vchosts_get_with_http_info = vchosts_get_with_http_info + api256_vchosts_patch_with_http_info = vchosts_patch_with_http_info + api256_vchosts_post_with_http_info = vchosts_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/virtual_machines_api_v_2_36.py b/pypureclient/flasharray/_common/apis/virtual_machines_api_v_2_36.py index c09f968485..2fd32fcd7d 100644 --- a/pypureclient/flasharray/_common/apis/virtual_machines_api_v_2_36.py +++ b/pypureclient/flasharray/_common/apis/virtual_machines_api_v_2_36.py @@ -949,3 +949,13 @@ def virtual_machines_post_with_http_info( api254_virtual_machines_get_with_http_info = virtual_machines_get_with_http_info api254_virtual_machines_patch_with_http_info = virtual_machines_patch_with_http_info api254_virtual_machines_post_with_http_info = virtual_machines_post_with_http_info + api255_virtual_machine_snapshots_get_with_http_info = virtual_machine_snapshots_get_with_http_info + api255_virtual_machine_volume_snapshots_get_with_http_info = virtual_machine_volume_snapshots_get_with_http_info + api255_virtual_machines_get_with_http_info = virtual_machines_get_with_http_info + api255_virtual_machines_patch_with_http_info = virtual_machines_patch_with_http_info + api255_virtual_machines_post_with_http_info = virtual_machines_post_with_http_info + api256_virtual_machine_snapshots_get_with_http_info = virtual_machine_snapshots_get_with_http_info + api256_virtual_machine_volume_snapshots_get_with_http_info = virtual_machine_volume_snapshots_get_with_http_info + api256_virtual_machines_get_with_http_info = virtual_machines_get_with_http_info + api256_virtual_machines_patch_with_http_info = virtual_machines_patch_with_http_info + api256_virtual_machines_post_with_http_info = virtual_machines_post_with_http_info diff --git a/pypureclient/flasharray/_common/apis/volume_groups_api_v_2_49.py b/pypureclient/flasharray/_common/apis/volume_groups_api_v_2_49.py index 8caa8657b1..251a2e9936 100644 --- a/pypureclient/flasharray/_common/apis/volume_groups_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/volume_groups_api_v_2_49.py @@ -2152,3 +2152,25 @@ def volume_groups_volumes_get_with_http_info( api254_volume_groups_tags_delete_with_http_info = volume_groups_tags_delete_with_http_info api254_volume_groups_tags_get_with_http_info = volume_groups_tags_get_with_http_info api254_volume_groups_volumes_get_with_http_info = volume_groups_volumes_get_with_http_info + api255_volume_groups_delete_with_http_info = volume_groups_delete_with_http_info + api255_volume_groups_get_with_http_info = volume_groups_get_with_http_info + api255_volume_groups_patch_with_http_info = volume_groups_patch_with_http_info + api255_volume_groups_performance_get_with_http_info = volume_groups_performance_get_with_http_info + api255_volume_groups_post_with_http_info = volume_groups_post_with_http_info + api255_volume_groups_qos_get_with_http_info = volume_groups_qos_get_with_http_info + api255_volume_groups_space_get_with_http_info = volume_groups_space_get_with_http_info + api255_volume_groups_tags_batch_put_with_http_info = volume_groups_tags_batch_put_with_http_info + api255_volume_groups_tags_delete_with_http_info = volume_groups_tags_delete_with_http_info + api255_volume_groups_tags_get_with_http_info = volume_groups_tags_get_with_http_info + api255_volume_groups_volumes_get_with_http_info = volume_groups_volumes_get_with_http_info + api256_volume_groups_delete_with_http_info = volume_groups_delete_with_http_info + api256_volume_groups_get_with_http_info = volume_groups_get_with_http_info + api256_volume_groups_patch_with_http_info = volume_groups_patch_with_http_info + api256_volume_groups_performance_get_with_http_info = volume_groups_performance_get_with_http_info + api256_volume_groups_post_with_http_info = volume_groups_post_with_http_info + api256_volume_groups_qos_get_with_http_info = volume_groups_qos_get_with_http_info + api256_volume_groups_space_get_with_http_info = volume_groups_space_get_with_http_info + api256_volume_groups_tags_batch_put_with_http_info = volume_groups_tags_batch_put_with_http_info + api256_volume_groups_tags_delete_with_http_info = volume_groups_tags_delete_with_http_info + api256_volume_groups_tags_get_with_http_info = volume_groups_tags_get_with_http_info + api256_volume_groups_volumes_get_with_http_info = volume_groups_volumes_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/volume_snapshots_api_v_2_50.py b/pypureclient/flasharray/_common/apis/volume_snapshots_api_v_2_50.py index 5cde9ac61b..1f63ca5800 100644 --- a/pypureclient/flasharray/_common/apis/volume_snapshots_api_v_2_50.py +++ b/pypureclient/flasharray/_common/apis/volume_snapshots_api_v_2_50.py @@ -1838,3 +1838,23 @@ def volume_snapshots_transfer_get_with_http_info( api254_volume_snapshots_tags_get_with_http_info = volume_snapshots_tags_get_with_http_info api254_volume_snapshots_test_post_with_http_info = volume_snapshots_test_post_with_http_info api254_volume_snapshots_transfer_get_with_http_info = volume_snapshots_transfer_get_with_http_info + api255_volume_snapshots_batch_post_with_http_info = volume_snapshots_batch_post_with_http_info + api255_volume_snapshots_delete_with_http_info = volume_snapshots_delete_with_http_info + api255_volume_snapshots_get_with_http_info = volume_snapshots_get_with_http_info + api255_volume_snapshots_patch_with_http_info = volume_snapshots_patch_with_http_info + api255_volume_snapshots_post_with_http_info = volume_snapshots_post_with_http_info + api255_volume_snapshots_tags_batch_put_with_http_info = volume_snapshots_tags_batch_put_with_http_info + api255_volume_snapshots_tags_delete_with_http_info = volume_snapshots_tags_delete_with_http_info + api255_volume_snapshots_tags_get_with_http_info = volume_snapshots_tags_get_with_http_info + api255_volume_snapshots_test_post_with_http_info = volume_snapshots_test_post_with_http_info + api255_volume_snapshots_transfer_get_with_http_info = volume_snapshots_transfer_get_with_http_info + api256_volume_snapshots_batch_post_with_http_info = volume_snapshots_batch_post_with_http_info + api256_volume_snapshots_delete_with_http_info = volume_snapshots_delete_with_http_info + api256_volume_snapshots_get_with_http_info = volume_snapshots_get_with_http_info + api256_volume_snapshots_patch_with_http_info = volume_snapshots_patch_with_http_info + api256_volume_snapshots_post_with_http_info = volume_snapshots_post_with_http_info + api256_volume_snapshots_tags_batch_put_with_http_info = volume_snapshots_tags_batch_put_with_http_info + api256_volume_snapshots_tags_delete_with_http_info = volume_snapshots_tags_delete_with_http_info + api256_volume_snapshots_tags_get_with_http_info = volume_snapshots_tags_get_with_http_info + api256_volume_snapshots_test_post_with_http_info = volume_snapshots_test_post_with_http_info + api256_volume_snapshots_transfer_get_with_http_info = volume_snapshots_transfer_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/volumes_api_v_2_49.py b/pypureclient/flasharray/_common/apis/volumes_api_v_2_49.py index 3e5e2f14e1..2c439066b0 100644 --- a/pypureclient/flasharray/_common/apis/volumes_api_v_2_49.py +++ b/pypureclient/flasharray/_common/apis/volumes_api_v_2_49.py @@ -3741,3 +3741,41 @@ def volumes_volume_groups_get_with_http_info( api254_volumes_tags_get_with_http_info = volumes_tags_get_with_http_info api254_volumes_test_post_with_http_info = volumes_test_post_with_http_info api254_volumes_volume_groups_get_with_http_info = volumes_volume_groups_get_with_http_info + api255_volumes_batch_post_with_http_info = volumes_batch_post_with_http_info + api255_volumes_batch_test_post_with_http_info = volumes_batch_test_post_with_http_info + api255_volumes_delete_with_http_info = volumes_delete_with_http_info + api255_volumes_diff_get_with_http_info = volumes_diff_get_with_http_info + api255_volumes_get_with_http_info = volumes_get_with_http_info + api255_volumes_patch_with_http_info = volumes_patch_with_http_info + api255_volumes_performance_by_array_get_with_http_info = volumes_performance_by_array_get_with_http_info + api255_volumes_performance_get_with_http_info = volumes_performance_get_with_http_info + api255_volumes_post_with_http_info = volumes_post_with_http_info + api255_volumes_protection_groups_delete_with_http_info = volumes_protection_groups_delete_with_http_info + api255_volumes_protection_groups_get_with_http_info = volumes_protection_groups_get_with_http_info + api255_volumes_protection_groups_post_with_http_info = volumes_protection_groups_post_with_http_info + api255_volumes_qos_get_with_http_info = volumes_qos_get_with_http_info + api255_volumes_space_get_with_http_info = volumes_space_get_with_http_info + api255_volumes_tags_batch_put_with_http_info = volumes_tags_batch_put_with_http_info + api255_volumes_tags_delete_with_http_info = volumes_tags_delete_with_http_info + api255_volumes_tags_get_with_http_info = volumes_tags_get_with_http_info + api255_volumes_test_post_with_http_info = volumes_test_post_with_http_info + api255_volumes_volume_groups_get_with_http_info = volumes_volume_groups_get_with_http_info + api256_volumes_batch_post_with_http_info = volumes_batch_post_with_http_info + api256_volumes_batch_test_post_with_http_info = volumes_batch_test_post_with_http_info + api256_volumes_delete_with_http_info = volumes_delete_with_http_info + api256_volumes_diff_get_with_http_info = volumes_diff_get_with_http_info + api256_volumes_get_with_http_info = volumes_get_with_http_info + api256_volumes_patch_with_http_info = volumes_patch_with_http_info + api256_volumes_performance_by_array_get_with_http_info = volumes_performance_by_array_get_with_http_info + api256_volumes_performance_get_with_http_info = volumes_performance_get_with_http_info + api256_volumes_post_with_http_info = volumes_post_with_http_info + api256_volumes_protection_groups_delete_with_http_info = volumes_protection_groups_delete_with_http_info + api256_volumes_protection_groups_get_with_http_info = volumes_protection_groups_get_with_http_info + api256_volumes_protection_groups_post_with_http_info = volumes_protection_groups_post_with_http_info + api256_volumes_qos_get_with_http_info = volumes_qos_get_with_http_info + api256_volumes_space_get_with_http_info = volumes_space_get_with_http_info + api256_volumes_tags_batch_put_with_http_info = volumes_tags_batch_put_with_http_info + api256_volumes_tags_delete_with_http_info = volumes_tags_delete_with_http_info + api256_volumes_tags_get_with_http_info = volumes_tags_get_with_http_info + api256_volumes_test_post_with_http_info = volumes_test_post_with_http_info + api256_volumes_volume_groups_get_with_http_info = volumes_volume_groups_get_with_http_info diff --git a/pypureclient/flasharray/_common/apis/workloads_api_v_2_55.py b/pypureclient/flasharray/_common/apis/workloads_api_v_2_55.py new file mode 100644 index 0000000000..bed5df1bdd --- /dev/null +++ b/pypureclient/flasharray/_common/apis/workloads_api_v_2_55.py @@ -0,0 +1,1469 @@ + +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictStr, conint, conlist +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictStr, conint, conlist + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flasharray._common.models.tag_batch_v_2_49 import TagBatch +from pypureclient.flasharray._common.models.tag_get_response_v_2_50 import TagGetResponse +from pypureclient.flasharray._common.models.tag_response_v_2_50 import TagResponse +from pypureclient.flasharray._common.models.workload_get_response_v_2_50 import WorkloadGetResponse +from pypureclient.flasharray._common.models.workload_patch_v_2_40 import WorkloadPatch +from pypureclient.flasharray._common.models.workload_placement_recommendation_get_response_v_2_55 import WorkloadPlacementRecommendationGetResponse +from pypureclient.flasharray._common.models.workload_placement_recommendation_response_v_2_54 import WorkloadPlacementRecommendationResponse +from pypureclient.flasharray._common.models.workload_placement_recommendation_v_2_54 import WorkloadPlacementRecommendation +from pypureclient.flasharray._common.models.workload_post_v_2_40 import WorkloadPost +from pypureclient.flasharray._common.models.workload_response_v_2_50 import WorkloadResponse + +class WorkloadsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def workloads_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete a workload + + Deletes a workload that has been destroyed and is pending eradication. Eradicated workloads cannot be recovered. Workloads are destroyed using the `PATCH` method. The `ids` or `names` parameter is required, but they cannot be set together. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Only one value is supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is supported. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_workloads_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/workloads', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def workloads_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + destroyed: Annotated[Optional[StrictBool], Field(description="If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List workloads + + Displays a list of workloads. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param destroyed: If set to `true`, lists only destroyed objects that are in the eradication pending state. If set to `false`, lists only objects that are not destroyed. If not set, lists both objects that are destroyed and those that are not destroyed. For destroyed objects, the time remaining is displayed in milliseconds. If object name(s) or id(s) are specified, then each object referenced must exist. If `destroyed` is set to `true`, then each object referenced must also be destroyed. If `destroyed` is set to `false`, then each object referenced must also not be destroyed. An error is returned if any of these conditions are not met. + :type destroyed: bool + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(WorkloadGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'destroyed', + 'ids', + 'limit', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_workloads_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('destroyed') is not None: # noqa: E501 + _query_params.append(('destroyed', _params['destroyed'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "WorkloadGetResponse", + '207': "WorkloadGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/workloads', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def workloads_patch_with_http_info( + self, + workload: WorkloadPatch, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource IDs specified. Only one value is supported.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource names specified. Only one value is supported.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify a workload + + Modifies a workload by renaming or destroying it. To rename a workload, set `name` to the new name. To destroy a workload, set `destroyed=true`. To recover a workload that has been destroyed and is pending eradication, set `destroyed=false`. The `ids` or `names` parameter is required, but they cannot be set together. + + :param workload: (required) + :type workload: WorkloadPatch + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param ids: Performs the operation on the unique resource IDs specified. Only one value is supported. + :type ids: List[str] + :param names: Performs the operation on the unique resource names specified. Only one value is supported. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(WorkloadResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'workload', + 'authorization', + 'x_request_id', + 'context_names', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_workloads_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['workload'] is not None: + _body_params = _params['workload'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "WorkloadResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/workloads', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def workloads_placement_recommendations_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List workload placement recommendations + + Displays a list of placement recommendations for workloads. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param continuation_token: A token used to retrieve the next page of data with some consistency guaranteed. The token is a Base64 encoded value. Set `continuation_token` to the system-generated token taken from the `x-next-token` header field of the response. A query has reached its last page when the response does not include a token. Pagination requires the `limit` and `continuation_token` query parameters. + :type continuation_token: str + :param ids: A comma-separated list of unique resource IDs. At least one resource must match each specified ID, otherwise an error is returned. This parameter is required if ids or names is not provided, but it cannot be used together with name or names. + :type ids: List[str] + :param limit: Limits the size of the response to the specified number of objects on each page. To return the total number of resources, set `limit=0`. The total number of resources is returned as a `total_item_count` value. If the page size requested is larger than the system maximum limit, the server returns the maximum limit, disregarding the requested page size. + :type limit: int + :param names: Performs the operation on the unique names specified. Enter multiple names in comma-separated format. For example, `name01,name02`. If there is not at least one resource that matches each of the elements of `names`, then an error is returned, except when creating new resources. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(WorkloadPlacementRecommendationGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'continuation_token', + 'ids', + 'limit', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_workloads_placement_recommendations_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "WorkloadPlacementRecommendationGetResponse", + '207': "WorkloadPlacementRecommendationGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/workloads/placement-recommendations', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def workloads_placement_recommendations_post_with_http_info( + self, + inputs: WorkloadPlacementRecommendation, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + placement_names: Annotated[Optional[conlist(StrictStr)], Field(description="Placements from the preset which should be used to compute recommendation. Optional parameter if preset has just one placement.")] = None, + preset_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Creates the workload placement recommendations using the presets specified by ids. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together.")] = None, + preset_names: Annotated[Optional[conlist(StrictStr)], Field(description="Creates the workload placement recommendations using the presets specified by names. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a request for a workload placement recommendation. + + Creates a recommendation for the placement of the specified workload. The computation might take a few minutes. + + :param inputs: (required) + :type inputs: WorkloadPlacementRecommendation + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param placement_names: Placements from the preset which should be used to compute recommendation. Optional parameter if preset has just one placement. + :type placement_names: List[str] + :param preset_ids: Creates the workload placement recommendations using the presets specified by ids. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together. + :type preset_ids: List[str] + :param preset_names: Creates the workload placement recommendations using the presets specified by names. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together. + :type preset_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(WorkloadPlacementRecommendationResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'inputs', + 'authorization', + 'x_request_id', + 'context_names', + 'placement_names', + 'preset_ids', + 'preset_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_workloads_placement_recommendations_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('placement_names') is not None: # noqa: E501 + _query_params.append(('placement_names', _params['placement_names'])) + _collection_formats['placement_names'] = 'csv' + + if _params.get('preset_ids') is not None: # noqa: E501 + _query_params.append(('preset_ids', _params['preset_ids'])) + _collection_formats['preset_ids'] = 'csv' + + if _params.get('preset_names') is not None: # noqa: E501 + _query_params.append(('preset_names', _params['preset_names'])) + _collection_formats['preset_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['inputs'] is not None: + _body_params = _params['inputs'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "WorkloadPlacementRecommendationResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/workloads/placement-recommendations', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def workloads_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="Performs the operation on the unique resource names specified. Only one value is supported.")], + workload: WorkloadPost, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + preset_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Create the resource using the preset specified by the ID. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together.")] = None, + preset_names: Annotated[Optional[conlist(StrictStr)], Field(description="Create the resource using the preset specified by name. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a workload + + Creates one workload. + + :param names: Performs the operation on the unique resource names specified. Only one value is supported. (required) + :type names: List[str] + :param workload: (required) + :type workload: WorkloadPost + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param preset_ids: Create the resource using the preset specified by the ID. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together. + :type preset_ids: List[str] + :param preset_names: Create the resource using the preset specified by name. Only one preset can be specified. One of the `preset_ids` or `preset_names` parameters are required, but they cannot be set together. + :type preset_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(WorkloadResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'workload', + 'authorization', + 'x_request_id', + 'context_names', + 'preset_ids', + 'preset_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_workloads_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('preset_ids') is not None: # noqa: E501 + _query_params.append(('preset_ids', _params['preset_ids'])) + _collection_formats['preset_ids'] = 'csv' + + if _params.get('preset_names') is not None: # noqa: E501 + _query_params.append(('preset_names', _params['preset_names'])) + _collection_formats['preset_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['workload'] is not None: + _body_params = _params['workload'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "WorkloadResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/workloads', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def workloads_tags_batch_put_with_http_info( + self, + tag: Annotated[conlist(TagBatch, max_items=30, min_items=1, unique_items=True), Field(..., description="A list of tags to be created or, if they already exist, updated.")], + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource ID specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource name specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Update tags + + Updates or creates tags for all specified objects. + + :param tag: A list of tags to be created or, if they already exist, updated. (required) + :type tag: List[TagBatch] + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param resource_ids: Performs the operation on the unique resource ID specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: Performs the operation on the unique resource name specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TagResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'tag', + 'authorization', + 'x_request_id', + 'context_names', + 'resource_ids', + 'resource_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_workloads_tags_batch_put" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('resource_ids') is not None: # noqa: E501 + _query_params.append(('resource_ids', _params['resource_ids'])) + _collection_formats['resource_ids'] = 'csv' + + if _params.get('resource_names') is not None: # noqa: E501 + _query_params.append(('resource_names', _params['resource_names'])) + _collection_formats['resource_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['tag'] is not None: + _body_params = _params['tag'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "TagResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/workloads/tags/batch', 'PUT', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def workloads_tags_delete_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.")] = None, + keys: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of tag keys.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces. Only one namespace is allowed per delete request.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource ID specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique resource name specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete tags + + Deletes specified tags. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param context_names: Performs the operation on the context specified. If specified, the context names must be an array of size 1, and the single element must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. + :type context_names: List[str] + :param keys: A comma-separated list of tag keys. + :type keys: List[str] + :param namespaces: A comma-separated list of namespaces. Only one namespace is allowed per delete request. + :type namespaces: List[str] + :param resource_ids: Performs the operation on the unique resource ID specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: Performs the operation on the unique resource name specified. Only one value is supported. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'context_names', + 'keys', + 'namespaces', + 'resource_ids', + 'resource_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_workloads_tags_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('keys') is not None: # noqa: E501 + _query_params.append(('keys', _params['keys'])) + _collection_formats['keys'] = 'csv' + + if _params.get('namespaces') is not None: # noqa: E501 + _query_params.append(('namespaces', _params['namespaces'])) + _collection_formats['namespaces'] = 'csv' + + if _params.get('resource_ids') is not None: # noqa: E501 + _query_params.append(('resource_ids', _params['resource_ids'])) + _collection_formats['resource_ids'] = 'csv' + + if _params.get('resource_names') is not None: # noqa: E501 + _query_params.append(('resource_names', _params['resource_names'])) + _collection_formats['resource_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/workloads/tags', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def workloads_tags_get_with_http_info( + self, + authorization: Annotated[Optional[StrictStr], Field(description="Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`)")] = None, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + allow_errors: Annotated[Optional[StrictBool], Field(description="If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors.")] = None, + context_names: Annotated[Optional[conlist(StrictStr)], Field(description="Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`.")] = None, + namespaces: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of namespaces.")] = None, + resource_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + resource_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List tags + + Displays the list of tags. + + :param authorization: Access token (in JWT format) required to use any API endpoint (except `/oauth2`, `/login`, and `/logout`) + :type authorization: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param allow_errors: If set to `true`, the API will allow the operation to continue even if there are errors. Any errors will be returned in the `errors` field of the response. If set to `false`, the operation will fail if there are any errors. + :type allow_errors: bool + :param context_names: Performs the operation on the unique contexts specified. If specified, each context name must be the name of an array in the same fleet or the name of the fleet itself. If not specified, the context will default to the array that received this request. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`. Enter multiple names in comma-separated format. For example, `name01,name02`. + :type context_names: List[str] + :param namespaces: A comma-separated list of namespaces. + :type namespaces: List[str] + :param resource_ids: A comma-separated list of resource IDs. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_ids: List[str] + :param resource_names: A comma-separated list of resource names. The `resource_ids` or `resource_names` parameter is required, but they cannot be set together. + :type resource_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TagGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'authorization', + 'x_request_id', + 'allow_errors', + 'context_names', + 'namespaces', + 'resource_ids', + 'resource_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api255_workloads_tags_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('allow_errors') is not None: # noqa: E501 + _query_params.append(('allow_errors', _params['allow_errors'])) + + if _params.get('context_names') is not None: # noqa: E501 + _query_params.append(('context_names', _params['context_names'])) + _collection_formats['context_names'] = 'csv' + + if _params.get('namespaces') is not None: # noqa: E501 + _query_params.append(('namespaces', _params['namespaces'])) + _collection_formats['namespaces'] = 'csv' + + if _params.get('resource_ids') is not None: # noqa: E501 + _query_params.append(('resource_ids', _params['resource_ids'])) + _collection_formats['resource_ids'] = 'csv' + + if _params.get('resource_names') is not None: # noqa: E501 + _query_params.append(('resource_names', _params['resource_names'])) + _collection_formats['resource_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['authorization'] is not None: + _header_params['Authorization'] = _params['authorization'] + + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "TagGetResponse", + '207': "TagGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/workloads/tags', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api255_workloads_delete_with_http_info = workloads_delete_with_http_info + api255_workloads_get_with_http_info = workloads_get_with_http_info + api255_workloads_patch_with_http_info = workloads_patch_with_http_info + api255_workloads_placement_recommendations_get_with_http_info = workloads_placement_recommendations_get_with_http_info + api255_workloads_placement_recommendations_post_with_http_info = workloads_placement_recommendations_post_with_http_info + api255_workloads_post_with_http_info = workloads_post_with_http_info + api255_workloads_tags_batch_put_with_http_info = workloads_tags_batch_put_with_http_info + api255_workloads_tags_delete_with_http_info = workloads_tags_delete_with_http_info + api255_workloads_tags_get_with_http_info = workloads_tags_get_with_http_info + api256_workloads_delete_with_http_info = workloads_delete_with_http_info + api256_workloads_get_with_http_info = workloads_get_with_http_info + api256_workloads_patch_with_http_info = workloads_patch_with_http_info + api256_workloads_placement_recommendations_get_with_http_info = workloads_placement_recommendations_get_with_http_info + api256_workloads_placement_recommendations_post_with_http_info = workloads_placement_recommendations_post_with_http_info + api256_workloads_post_with_http_info = workloads_post_with_http_info + api256_workloads_tags_batch_put_with_http_info = workloads_tags_batch_put_with_http_info + api256_workloads_tags_delete_with_http_info = workloads_tags_delete_with_http_info + api256_workloads_tags_get_with_http_info = workloads_tags_get_with_http_info diff --git a/pypureclient/flasharray/_common/models/active_directory_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/active_directory_get_response_v_2_55.py new file mode 100644 index 0000000000..cfc984d2d1 --- /dev/null +++ b/pypureclient/flasharray/_common/models/active_directory_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.active_directory_v_2_55 import ActiveDirectory +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors + + +class ActiveDirectoryGetResponse(BaseModel): + """ + ActiveDirectoryGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(ActiveDirectory)] = Field(default=None, description="A list of Active Directory computer account configuration objects.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> ActiveDirectoryGetResponse: + """Create an instance of ActiveDirectoryGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> ActiveDirectoryGetResponse: + """Create an instance of ActiveDirectoryGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ActiveDirectoryGetResponse.parse_obj(obj) + + _obj = ActiveDirectoryGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [ActiveDirectory.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/active_directory_response_v_2_55.py b/pypureclient/flasharray/_common/models/active_directory_response_v_2_55.py new file mode 100644 index 0000000000..577c04cf52 --- /dev/null +++ b/pypureclient/flasharray/_common/models/active_directory_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.active_directory_v_2_55 import ActiveDirectory + + +class ActiveDirectoryResponse(BaseModel): + """ + ActiveDirectoryResponse + """ + items: Optional[conlist(ActiveDirectory)] = Field(default=None, description="A list of Active Directory computer account configuration objects.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> ActiveDirectoryResponse: + """Create an instance of ActiveDirectoryResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> ActiveDirectoryResponse: + """Create an instance of ActiveDirectoryResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ActiveDirectoryResponse.parse_obj(obj) + + _obj = ActiveDirectoryResponse.construct(_fields_set=None, **{ + "items": [ActiveDirectory.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/active_directory_v_2_55.py b/pypureclient/flasharray/_common/models/active_directory_v_2_55.py new file mode 100644 index 0000000000..d9bcfd35be --- /dev/null +++ b/pypureclient/flasharray/_common/models/active_directory_v_2_55.py @@ -0,0 +1,163 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.reference_with_type_v_2_54 import ReferenceWithType + + +class ActiveDirectory(BaseModel): + """ + ActiveDirectory + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + name: Optional[StrictStr] = Field(default=None, description="A locally unique, system-generated name. The name cannot be modified.") + server: Optional[FixedReferenceWithType] = Field(default=None, description="Reference to the server the object belongs to. When the value is empty or set to `null` it means the object lives outside of a server scope.") + computer_name: Optional[StrictStr] = Field(default=None, description="The name of the computer account in the Active Directory domain.") + directory_servers: Optional[conlist(StrictStr)] = Field(default=None, description="A list of directory servers used for lookups related to user authorization. Servers must be specified in FQDN format. All specified servers must be registered to the domain appropriately in the configured DNS of the array and are only communicated with over the secure LDAP (LDAPS) protocol. If this field is `null`, the servers are resolved for the domain in DNS.") + domain: Optional[StrictStr] = Field(default=None, description="The Active Directory domain joined.") + kerberos_servers: Optional[conlist(StrictStr)] = Field(default=None, description="A list of key distribution servers to use for Kerberos protocol. Servers must be specified in FQDN format. All specified servers must be registered to the domain appropriately in the configured DNS of the array. If this field is `null`, the servers are resolved for the domain in DNS.") + sources: Optional[conlist(ReferenceWithType)] = Field(default=None, description="List of network interfaces used for egress. For directory services at the array level, this list can be empty. If the list is empty, the system will use VIFs with the \"ds\" service (or if none, the \"management\" service) for egress.") + tls: Optional[StrictStr] = Field(default=None, description="TLS mode for communication with domain controllers. Valid values are `required` and `optional`. `required` forces TLS communication with domain controller. `optional` allows the use of non-TLS communication, TLS will still be preferred, if available. If not specified, defaults to `required`.") + __properties = ["context", "realms", "name", "server", "computer_name", "directory_servers", "domain", "kerberos_servers", "sources", "tls"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "realms", + "name", + "server", + "computer_name", + "directory_servers", + "domain", + "kerberos_servers", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of server + if _include_in_dict('server', include_readonly, excluded_fields, none_fields): + _dict['server'] = self.server.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in sources (list) + if _include_in_dict('sources', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.sources: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['sources'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> ActiveDirectory: + """Create an instance of ActiveDirectory from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> ActiveDirectory: + """Create an instance of ActiveDirectory from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ActiveDirectory.parse_obj(obj) + + _obj = ActiveDirectory.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "name": obj.get("name"), + "server": FixedReferenceWithType.from_dict(obj.get("server")) if obj.get("server") is not None else None, + "computer_name": obj.get("computer_name"), + "directory_servers": obj.get("directory_servers"), + "domain": obj.get("domain"), + "kerberos_servers": obj.get("kerberos_servers"), + "sources": [ReferenceWithType.from_dict(_item) for _item in obj.get("sources")] if obj.get("sources") is not None else None, + "tls": obj.get("tls") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/array_availability_v_2_55.py b/pypureclient/flasharray/_common/models/array_availability_v_2_55.py new file mode 100644 index 0000000000..e451dd77fb --- /dev/null +++ b/pypureclient/flasharray/_common/models/array_availability_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType + + +class ArrayAvailability(BaseModel): + """ + ArrayAvailability + """ + array: Optional[FixedReferenceWithType] = Field(default=None, description="The `array` where the interface status is being reported.") + status: Optional[StrictStr] = Field(default=None, description="The status of the interface on the associated array. Possible values are `active`, `standby`, and `offline`.") + __properties = ["array", "status"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "array", + "status", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of array + if _include_in_dict('array', include_readonly, excluded_fields, none_fields): + _dict['array'] = self.array.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> ArrayAvailability: + """Create an instance of ArrayAvailability from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> ArrayAvailability: + """Create an instance of ArrayAvailability from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ArrayAvailability.parse_obj(obj) + + _obj = ArrayAvailability.construct(_fields_set=None, **{ + "array": FixedReferenceWithType.from_dict(obj.get("array")) if obj.get("array") is not None else None, + "status": obj.get("status") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/array_connection_key_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/array_connection_key_get_response_v_2_55.py new file mode 100644 index 0000000000..6875c16339 --- /dev/null +++ b/pypureclient/flasharray/_common/models/array_connection_key_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.array_connection_key_v_2_55 import ArrayConnectionKey +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors + + +class ArrayConnectionKeyGetResponse(BaseModel): + """ + ArrayConnectionKeyGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + items: Optional[conlist(ArrayConnectionKey)] = None + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "errors", "items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> ArrayConnectionKeyGetResponse: + """Create an instance of ArrayConnectionKeyGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> ArrayConnectionKeyGetResponse: + """Create an instance of ArrayConnectionKeyGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ArrayConnectionKeyGetResponse.parse_obj(obj) + + _obj = ArrayConnectionKeyGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None, + "items": [ArrayConnectionKey.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/array_connection_key_v_2_55.py b/pypureclient/flasharray/_common/models/array_connection_key_v_2_55.py new file mode 100644 index 0000000000..3d5654ec92 --- /dev/null +++ b/pypureclient/flasharray/_common/models/array_connection_key_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType + + +class ArrayConnectionKey(BaseModel): + """ + ArrayConnectionKey + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + connection_key: Optional[StrictStr] = Field(default=None, description="The `connection-key` used on another `array` to connect to this `array`.") + __properties = ["context", "connection_key"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "connection_key", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> ArrayConnectionKey: + """Create an instance of ArrayConnectionKey from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> ArrayConnectionKey: + """Create an instance of ArrayConnectionKey from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ArrayConnectionKey.parse_obj(obj) + + _obj = ArrayConnectionKey.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "connection_key": obj.get("connection_key") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/container_default_protection_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/container_default_protection_get_response_v_2_55.py new file mode 100644 index 0000000000..5b789b349e --- /dev/null +++ b/pypureclient/flasharray/_common/models/container_default_protection_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.container_default_protection_v_2_55 import ContainerDefaultProtection +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors + + +class ContainerDefaultProtectionGetResponse(BaseModel): + """ + ContainerDefaultProtectionGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(ContainerDefaultProtection)] = None + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> ContainerDefaultProtectionGetResponse: + """Create an instance of ContainerDefaultProtectionGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> ContainerDefaultProtectionGetResponse: + """Create an instance of ContainerDefaultProtectionGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ContainerDefaultProtectionGetResponse.parse_obj(obj) + + _obj = ContainerDefaultProtectionGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [ContainerDefaultProtection.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/container_default_protection_response_v_2_55.py b/pypureclient/flasharray/_common/models/container_default_protection_response_v_2_55.py new file mode 100644 index 0000000000..ec07497d82 --- /dev/null +++ b/pypureclient/flasharray/_common/models/container_default_protection_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, conlist +from pypureclient.flasharray._common.models.container_default_protection_v_2_55 import ContainerDefaultProtection + + +class ContainerDefaultProtectionResponse(BaseModel): + """ + ContainerDefaultProtectionResponse + """ + items: Optional[conlist(ContainerDefaultProtection)] = None + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> ContainerDefaultProtectionResponse: + """Create an instance of ContainerDefaultProtectionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> ContainerDefaultProtectionResponse: + """Create an instance of ContainerDefaultProtectionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ContainerDefaultProtectionResponse.parse_obj(obj) + + _obj = ContainerDefaultProtectionResponse.construct(_fields_set=None, **{ + "items": [ContainerDefaultProtection.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/container_default_protection_v_2_55.py b/pypureclient/flasharray/_common/models/container_default_protection_v_2_55.py new file mode 100644 index 0000000000..dcd314ea41 --- /dev/null +++ b/pypureclient/flasharray/_common/models/container_default_protection_v_2_55.py @@ -0,0 +1,139 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr, conlist +from pypureclient.flasharray._common.models.default_protection_reference_v_2_49 import DefaultProtectionReference +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType + + +class ContainerDefaultProtection(BaseModel): + """ + ContainerDefaultProtection + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + default_protections: Optional[conlist(DefaultProtectionReference)] = Field(default=None, description="The default protection that is applied to newly created volumes or managed directories. Pgroups and policies in the list will protect volumes and managed directories, respectively. Volumes and managed directories can opt out of the default protection at creation. By default (when `with_default_protection` is `true` or omitted), a pod inherits from its realm or, if not in a realm, from the array. A realm inherits from the array. To clear the list of default protections, set to an empty list `[]`.") + id: Optional[StrictStr] = Field(default=None, description="The id of an administrative domain, a data container, and a namespace for volumes and protection groups. Values can be `pod id`, `realm id` or `null`. `Null` represents the local array id.") + name: Optional[StrictStr] = Field(default=None, description="The name of an administrative domain, a data container, and a namespace for volumes and protection groups. Values can be `pod name`, `realm name` or `null`. `null` represents the local array name.") + type: Optional[StrictStr] = Field(default=None, description="The type of an administrative domain, a data container, and a namespace for volumes and protection groups. Values can be `pod`, `realm` or `null`. `null` represents the local array type.") + __properties = ["context", "default_protections", "id", "name", "type"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "id", + "name", + "type", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in default_protections (list) + if _include_in_dict('default_protections', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.default_protections: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['default_protections'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> ContainerDefaultProtection: + """Create an instance of ContainerDefaultProtection from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> ContainerDefaultProtection: + """Create an instance of ContainerDefaultProtection from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ContainerDefaultProtection.parse_obj(obj) + + _obj = ContainerDefaultProtection.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "default_protections": [DefaultProtectionReference.from_dict(_item) for _item in obj.get("default_protections")] if obj.get("default_protections") is not None else None, + "id": obj.get("id"), + "name": obj.get("name"), + "type": obj.get("type") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/container_performance_replication_v_2_55.py b/pypureclient/flasharray/_common/models/container_performance_replication_v_2_55.py new file mode 100644 index 0000000000..7b61bddb40 --- /dev/null +++ b/pypureclient/flasharray/_common/models/container_performance_replication_v_2_55.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictInt, conint +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictInt, conint +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.replication_performance_with_total_v_2_2 import ReplicationPerformanceWithTotal + + +class ContainerPerformanceReplication(BaseModel): + """ + ContainerPerformanceReplication + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + continuous_bytes_per_sec: Optional[ReplicationPerformanceWithTotal] = Field(default=None, description="The total number of `bytes` transmitted or received per second for continuous replication. The continuous replication feature is used for disaster recovery on FlashArray and provides a recovery point objective (RPO) of significantly less than 30 seconds.") + periodic_bytes_per_sec: Optional[ReplicationPerformanceWithTotal] = Field(default=None, description="The total number of `bytes` transmitted or received per second for periodic replication.") + resync_bytes_per_sec: Optional[ReplicationPerformanceWithTotal] = Field(default=None, description="The total number of `bytes` transmitted or received per second during resync replication. Resync replication is the mechanism to bring two `arrays` into sync. This may occur during an initial `pod` stretch, or, in the case of an outage, when two `arrays` reestablish connection. After the connection is restored, the `array` that was online starts replicating `pod` data to its peer `array` until the `pod` is once again in sync.") + sync_bytes_per_sec: Optional[ReplicationPerformanceWithTotal] = Field(default=None, description="The total number of `bytes` transmitted or received per second for synchronous replication.") + time: Optional[StrictInt] = Field(default=None, description="The sample time recorded in `milliseconds` since the UNIX epoch.") + total_bytes_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The total number of `bytes` transmitted and received per second for all types of replication.") + __properties = ["context", "continuous_bytes_per_sec", "periodic_bytes_per_sec", "resync_bytes_per_sec", "sync_bytes_per_sec", "time", "total_bytes_per_sec"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "time", + "total_bytes_per_sec", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of continuous_bytes_per_sec + if _include_in_dict('continuous_bytes_per_sec', include_readonly, excluded_fields, none_fields): + _dict['continuous_bytes_per_sec'] = self.continuous_bytes_per_sec.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of periodic_bytes_per_sec + if _include_in_dict('periodic_bytes_per_sec', include_readonly, excluded_fields, none_fields): + _dict['periodic_bytes_per_sec'] = self.periodic_bytes_per_sec.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of resync_bytes_per_sec + if _include_in_dict('resync_bytes_per_sec', include_readonly, excluded_fields, none_fields): + _dict['resync_bytes_per_sec'] = self.resync_bytes_per_sec.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of sync_bytes_per_sec + if _include_in_dict('sync_bytes_per_sec', include_readonly, excluded_fields, none_fields): + _dict['sync_bytes_per_sec'] = self.sync_bytes_per_sec.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> ContainerPerformanceReplication: + """Create an instance of ContainerPerformanceReplication from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> ContainerPerformanceReplication: + """Create an instance of ContainerPerformanceReplication from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ContainerPerformanceReplication.parse_obj(obj) + + _obj = ContainerPerformanceReplication.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "continuous_bytes_per_sec": ReplicationPerformanceWithTotal.from_dict(obj.get("continuous_bytes_per_sec")) if obj.get("continuous_bytes_per_sec") is not None else None, + "periodic_bytes_per_sec": ReplicationPerformanceWithTotal.from_dict(obj.get("periodic_bytes_per_sec")) if obj.get("periodic_bytes_per_sec") is not None else None, + "resync_bytes_per_sec": ReplicationPerformanceWithTotal.from_dict(obj.get("resync_bytes_per_sec")) if obj.get("resync_bytes_per_sec") is not None else None, + "sync_bytes_per_sec": ReplicationPerformanceWithTotal.from_dict(obj.get("sync_bytes_per_sec")) if obj.get("sync_bytes_per_sec") is not None else None, + "time": obj.get("time"), + "total_bytes_per_sec": obj.get("total_bytes_per_sec") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/data_sealing_key_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/data_sealing_key_get_response_v_2_55.py new file mode 100644 index 0000000000..f33183419c --- /dev/null +++ b/pypureclient/flasharray/_common/models/data_sealing_key_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.data_sealing_key_v_2_55 import DataSealingKey +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors + + +class DataSealingKeyGetResponse(BaseModel): + """ + DataSealingKeyGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(DataSealingKey)] = Field(default=None, description="The list of `data sealing key` objects.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DataSealingKeyGetResponse: + """Create an instance of DataSealingKeyGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DataSealingKeyGetResponse: + """Create an instance of DataSealingKeyGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DataSealingKeyGetResponse.parse_obj(obj) + + _obj = DataSealingKeyGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [DataSealingKey.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/data_sealing_key_patch_v_2_55.py b/pypureclient/flasharray/_common/models/data_sealing_key_patch_v_2_55.py new file mode 100644 index 0000000000..9aac128151 --- /dev/null +++ b/pypureclient/flasharray/_common/models/data_sealing_key_patch_v_2_55.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr + + +class DataSealingKeyPatch(BaseModel): + """ + DataSealingKeyPatch + """ + keying_material: Optional[StrictStr] = Field(default=None, description="The Base64-encoded keying material (RFC 4648 section 4, alphabet A-Z a-z 0-9 + /, with = padding) of the 256-bit `AES data sealing key`. This property is required when re-enabling an `unavailable` or `disabled` `key`, or when rotating the keying material together with `old_keying_material`. When rotating, this field contains the new keying material. When re-enabling, this field contains the same keying material as the one that was used before the `key_status` became `unavailable` or `disabled`.") + requested_key_state: Optional[StrictStr] = Field(default=None, description="The desired state of the `data sealing key`, either `enabled` or `disabled`. Changing this state will update the `key's status` accordingly. To disable a `key`, no `keying material` is required. When restoring from `unavailable` to `enabled`, only `keying_material` must be provided and this field should be omitted. Do not set this property when rotating `keying material`.") + __properties = ["keying_material", "requested_key_state"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DataSealingKeyPatch: + """Create an instance of DataSealingKeyPatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DataSealingKeyPatch: + """Create an instance of DataSealingKeyPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DataSealingKeyPatch.parse_obj(obj) + + _obj = DataSealingKeyPatch.construct(_fields_set=None, **{ + "keying_material": obj.get("keying_material"), + "requested_key_state": obj.get("requested_key_state") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/data_sealing_key_post_v_2_55.py b/pypureclient/flasharray/_common/models/data_sealing_key_post_v_2_55.py new file mode 100644 index 0000000000..73b1e4fb22 --- /dev/null +++ b/pypureclient/flasharray/_common/models/data_sealing_key_post_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr +from pypureclient.flasharray._common.models.reference_no_id_with_type_v_2_55 import ReferenceNoIdWithType + + +class DataSealingKeyPost(BaseModel): + """ + DataSealingKeyPost + """ + key_location: Optional[StrictStr] = Field(default=None, description="The location where the data sealing key is stored. Valid values are `remote`, or `local-in-memory`. When set to `remote`, the key is retrieved from an external key management server specified in the `remote_key_location` property (e.g., a KMIP server identified by `resource_type: \"kmip\"`). When set to `local-in-memory`, the keying material must be provided in the `keying_material` property.") + keying_material: Optional[StrictStr] = Field(default=None, description="The Base64-encoded keying material (RFC 4648 section 4, alphabet A-Z a-z 0-9 + /, with = padding) of the 256-bit `AES data sealing key`. This property is required when `key_location` is set to `local-in-memory` and must not be set for other `key locations`.") + remote_key_location: Optional[ReferenceNoIdWithType] = Field(default=None, description="The reference (name and resource type) to an external `key management server configuration`. For `KMIP servers`, set `resource_type` to `\"kmip\"`. This property is required when `key_location` is set to `remote` and must not be set for other `key locations`.") + __properties = ["key_location", "keying_material", "remote_key_location"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of remote_key_location + if _include_in_dict('remote_key_location', include_readonly, excluded_fields, none_fields): + _dict['remote_key_location'] = self.remote_key_location.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DataSealingKeyPost: + """Create an instance of DataSealingKeyPost from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DataSealingKeyPost: + """Create an instance of DataSealingKeyPost from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DataSealingKeyPost.parse_obj(obj) + + _obj = DataSealingKeyPost.construct(_fields_set=None, **{ + "key_location": obj.get("key_location"), + "keying_material": obj.get("keying_material"), + "remote_key_location": ReferenceNoIdWithType.from_dict(obj.get("remote_key_location")) if obj.get("remote_key_location") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/data_sealing_key_response_v_2_55.py b/pypureclient/flasharray/_common/models/data_sealing_key_response_v_2_55.py new file mode 100644 index 0000000000..cf6743f131 --- /dev/null +++ b/pypureclient/flasharray/_common/models/data_sealing_key_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.data_sealing_key_v_2_55 import DataSealingKey + + +class DataSealingKeyResponse(BaseModel): + """ + DataSealingKeyResponse + """ + items: Optional[conlist(DataSealingKey)] = Field(default=None, description="The list of `data sealing key` objects.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DataSealingKeyResponse: + """Create an instance of DataSealingKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DataSealingKeyResponse: + """Create an instance of DataSealingKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DataSealingKeyResponse.parse_obj(obj) + + _obj = DataSealingKeyResponse.construct(_fields_set=None, **{ + "items": [DataSealingKey.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/data_sealing_key_rotate_v_2_55.py b/pypureclient/flasharray/_common/models/data_sealing_key_rotate_v_2_55.py new file mode 100644 index 0000000000..8923804c90 --- /dev/null +++ b/pypureclient/flasharray/_common/models/data_sealing_key_rotate_v_2_55.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr + + +class DataSealingKeyRotate(BaseModel): + """ + DataSealingKeyRotate + """ + keying_material: Optional[StrictStr] = Field(default=None, description="The Base64-encoded keying material (RFC 4648 section 4, alphabet A-Z a-z 0-9 + /, with = padding) of the new 256-bit `AES data sealing key`. This property is required when rotating `keys` with `key_location` set to `local-in-memory`. For `remote keys`, this property must not be set as the `key` is automatically rotated on the `external key management server`.") + old_keying_material: Optional[StrictStr] = Field(default=None, description="The Base64-encoded keying material (RFC 4648 section 4) that matches the current `data sealing key`. This property is required when rotating `keys` with `key_location` set to `local-in-memory` and must not be set for `remote keys`.") + __properties = ["keying_material", "old_keying_material"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DataSealingKeyRotate: + """Create an instance of DataSealingKeyRotate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DataSealingKeyRotate: + """Create an instance of DataSealingKeyRotate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DataSealingKeyRotate.parse_obj(obj) + + _obj = DataSealingKeyRotate.construct(_fields_set=None, **{ + "keying_material": obj.get("keying_material"), + "old_keying_material": obj.get("old_keying_material") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/data_sealing_key_v_2_55.py b/pypureclient/flasharray/_common/models/data_sealing_key_v_2_55.py new file mode 100644 index 0000000000..4c4d47fb8a --- /dev/null +++ b/pypureclient/flasharray/_common/models/data_sealing_key_v_2_55.py @@ -0,0 +1,150 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.reference_no_id_with_type_v_2_55 import ReferenceNoIdWithType + + +class DataSealingKey(BaseModel): + """ + DataSealingKey + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A locally unique, system-generated name. The name cannot be modified.") + key_location: Optional[StrictStr] = Field(default=None, description="The location where the `data sealing key` is stored. Values include `remote` and `local-in-memory`. When set to `remote`, the `key` is retrieved from an external `key management server` specified in the `remote_key_location` property (e.g., a `KMIP server` identified by `resource_type: \"kmip\"`). When set to `local-in-memory`, the `keying material` is provided by the user.") + key_status: Optional[StrictStr] = Field(default=None, description="The current status of the data sealing key can be `enabled`, `disabled`, or `unavailable`. When the key is `enabled`, its keying material is in memory, and the associated realms are unsealed. If the status is `disabled`, the key is inactive, the keying material is not in memory, and the associated realms are sealed. The `unavailable` status indicates that the key was previously `enabled`, but after a power cycle, the keying material is no longer in memory, leaving the associated realms sealed. To return the key to the `enabled` state and unseal the realms, the keying material must be provided again using a PATCH request with the `keying_material` property set. To change the key's status between `enabled` and `disabled`, a PATCH request with the `requested_key_status` property should be used.") + remote_key_location: Optional[ReferenceNoIdWithType] = Field(default=None, description="The reference (ID, name, and resource type) to an external `key management server configuration`. For `KMIP servers`, `resource_type` will be `\"kmip\"`. This property is set when `key_location` is `remote` and is `null` for other `key locations`.") + requested_key_state: Optional[StrictStr] = Field(default=None, description="The desired state of the data sealing key can be either `enabled` or `disabled`. Changing this state will update the key's status accordingly. To enable the key, the `keying_material` field must be set with base64-encoded keying material as defined in RFC 4648 section 4. If the desired state is set to `enabled` and `key_status` becomes `unavailable` after a power cycle, the keying material must be provided again in a PATCH request using the `keying_material` property to restore the `enabled` state.") + __properties = ["context", "realms", "id", "name", "key_location", "key_status", "remote_key_location", "requested_key_state"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "realms", + "id", + "name", + "key_location", + "key_status", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of remote_key_location + if _include_in_dict('remote_key_location', include_readonly, excluded_fields, none_fields): + _dict['remote_key_location'] = self.remote_key_location.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DataSealingKey: + """Create an instance of DataSealingKey from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DataSealingKey: + """Create an instance of DataSealingKey from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DataSealingKey.parse_obj(obj) + + _obj = DataSealingKey.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "id": obj.get("id"), + "name": obj.get("name"), + "key_location": obj.get("key_location"), + "key_status": obj.get("key_status"), + "remote_key_location": ReferenceNoIdWithType.from_dict(obj.get("remote_key_location")) if obj.get("remote_key_location") is not None else None, + "requested_key_state": obj.get("requested_key_state") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/directories_performance_by_array_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/directories_performance_by_array_get_response_v_2_55.py new file mode 100644 index 0000000000..33ecd3f3c9 --- /dev/null +++ b/pypureclient/flasharray/_common/models/directories_performance_by_array_get_response_v_2_55.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.directories_performance_by_array_v_2_55 import DirectoriesPerformanceByArray +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors + + +class DirectoriesPerformanceByArrayGetResponse(BaseModel): + """ + DirectoriesPerformanceByArrayGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + items: Optional[conlist(DirectoriesPerformanceByArray)] = Field(default=None, description="The `performance data` broken down by `array`. If the `total_only` parameter is set to `true`, the `items` list will be empty.") + total: Optional[conlist(DirectoriesPerformanceByArray)] = Field(default=None, description="The aggregate value of all `items` after `filtering`. When applicable, the `average value` is displayed instead. If applicable, the `values` are displayed for each `field`.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "errors", "items", "total"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in total (list) + if _include_in_dict('total', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.total: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['total'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DirectoriesPerformanceByArrayGetResponse: + """Create an instance of DirectoriesPerformanceByArrayGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DirectoriesPerformanceByArrayGetResponse: + """Create an instance of DirectoriesPerformanceByArrayGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DirectoriesPerformanceByArrayGetResponse.parse_obj(obj) + + _obj = DirectoriesPerformanceByArrayGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None, + "items": [DirectoriesPerformanceByArray.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "total": [DirectoriesPerformanceByArray.from_dict(_item) for _item in obj.get("total")] if obj.get("total") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/directories_performance_by_array_v_2_55.py b/pypureclient/flasharray/_common/models/directories_performance_by_array_v_2_55.py new file mode 100644 index 0000000000..29df445158 --- /dev/null +++ b/pypureclient/flasharray/_common/models/directories_performance_by_array_v_2_55.py @@ -0,0 +1,185 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conint +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictInt, StrictStr, conint +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.resource_v_2_49 import Resource + + +class DirectoriesPerformanceByArray(BaseModel): + """ + DirectoriesPerformanceByArray + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + mirrored_others_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of mirrored other requests processed per second.") + others_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of other requests processed per second.") + usec_per_mirrored_other_op: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average time it takes the array to process a mirrored I/O other request, measured in microseconds.") + usec_per_other_op: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average time it takes the array to process an I/O other request, measured in microseconds.") + bytes_per_mirrored_write: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average I/O size per mirrored write, measured in bytes.") + bytes_per_op: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average I/O size for both read and write (all) operations.") + bytes_per_read: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average I/O size per read, measured in bytes.") + bytes_per_write: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average I/O size per write, measured in bytes.") + mirrored_write_bytes_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of mirrored bytes written per second.") + mirrored_writes_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of mirrored writes per second.") + read_bytes_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of bytes read per second.") + reads_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of read requests processed per second.") + time: Optional[StrictInt] = Field(default=None, description="The time when the sample performance data was taken. Measured in milliseconds since the UNIX epoch.") + usec_per_mirrored_write_op: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average time it takes the array to process a mirrored I/O write request, measured in microseconds.") + usec_per_read_op: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average time it takes the array to process an I/O read request, measured in microseconds.") + usec_per_write_op: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average time it takes the array to process an I/O write request, measured in microseconds.") + write_bytes_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of bytes written per second.") + writes_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of write requests processed per second.") + array: Optional[Resource] = Field(default=None, description="The array on which the performance metrics were recorded.") + __properties = ["id", "name", "context", "mirrored_others_per_sec", "others_per_sec", "usec_per_mirrored_other_op", "usec_per_other_op", "bytes_per_mirrored_write", "bytes_per_op", "bytes_per_read", "bytes_per_write", "mirrored_write_bytes_per_sec", "mirrored_writes_per_sec", "read_bytes_per_sec", "reads_per_sec", "time", "usec_per_mirrored_write_op", "usec_per_read_op", "usec_per_write_op", "write_bytes_per_sec", "writes_per_sec", "array"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "context", + "mirrored_others_per_sec", + "others_per_sec", + "usec_per_mirrored_other_op", + "usec_per_other_op", + "bytes_per_mirrored_write", + "bytes_per_op", + "bytes_per_read", + "bytes_per_write", + "mirrored_write_bytes_per_sec", + "mirrored_writes_per_sec", + "read_bytes_per_sec", + "reads_per_sec", + "time", + "usec_per_mirrored_write_op", + "usec_per_read_op", + "usec_per_write_op", + "write_bytes_per_sec", + "writes_per_sec", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of array + if _include_in_dict('array', include_readonly, excluded_fields, none_fields): + _dict['array'] = self.array.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DirectoriesPerformanceByArray: + """Create an instance of DirectoriesPerformanceByArray from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DirectoriesPerformanceByArray: + """Create an instance of DirectoriesPerformanceByArray from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DirectoriesPerformanceByArray.parse_obj(obj) + + _obj = DirectoriesPerformanceByArray.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "mirrored_others_per_sec": obj.get("mirrored_others_per_sec"), + "others_per_sec": obj.get("others_per_sec"), + "usec_per_mirrored_other_op": obj.get("usec_per_mirrored_other_op"), + "usec_per_other_op": obj.get("usec_per_other_op"), + "bytes_per_mirrored_write": obj.get("bytes_per_mirrored_write"), + "bytes_per_op": obj.get("bytes_per_op"), + "bytes_per_read": obj.get("bytes_per_read"), + "bytes_per_write": obj.get("bytes_per_write"), + "mirrored_write_bytes_per_sec": obj.get("mirrored_write_bytes_per_sec"), + "mirrored_writes_per_sec": obj.get("mirrored_writes_per_sec"), + "read_bytes_per_sec": obj.get("read_bytes_per_sec"), + "reads_per_sec": obj.get("reads_per_sec"), + "time": obj.get("time"), + "usec_per_mirrored_write_op": obj.get("usec_per_mirrored_write_op"), + "usec_per_read_op": obj.get("usec_per_read_op"), + "usec_per_write_op": obj.get("usec_per_write_op"), + "write_bytes_per_sec": obj.get("write_bytes_per_sec"), + "writes_per_sec": obj.get("writes_per_sec"), + "array": Resource.from_dict(obj.get("array")) if obj.get("array") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/directory_export_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/directory_export_get_response_v_2_55.py new file mode 100644 index 0000000000..3e60c7dc16 --- /dev/null +++ b/pypureclient/flasharray/_common/models/directory_export_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.directory_export_v_2_55 import DirectoryExport +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors + + +class DirectoryExportGetResponse(BaseModel): + """ + DirectoryExportGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(DirectoryExport)] = Field(default=None, description="Displays a list of all items after filtering. The values are displayed for each name if meaningful.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DirectoryExportGetResponse: + """Create an instance of DirectoryExportGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DirectoryExportGetResponse: + """Create an instance of DirectoryExportGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DirectoryExportGetResponse.parse_obj(obj) + + _obj = DirectoryExportGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [DirectoryExport.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/directory_export_response_v_2_55.py b/pypureclient/flasharray/_common/models/directory_export_response_v_2_55.py new file mode 100644 index 0000000000..de78330979 --- /dev/null +++ b/pypureclient/flasharray/_common/models/directory_export_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.directory_export_v_2_55 import DirectoryExport + + +class DirectoryExportResponse(BaseModel): + """ + DirectoryExportResponse + """ + items: Optional[conlist(DirectoryExport)] = Field(default=None, description="Displays a list of all items after filtering. The values are displayed for each name if meaningful.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DirectoryExportResponse: + """Create an instance of DirectoryExportResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DirectoryExportResponse: + """Create an instance of DirectoryExportResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DirectoryExportResponse.parse_obj(obj) + + _obj = DirectoryExportResponse.construct(_fields_set=None, **{ + "items": [DirectoryExport.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/directory_export_v_2_55.py b/pypureclient/flasharray/_common/models/directory_export_v_2_55.py new file mode 100644 index 0000000000..c9ad2e59a1 --- /dev/null +++ b/pypureclient/flasharray/_common/models/directory_export_v_2_55.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.workload_configuration_fixed_reference_v_2_51 import WorkloadConfigurationFixedReference + + +class DirectoryExport(BaseModel): + """ + DirectoryExport + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the export policy that manages this export is enabled.") + export_name: Optional[StrictStr] = Field(default=None, description="The export name for accessing this export.") + status: Optional[StrictStr] = Field(default=None, description="Explains why `enabled` is `false`, or whether there is a name conflict with another export. Valid values include `policy_disabled`, `export_disabled`, and `name_conflict`.") + server: Optional[FixedReferenceWithType] = Field(default=None, description="Reference to the server the object belongs to. When the value is empty or set to `null` it means the object lives outside of a server scope.") + destroyed: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the managed directory of the export has been destroyed and is pending eradication. The export can be recovered by recovering the destroyed managed directory.") + directory: Optional[FixedReferenceWithType] = Field(default=None, description="The managed directory of the export.") + name: Optional[StrictStr] = Field(default=None, description="Name of the export configuration object. Combines the export containment hierarchy (realm and server), the protocol (SMB or NFS) and the user-visible `export_name`.") + path: Optional[StrictStr] = Field(default=None, description="The path of the exported managed directory.") + policy: Optional[FixedReferenceWithType] = Field(default=None, description="The export policy that manages this export. An export can be managed by at most one export policy.") + workload: Optional[WorkloadConfigurationFixedReference] = None + __properties = ["context", "realms", "enabled", "export_name", "status", "server", "destroyed", "directory", "name", "path", "policy", "workload"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "realms", + "enabled", + "export_name", + "status", + "server", + "destroyed", + "path", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of server + if _include_in_dict('server', include_readonly, excluded_fields, none_fields): + _dict['server'] = self.server.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of directory + if _include_in_dict('directory', include_readonly, excluded_fields, none_fields): + _dict['directory'] = self.directory.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of policy + if _include_in_dict('policy', include_readonly, excluded_fields, none_fields): + _dict['policy'] = self.policy.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of workload + if _include_in_dict('workload', include_readonly, excluded_fields, none_fields): + _dict['workload'] = self.workload.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DirectoryExport: + """Create an instance of DirectoryExport from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DirectoryExport: + """Create an instance of DirectoryExport from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DirectoryExport.parse_obj(obj) + + _obj = DirectoryExport.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "enabled": obj.get("enabled"), + "export_name": obj.get("export_name"), + "status": obj.get("status"), + "server": FixedReferenceWithType.from_dict(obj.get("server")) if obj.get("server") is not None else None, + "destroyed": obj.get("destroyed"), + "directory": FixedReferenceWithType.from_dict(obj.get("directory")) if obj.get("directory") is not None else None, + "name": obj.get("name"), + "path": obj.get("path"), + "policy": FixedReferenceWithType.from_dict(obj.get("policy")) if obj.get("policy") is not None else None, + "workload": WorkloadConfigurationFixedReference.from_dict(obj.get("workload")) if obj.get("workload") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/directory_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/directory_get_response_v_2_55.py new file mode 100644 index 0000000000..d48838dd35 --- /dev/null +++ b/pypureclient/flasharray/_common/models/directory_get_response_v_2_55.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.directory_v_2_55 import Directory +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors + + +class DirectoryGetResponse(BaseModel): + """ + DirectoryGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(Directory)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + total: Optional[conlist(Directory)] = Field(default=None, description="The aggregate value of all items after filtering. When applicable, the average value is displayed instead. If applicable, the values are displayed for each field.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors", "total"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in total (list) + if _include_in_dict('total', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.total: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['total'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DirectoryGetResponse: + """Create an instance of DirectoryGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DirectoryGetResponse: + """Create an instance of DirectoryGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DirectoryGetResponse.parse_obj(obj) + + _obj = DirectoryGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [Directory.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None, + "total": [Directory.from_dict(_item) for _item in obj.get("total")] if obj.get("total") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/directory_patch_v_2_55.py b/pypureclient/flasharray/_common/models/directory_patch_v_2_55.py new file mode 100644 index 0000000000..c83d90ab7c --- /dev/null +++ b/pypureclient/flasharray/_common/models/directory_patch_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr +from pypureclient.flasharray._common.models.workload_configuration_reference_patch_v_2_55 import WorkloadConfigurationReferencePatch + + +class DirectoryPatch(BaseModel): + """ + DirectoryPatch + """ + name: Optional[StrictStr] = Field(default=None, description="The new name for the resource.") + directory_name: Optional[StrictStr] = Field(default=None, description="The managed directory name without the file system name prefix. A full managed directory name is constructed in the form of `FILE_SYSTEM:DIR` where `FILE_SYSTEM` is the file system name and `DIR` is the value of this field.") + workload: Optional[WorkloadConfigurationReferencePatch] = None + __properties = ["name", "directory_name", "workload"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of workload + if _include_in_dict('workload', include_readonly, excluded_fields, none_fields): + _dict['workload'] = self.workload.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DirectoryPatch: + """Create an instance of DirectoryPatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DirectoryPatch: + """Create an instance of DirectoryPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DirectoryPatch.parse_obj(obj) + + _obj = DirectoryPatch.construct(_fields_set=None, **{ + "name": obj.get("name"), + "directory_name": obj.get("directory_name"), + "workload": WorkloadConfigurationReferencePatch.from_dict(obj.get("workload")) if obj.get("workload") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/directory_performance_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/directory_performance_get_response_v_2_55.py new file mode 100644 index 0000000000..f7f57a9ed5 --- /dev/null +++ b/pypureclient/flasharray/_common/models/directory_performance_get_response_v_2_55.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.directory_performance_v_2_55 import DirectoryPerformance +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors + + +class DirectoryPerformanceGetResponse(BaseModel): + """ + DirectoryPerformanceGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + items: Optional[conlist(DirectoryPerformance)] = Field(default=None, description="Performance data. If `total_only=true`, the `items` list will be empty.") + total: Optional[conlist(DirectoryPerformance)] = Field(default=None, description="The aggregate value of all items after filtering. When it makes sense, the average value is displayed instead. The values are displayed for each field if meaningful.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "errors", "items", "total"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in total (list) + if _include_in_dict('total', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.total: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['total'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DirectoryPerformanceGetResponse: + """Create an instance of DirectoryPerformanceGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DirectoryPerformanceGetResponse: + """Create an instance of DirectoryPerformanceGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DirectoryPerformanceGetResponse.parse_obj(obj) + + _obj = DirectoryPerformanceGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None, + "items": [DirectoryPerformance.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "total": [DirectoryPerformance.from_dict(_item) for _item in obj.get("total")] if obj.get("total") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/directory_performance_v_2_55.py b/pypureclient/flasharray/_common/models/directory_performance_v_2_55.py new file mode 100644 index 0000000000..d8de64974d --- /dev/null +++ b/pypureclient/flasharray/_common/models/directory_performance_v_2_55.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conint +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictInt, StrictStr, conint +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType + + +class DirectoryPerformance(BaseModel): + """ + DirectoryPerformance + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + mirrored_others_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of mirrored other requests processed per second.") + others_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of other requests processed per second.") + usec_per_mirrored_other_op: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average time it takes the array to process a mirrored I/O other request, measured in microseconds.") + usec_per_other_op: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average time it takes the array to process an I/O other request, measured in microseconds.") + bytes_per_mirrored_write: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average I/O size per mirrored write, measured in bytes.") + bytes_per_op: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average I/O size for both read and write (all) operations.") + bytes_per_read: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average I/O size per read, measured in bytes.") + bytes_per_write: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average I/O size per write, measured in bytes.") + mirrored_write_bytes_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of mirrored bytes written per second.") + mirrored_writes_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of mirrored writes per second.") + read_bytes_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of bytes read per second.") + reads_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of read requests processed per second.") + time: Optional[StrictInt] = Field(default=None, description="The time when the sample performance data was taken. Measured in milliseconds since the UNIX epoch.") + usec_per_mirrored_write_op: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average time it takes the array to process a mirrored I/O write request, measured in microseconds.") + usec_per_read_op: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average time it takes the array to process an I/O read request, measured in microseconds.") + usec_per_write_op: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The average time it takes the array to process an I/O write request, measured in microseconds.") + write_bytes_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of bytes written per second.") + writes_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The number of write requests processed per second.") + __properties = ["id", "name", "context", "mirrored_others_per_sec", "others_per_sec", "usec_per_mirrored_other_op", "usec_per_other_op", "bytes_per_mirrored_write", "bytes_per_op", "bytes_per_read", "bytes_per_write", "mirrored_write_bytes_per_sec", "mirrored_writes_per_sec", "read_bytes_per_sec", "reads_per_sec", "time", "usec_per_mirrored_write_op", "usec_per_read_op", "usec_per_write_op", "write_bytes_per_sec", "writes_per_sec"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "context", + "mirrored_others_per_sec", + "others_per_sec", + "usec_per_mirrored_other_op", + "usec_per_other_op", + "bytes_per_mirrored_write", + "bytes_per_op", + "bytes_per_read", + "bytes_per_write", + "mirrored_write_bytes_per_sec", + "mirrored_writes_per_sec", + "read_bytes_per_sec", + "reads_per_sec", + "time", + "usec_per_mirrored_write_op", + "usec_per_read_op", + "usec_per_write_op", + "write_bytes_per_sec", + "writes_per_sec", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DirectoryPerformance: + """Create an instance of DirectoryPerformance from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DirectoryPerformance: + """Create an instance of DirectoryPerformance from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DirectoryPerformance.parse_obj(obj) + + _obj = DirectoryPerformance.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "mirrored_others_per_sec": obj.get("mirrored_others_per_sec"), + "others_per_sec": obj.get("others_per_sec"), + "usec_per_mirrored_other_op": obj.get("usec_per_mirrored_other_op"), + "usec_per_other_op": obj.get("usec_per_other_op"), + "bytes_per_mirrored_write": obj.get("bytes_per_mirrored_write"), + "bytes_per_op": obj.get("bytes_per_op"), + "bytes_per_read": obj.get("bytes_per_read"), + "bytes_per_write": obj.get("bytes_per_write"), + "mirrored_write_bytes_per_sec": obj.get("mirrored_write_bytes_per_sec"), + "mirrored_writes_per_sec": obj.get("mirrored_writes_per_sec"), + "read_bytes_per_sec": obj.get("read_bytes_per_sec"), + "reads_per_sec": obj.get("reads_per_sec"), + "time": obj.get("time"), + "usec_per_mirrored_write_op": obj.get("usec_per_mirrored_write_op"), + "usec_per_read_op": obj.get("usec_per_read_op"), + "usec_per_write_op": obj.get("usec_per_write_op"), + "write_bytes_per_sec": obj.get("write_bytes_per_sec"), + "writes_per_sec": obj.get("writes_per_sec") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/directory_post_v_2_55.py b/pypureclient/flasharray/_common/models/directory_post_v_2_55.py new file mode 100644 index 0000000000..fe011edfb0 --- /dev/null +++ b/pypureclient/flasharray/_common/models/directory_post_v_2_55.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.workload_configuration_reference_post_v_2_55 import WorkloadConfigurationReferencePost + + +class DirectoryPost(BaseModel): + """ + DirectoryPost + """ + directory_name: Optional[StrictStr] = Field(default=None, description="The managed directory name without the file system name prefix. A full managed directory name is constructed in the form of `FILE_SYSTEM:DIR` where `FILE_SYSTEM` is the file system name and `DIR` is the value of this field. `directory_name` is required if `file_system_names` or `file_system_ids` is set. `directory_name` cannot be set if `names` is set.") + path: Optional[StrictStr] = Field(default=None, description="Path of the managed directory in the file system.") + source: Optional[Reference] = Field(default=None, description="A managed directory snapshot to be copied in order to create a new managed directory. If not specified, the newly created managed directory will be empty.") + workload: Optional[WorkloadConfigurationReferencePost] = None + __properties = ["directory_name", "path", "source", "workload"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of source + if _include_in_dict('source', include_readonly, excluded_fields, none_fields): + _dict['source'] = self.source.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of workload + if _include_in_dict('workload', include_readonly, excluded_fields, none_fields): + _dict['workload'] = self.workload.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DirectoryPost: + """Create an instance of DirectoryPost from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DirectoryPost: + """Create an instance of DirectoryPost from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DirectoryPost.parse_obj(obj) + + _obj = DirectoryPost.construct(_fields_set=None, **{ + "directory_name": obj.get("directory_name"), + "path": obj.get("path"), + "source": Reference.from_dict(obj.get("source")) if obj.get("source") is not None else None, + "workload": WorkloadConfigurationReferencePost.from_dict(obj.get("workload")) if obj.get("workload") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/directory_response_v_2_55.py b/pypureclient/flasharray/_common/models/directory_response_v_2_55.py new file mode 100644 index 0000000000..8c85786dea --- /dev/null +++ b/pypureclient/flasharray/_common/models/directory_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.directory_v_2_55 import Directory + + +class DirectoryResponse(BaseModel): + """ + DirectoryResponse + """ + items: Optional[conlist(Directory)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DirectoryResponse: + """Create an instance of DirectoryResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DirectoryResponse: + """Create an instance of DirectoryResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DirectoryResponse.parse_obj(obj) + + _obj = DirectoryResponse.construct(_fields_set=None, **{ + "items": [Directory.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/directory_service_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/directory_service_get_response_v_2_55.py new file mode 100644 index 0000000000..deb3a3c627 --- /dev/null +++ b/pypureclient/flasharray/_common/models/directory_service_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.directory_service_v_2_55 import DirectoryService +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors + + +class DirectoryServiceGetResponse(BaseModel): + """ + DirectoryServiceGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(DirectoryService)] = None + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DirectoryServiceGetResponse: + """Create an instance of DirectoryServiceGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DirectoryServiceGetResponse: + """Create an instance of DirectoryServiceGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DirectoryServiceGetResponse.parse_obj(obj) + + _obj = DirectoryServiceGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [DirectoryService.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/directory_service_response_v_2_55.py b/pypureclient/flasharray/_common/models/directory_service_response_v_2_55.py new file mode 100644 index 0000000000..9bf4f8f04d --- /dev/null +++ b/pypureclient/flasharray/_common/models/directory_service_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, conlist +from pypureclient.flasharray._common.models.directory_service_v_2_55 import DirectoryService + + +class DirectoryServiceResponse(BaseModel): + """ + DirectoryServiceResponse + """ + items: Optional[conlist(DirectoryService)] = None + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DirectoryServiceResponse: + """Create an instance of DirectoryServiceResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DirectoryServiceResponse: + """Create an instance of DirectoryServiceResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DirectoryServiceResponse.parse_obj(obj) + + _obj = DirectoryServiceResponse.construct(_fields_set=None, **{ + "items": [DirectoryService.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/directory_service_v_2_55.py b/pypureclient/flasharray/_common/models/directory_service_v_2_55.py new file mode 100644 index 0000000000..cd7ddb980b --- /dev/null +++ b/pypureclient/flasharray/_common/models/directory_service_v_2_55.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist, constr, validator +from pypureclient.flasharray._common.models.directory_service_management_v_2_32 import DirectoryServiceManagement +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.reference_with_type_v_2_54 import ReferenceWithType + + +class DirectoryService(BaseModel): + """ + DirectoryService + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + server: Optional[FixedReferenceWithType] = Field(default=None, description="Reference to the server the object belongs to. When the value is empty or set to `null` it means the object lives outside of a server scope.") + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + base_dn: Optional[StrictStr] = Field(default=None, description="Base of the Distinguished Name (DN) of the directory service groups.") + bind_password: Optional[StrictStr] = Field(default=None, description="Masked password used to query the directory.") + bind_user: Optional[StrictStr] = Field(default=None, description="Username used to query the directory.") + enabled: Optional[StrictBool] = Field(default=None, description="The directory service is either enabled or disabled.") + services: Optional[conlist(StrictStr)] = Field(default=None, description="Services for which the directory service configuration is used.") + uris: Optional[conlist(constr(strict=True))] = Field(default=None, description="List of URIs for the configured directory servers.") + ca_certificate: Optional[StrictStr] = Field(default=None, description="The certificate of the Certificate Authority (CA) that signed the directory servers' certificate(s), which is used to validate the authenticity of the configured servers. Deprecated, please use ca_certificate_ref instead. Setting this field will result in ca_certificate_ref being updated to _legacy_ds_ca_certificate_.") + ca_certificate_ref: Optional[ReferenceWithType] = Field(default=None, description="Reference (ID, name, and resource type) of the Certificate Authority (CA) that signed the certificates of the directory servers, which is used to validate the authenticity of the configured servers.") + check_peer: Optional[StrictBool] = Field(default=None, description="Determines whether or not server authenticity is enforced when a certificate is provided.") + management: Optional[DirectoryServiceManagement] = None + sources: Optional[conlist(ReferenceWithType)] = Field(default=None, description="List of network interfaces used for egress. For directory services at the array level, this list can be empty. If the list is empty, the system will use VIFs with the \"ds\" service (or if none, the \"management\" service) for egress.") + __properties = ["id", "name", "realms", "server", "context", "base_dn", "bind_password", "bind_user", "enabled", "services", "uris", "ca_certificate", "ca_certificate_ref", "check_peer", "management", "sources"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "realms", + "server", + "context", + "services", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of server + if _include_in_dict('server', include_readonly, excluded_fields, none_fields): + _dict['server'] = self.server.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of ca_certificate_ref + if _include_in_dict('ca_certificate_ref', include_readonly, excluded_fields, none_fields): + _dict['ca_certificate_ref'] = self.ca_certificate_ref.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of management + if _include_in_dict('management', include_readonly, excluded_fields, none_fields): + _dict['management'] = self.management.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in sources (list) + if _include_in_dict('sources', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.sources: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['sources'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DirectoryService: + """Create an instance of DirectoryService from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DirectoryService: + """Create an instance of DirectoryService from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DirectoryService.parse_obj(obj) + + _obj = DirectoryService.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "server": FixedReferenceWithType.from_dict(obj.get("server")) if obj.get("server") is not None else None, + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "base_dn": obj.get("base_dn"), + "bind_password": obj.get("bind_password"), + "bind_user": obj.get("bind_user"), + "enabled": obj.get("enabled"), + "services": obj.get("services"), + "uris": obj.get("uris"), + "ca_certificate": obj.get("ca_certificate"), + "ca_certificate_ref": ReferenceWithType.from_dict(obj.get("ca_certificate_ref")) if obj.get("ca_certificate_ref") is not None else None, + "check_peer": obj.get("check_peer"), + "management": DirectoryServiceManagement.from_dict(obj.get("management")) if obj.get("management") is not None else None, + "sources": [ReferenceWithType.from_dict(_item) for _item in obj.get("sources")] if obj.get("sources") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/directory_v_2_55.py b/pypureclient/flasharray/_common/models/directory_v_2_55.py new file mode 100644 index 0000000000..91fa153e6a --- /dev/null +++ b/pypureclient/flasharray/_common/models/directory_v_2_55.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_v_2_49 import FixedReference +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.limited_by_v_2_49 import LimitedBy +from pypureclient.flasharray._common.models.space_v_2_50 import Space +from pypureclient.flasharray._common.models.workload_configuration_reference_v_2_55 import WorkloadConfigurationReference + + +class Directory(BaseModel): + """ + Directory + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + created: Optional[StrictInt] = Field(default=None, description="The managed directory creation time, measured in milliseconds since the UNIX epoch.") + destroyed: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the managed directory has been destroyed and is pending eradication. The `time_remaining` value displays the amount of time left until the destroyed managed directory is permanently eradicated. Once the `time_remaining` period has elapsed, the managed directory is permanently eradicated and can no longer be recovered.") + directory_name: Optional[StrictStr] = Field(default=None, description="The managed directory name without the file system name prefix. A full managed directory name is constructed in the form of `FILE_SYSTEM:DIR` where `FILE_SYSTEM` is the file system name and `DIR` is the value of this field.") + file_system: Optional[FixedReference] = Field(default=None, description="The file system that this managed directory is in.") + limited_by: Optional[LimitedBy] = Field(default=None, description="The quota policy that is limiting usage on this managed directory. This policy defines the total amount of space provisioned to this managed directory and its descendants. The returned value contains two parts: the name of the policy and the managed directory to which the policy is attached.") + path: Optional[StrictStr] = Field(default=None, description="Absolute path of the managed directory in the file system.") + space: Optional[Space] = Field(default=None, description="Displays size and space consumption details.") + time_remaining: Optional[StrictInt] = Field(default=None, description="The amount of time left, measured in milliseconds until the destroyed managed directory is permanently eradicated.") + workload: Optional[WorkloadConfigurationReference] = None + __properties = ["id", "name", "context", "realms", "created", "destroyed", "directory_name", "file_system", "limited_by", "path", "space", "time_remaining", "workload"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "context", + "realms", + "created", + "directory_name", + "path", + "time_remaining", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of file_system + if _include_in_dict('file_system', include_readonly, excluded_fields, none_fields): + _dict['file_system'] = self.file_system.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of limited_by + if _include_in_dict('limited_by', include_readonly, excluded_fields, none_fields): + _dict['limited_by'] = self.limited_by.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of space + if _include_in_dict('space', include_readonly, excluded_fields, none_fields): + _dict['space'] = self.space.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of workload + if _include_in_dict('workload', include_readonly, excluded_fields, none_fields): + _dict['workload'] = self.workload.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> Directory: + """Create an instance of Directory from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> Directory: + """Create an instance of Directory from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Directory.parse_obj(obj) + + _obj = Directory.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "created": obj.get("created"), + "destroyed": obj.get("destroyed"), + "directory_name": obj.get("directory_name"), + "file_system": FixedReference.from_dict(obj.get("file_system")) if obj.get("file_system") is not None else None, + "limited_by": LimitedBy.from_dict(obj.get("limited_by")) if obj.get("limited_by") is not None else None, + "path": obj.get("path"), + "space": Space.from_dict(obj.get("space")) if obj.get("space") is not None else None, + "time_remaining": obj.get("time_remaining"), + "workload": WorkloadConfigurationReference.from_dict(obj.get("workload")) if obj.get("workload") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/dns_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/dns_get_response_v_2_55.py new file mode 100644 index 0000000000..8134faf035 --- /dev/null +++ b/pypureclient/flasharray/_common/models/dns_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.dns_v_2_55 import Dns +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors + + +class DnsGetResponse(BaseModel): + """ + DnsGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(Dns)] = None + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DnsGetResponse: + """Create an instance of DnsGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DnsGetResponse: + """Create an instance of DnsGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DnsGetResponse.parse_obj(obj) + + _obj = DnsGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [Dns.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/dns_response_v_2_55.py b/pypureclient/flasharray/_common/models/dns_response_v_2_55.py new file mode 100644 index 0000000000..35517e3c93 --- /dev/null +++ b/pypureclient/flasharray/_common/models/dns_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, conlist +from pypureclient.flasharray._common.models.dns_v_2_55 import Dns + + +class DnsResponse(BaseModel): + """ + DnsResponse + """ + items: Optional[conlist(Dns)] = None + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> DnsResponse: + """Create an instance of DnsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> DnsResponse: + """Create an instance of DnsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return DnsResponse.parse_obj(obj) + + _obj = DnsResponse.construct(_fields_set=None, **{ + "items": [Dns.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/dns_v_2_55.py b/pypureclient/flasharray/_common/models/dns_v_2_55.py new file mode 100644 index 0000000000..43e8635f8e --- /dev/null +++ b/pypureclient/flasharray/_common/models/dns_v_2_55.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.reference_no_id_v_2_0 import ReferenceNoId +from pypureclient.flasharray._common.models.reference_with_type_v_2_54 import ReferenceWithType + + +class Dns(BaseModel): + """ + Dns + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + ca_certificate: Optional[ReferenceWithType] = Field(default=None, description="A reference to the `certificate` to use for validating nameservers with HTTPS connections. This property is mutually exclusive with `ca_certificate_group` property and may only be configured when nameservers begin with HTTPS.") + ca_certificate_group: Optional[ReferenceWithType] = Field(default=None, description="A reference to the `certificate group` to use for validating nameservers with HTTPS connections. This property is mutually exclusive with `ca_certificate` property and may only be configured when nameservers begin with HTTPS.") + domain: Optional[StrictStr] = Field(default=None, description="The domain suffix to be appended by the appliance when performing DNS lookups.") + nameservers: Optional[conlist(StrictStr)] = Field(default=None, description="The list of DNS servers either in the form of IP addresses or HTTPS endpoints. Domain names in HTTPS endpoints are not supported. IP addresses must be used instead. If nameservers begin with `https://`, then DNS queries will be performed over HTTPS. Otherwise, unencrypted DNS queries will be performed. Using a combination of nameservers that begin with `https://` and that do not begin with `https://` is not supported. If servers are specified with `https://` one of `ca_certificate` and `ca_certificate_group` parameters must be set.") + services: Optional[conlist(StrictStr)] = Field(default=None, description="The list of services utilizing the DNS configuration.") + source: Optional[ReferenceNoId] = Field(default=None, description="The network interface used for communication with the DNS server.") + __properties = ["context", "realms", "name", "ca_certificate", "ca_certificate_group", "domain", "nameservers", "services", "source"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "realms", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of ca_certificate + if _include_in_dict('ca_certificate', include_readonly, excluded_fields, none_fields): + _dict['ca_certificate'] = self.ca_certificate.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of ca_certificate_group + if _include_in_dict('ca_certificate_group', include_readonly, excluded_fields, none_fields): + _dict['ca_certificate_group'] = self.ca_certificate_group.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of source + if _include_in_dict('source', include_readonly, excluded_fields, none_fields): + _dict['source'] = self.source.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> Dns: + """Create an instance of Dns from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> Dns: + """Create an instance of Dns from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Dns.parse_obj(obj) + + _obj = Dns.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "name": obj.get("name"), + "ca_certificate": ReferenceWithType.from_dict(obj.get("ca_certificate")) if obj.get("ca_certificate") is not None else None, + "ca_certificate_group": ReferenceWithType.from_dict(obj.get("ca_certificate_group")) if obj.get("ca_certificate_group") is not None else None, + "domain": obj.get("domain"), + "nameservers": obj.get("nameservers"), + "services": obj.get("services"), + "source": ReferenceNoId.from_dict(obj.get("source")) if obj.get("source") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/file_system_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/file_system_get_response_v_2_55.py new file mode 100644 index 0000000000..4b483de0ed --- /dev/null +++ b/pypureclient/flasharray/_common/models/file_system_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.file_system_v_2_55 import FileSystem + + +class FileSystemGetResponse(BaseModel): + """ + FileSystemGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(FileSystem)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> FileSystemGetResponse: + """Create an instance of FileSystemGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> FileSystemGetResponse: + """Create an instance of FileSystemGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return FileSystemGetResponse.parse_obj(obj) + + _obj = FileSystemGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [FileSystem.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/file_system_patch_v_2_55.py b/pypureclient/flasharray/_common/models/file_system_patch_v_2_55.py new file mode 100644 index 0000000000..8e4d340c1f --- /dev/null +++ b/pypureclient/flasharray/_common/models/file_system_patch_v_2_55.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictStr +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.workload_configuration_reference_patch_v_2_55 import WorkloadConfigurationReferencePatch + + +class FileSystemPatch(BaseModel): + """ + FileSystemPatch + """ + destroyed: Optional[StrictBool] = Field(default=None, description="If set to `true`, destroys a resource. Once set to `true`, the `time_remaining` value will display the amount of time left until the destroyed resource is permanently eradicated. Before the `time_remaining` period has elapsed, the destroyed resource can be recovered by setting `destroyed=false`. Once the `time_remaining` period has elapsed, the resource is permanently eradicated and can no longer be recovered.") + name: Optional[StrictStr] = Field(default=None, description="The new name for the resource.") + pod: Optional[Reference] = Field(default=None, description="The pod to move existing file systems into.") + workload: Optional[WorkloadConfigurationReferencePatch] = None + __properties = ["destroyed", "name", "pod", "workload"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of pod + if _include_in_dict('pod', include_readonly, excluded_fields, none_fields): + _dict['pod'] = self.pod.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of workload + if _include_in_dict('workload', include_readonly, excluded_fields, none_fields): + _dict['workload'] = self.workload.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> FileSystemPatch: + """Create an instance of FileSystemPatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> FileSystemPatch: + """Create an instance of FileSystemPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return FileSystemPatch.parse_obj(obj) + + _obj = FileSystemPatch.construct(_fields_set=None, **{ + "destroyed": obj.get("destroyed"), + "name": obj.get("name"), + "pod": Reference.from_dict(obj.get("pod")) if obj.get("pod") is not None else None, + "workload": WorkloadConfigurationReferencePatch.from_dict(obj.get("workload")) if obj.get("workload") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/file_system_post_v_2_55.py b/pypureclient/flasharray/_common/models/file_system_post_v_2_55.py new file mode 100644 index 0000000000..298b78e983 --- /dev/null +++ b/pypureclient/flasharray/_common/models/file_system_post_v_2_55.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel +except ModuleNotFoundError: + from pydantic import BaseModel +from pypureclient.flasharray._common.models.workload_configuration_reference_post_v_2_55 import WorkloadConfigurationReferencePost + + +class FileSystemPost(BaseModel): + """ + FileSystemPost + """ + workload: Optional[WorkloadConfigurationReferencePost] = None + __properties = ["workload"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of workload + if _include_in_dict('workload', include_readonly, excluded_fields, none_fields): + _dict['workload'] = self.workload.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> FileSystemPost: + """Create an instance of FileSystemPost from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> FileSystemPost: + """Create an instance of FileSystemPost from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return FileSystemPost.parse_obj(obj) + + _obj = FileSystemPost.construct(_fields_set=None, **{ + "workload": WorkloadConfigurationReferencePost.from_dict(obj.get("workload")) if obj.get("workload") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/file_system_response_v_2_55.py b/pypureclient/flasharray/_common/models/file_system_response_v_2_55.py new file mode 100644 index 0000000000..9ca94f75c7 --- /dev/null +++ b/pypureclient/flasharray/_common/models/file_system_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.file_system_v_2_55 import FileSystem + + +class FileSystemResponse(BaseModel): + """ + FileSystemResponse + """ + items: Optional[conlist(FileSystem)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> FileSystemResponse: + """Create an instance of FileSystemResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> FileSystemResponse: + """Create an instance of FileSystemResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return FileSystemResponse.parse_obj(obj) + + _obj = FileSystemResponse.construct(_fields_set=None, **{ + "items": [FileSystem.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/file_system_v_2_55.py b/pypureclient/flasharray/_common/models/file_system_v_2_55.py new file mode 100644 index 0000000000..d5688a79af --- /dev/null +++ b/pypureclient/flasharray/_common/models/file_system_v_2_55.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.container_eradication_config_v_2_49 import ContainerEradicationConfig +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.workload_configuration_reference_v_2_55 import WorkloadConfigurationReference + + +class FileSystem(BaseModel): + """ + FileSystem + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + created: Optional[StrictInt] = Field(default=None, description="The file system creation time, measured in milliseconds since the UNIX epoch.") + destroyed: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the file system has been destroyed and is pending eradication. The `time_remaining` value displays the amount of time left until the destroyed file system is permanently eradicated. Before the `time_remaining` period has elapsed, the destroyed file system can be recovered by setting `destroyed=false`. Once the `time_remaining` period has elapsed, the file system is permanently eradicated and can no longer be recovered.") + eradication_config: Optional[ContainerEradicationConfig] = None + pod: Optional[Reference] = Field(default=None, description="The reference to the pod this file systems belongs to, or `null` if it is not in a pod.") + time_remaining: Optional[StrictInt] = Field(default=None, description="The amount of time left, measured in milliseconds until the destroyed file system is permanently eradicated. Before the `time_remaining` period has elapsed, the destroyed file system can be recovered by setting `destroyed=false`.") + workload: Optional[WorkloadConfigurationReference] = None + __properties = ["id", "name", "context", "realms", "created", "destroyed", "eradication_config", "pod", "time_remaining", "workload"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "context", + "realms", + "created", + "time_remaining", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of eradication_config + if _include_in_dict('eradication_config', include_readonly, excluded_fields, none_fields): + _dict['eradication_config'] = self.eradication_config.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of pod + if _include_in_dict('pod', include_readonly, excluded_fields, none_fields): + _dict['pod'] = self.pod.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of workload + if _include_in_dict('workload', include_readonly, excluded_fields, none_fields): + _dict['workload'] = self.workload.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> FileSystem: + """Create an instance of FileSystem from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> FileSystem: + """Create an instance of FileSystem from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return FileSystem.parse_obj(obj) + + _obj = FileSystem.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "created": obj.get("created"), + "destroyed": obj.get("destroyed"), + "eradication_config": ContainerEradicationConfig.from_dict(obj.get("eradication_config")) if obj.get("eradication_config") is not None else None, + "pod": Reference.from_dict(obj.get("pod")) if obj.get("pod") is not None else None, + "time_remaining": obj.get("time_remaining"), + "workload": WorkloadConfigurationReference.from_dict(obj.get("workload")) if obj.get("workload") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/fixed_reference_without_id_v_2_56.py b/pypureclient/flasharray/_common/models/fixed_reference_without_id_v_2_56.py new file mode 100644 index 0000000000..4dff989f8a --- /dev/null +++ b/pypureclient/flasharray/_common/models/fixed_reference_without_id_v_2_56.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.56 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr + + +class FixedReferenceWithoutId(BaseModel): + """ + FixedReferenceWithoutId + """ + name: Optional[StrictStr] = Field(default=None, description="The resource `name`, such as a `volume name`, `pod name`, or `snapshot name`.") + resource_type: Optional[StrictStr] = Field(default=None, description="The type of the `object`, representing the full name of the endpoint. Valid values include `hosts`, `host-groups`, `network-interfaces`, `pods`, `ports`, `pod-replica-links`, `subnets`, `volumes`, `volume-snapshots`, `volume-groups`, `directories`, `policies/nfs`, `policies/smb`, `policies/snapshot`, and `topology-groups/arrays`.") + __properties = ["name", "resource_type"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "name", + "resource_type", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> FixedReferenceWithoutId: + """Create an instance of FixedReferenceWithoutId from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> FixedReferenceWithoutId: + """Create an instance of FixedReferenceWithoutId from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return FixedReferenceWithoutId.parse_obj(obj) + + _obj = FixedReferenceWithoutId.construct(_fields_set=None, **{ + "name": obj.get("name"), + "resource_type": obj.get("resource_type") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/local_directory_service_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/local_directory_service_get_response_v_2_55.py new file mode 100644 index 0000000000..28618dff6a --- /dev/null +++ b/pypureclient/flasharray/_common/models/local_directory_service_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.local_directory_service_v_2_55 import LocalDirectoryService + + +class LocalDirectoryServiceGetResponse(BaseModel): + """ + LocalDirectoryServiceGetResponse + """ + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(LocalDirectoryService)] = Field(default=None, description="Displays a list of all items after filtering. The values are displayed for each name, if meaningful.") + __properties = ["errors", "continuation_token", "more_items_remaining", "total_item_count", "items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> LocalDirectoryServiceGetResponse: + """Create an instance of LocalDirectoryServiceGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> LocalDirectoryServiceGetResponse: + """Create an instance of LocalDirectoryServiceGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return LocalDirectoryServiceGetResponse.parse_obj(obj) + + _obj = LocalDirectoryServiceGetResponse.construct(_fields_set=None, **{ + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None, + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [LocalDirectoryService.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/local_directory_service_response_v_2_55.py b/pypureclient/flasharray/_common/models/local_directory_service_response_v_2_55.py new file mode 100644 index 0000000000..c7ed1ff103 --- /dev/null +++ b/pypureclient/flasharray/_common/models/local_directory_service_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.local_directory_service_v_2_55 import LocalDirectoryService + + +class LocalDirectoryServiceResponse(BaseModel): + """ + LocalDirectoryServiceResponse + """ + items: Optional[conlist(LocalDirectoryService)] = Field(default=None, description="Displays a list of all items after filtering. The values are displayed for each name, if meaningful.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> LocalDirectoryServiceResponse: + """Create an instance of LocalDirectoryServiceResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> LocalDirectoryServiceResponse: + """Create an instance of LocalDirectoryServiceResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return LocalDirectoryServiceResponse.parse_obj(obj) + + _obj = LocalDirectoryServiceResponse.construct(_fields_set=None, **{ + "items": [LocalDirectoryService.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/local_directory_service_v_2_55.py b/pypureclient/flasharray/_common/models/local_directory_service_v_2_55.py new file mode 100644 index 0000000000..6db2a13b4b --- /dev/null +++ b/pypureclient/flasharray/_common/models/local_directory_service_v_2_55.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType + + +class LocalDirectoryService(BaseModel): + """ + LocalDirectoryService + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + server: Optional[FixedReferenceWithType] = Field(default=None, description="Reference to the server the object belongs to. When the value is empty or set to `null` it means the object lives outside of a server scope.") + domain: Optional[StrictStr] = Field(default=None, description="The name of the domain stored in this local directory service. All users and groups are going to be presented as being part of this domain name. When not set, it defaults to name of the Local Directory Service. For example, for object \"mydomain\" the domain name will be \"mydomain\" where domain name does not have any unique constraint (it can be the same for different local directory services within an array.") + __properties = ["context", "id", "name", "realms", "server", "domain"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "id", + "realms", + "server", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of server + if _include_in_dict('server', include_readonly, excluded_fields, none_fields): + _dict['server'] = self.server.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> LocalDirectoryService: + """Create an instance of LocalDirectoryService from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> LocalDirectoryService: + """Create an instance of LocalDirectoryService from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return LocalDirectoryService.parse_obj(obj) + + _obj = LocalDirectoryService.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "id": obj.get("id"), + "name": obj.get("name"), + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "server": FixedReferenceWithType.from_dict(obj.get("server")) if obj.get("server") is not None else None, + "domain": obj.get("domain") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/local_group_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/local_group_get_response_v_2_55.py new file mode 100644 index 0000000000..8dc7086a09 --- /dev/null +++ b/pypureclient/flasharray/_common/models/local_group_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.local_group_v_2_55 import LocalGroup + + +class LocalGroupGetResponse(BaseModel): + """ + LocalGroupGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(LocalGroup)] = Field(default=None, description="Displays a list of all items after filtering. The values are displayed for each name, if meaningful.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> LocalGroupGetResponse: + """Create an instance of LocalGroupGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> LocalGroupGetResponse: + """Create an instance of LocalGroupGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return LocalGroupGetResponse.parse_obj(obj) + + _obj = LocalGroupGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [LocalGroup.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/local_group_response_v_2_55.py b/pypureclient/flasharray/_common/models/local_group_response_v_2_55.py new file mode 100644 index 0000000000..2493752479 --- /dev/null +++ b/pypureclient/flasharray/_common/models/local_group_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.local_group_v_2_55 import LocalGroup + + +class LocalGroupResponse(BaseModel): + """ + LocalGroupResponse + """ + items: Optional[conlist(LocalGroup)] = Field(default=None, description="Displays a list of all items after filtering. The values are displayed for each name, if meaningful.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> LocalGroupResponse: + """Create an instance of LocalGroupResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> LocalGroupResponse: + """Create an instance of LocalGroupResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return LocalGroupResponse.parse_obj(obj) + + _obj = LocalGroupResponse.construct(_fields_set=None, **{ + "items": [LocalGroup.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/local_group_v_2_55.py b/pypureclient/flasharray/_common/models/local_group_v_2_55.py new file mode 100644 index 0000000000..b1dfef6c05 --- /dev/null +++ b/pypureclient/flasharray/_common/models/local_group_v_2_55.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType + + +class LocalGroup(BaseModel): + """ + LocalGroup + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + local_directory_service: Optional[FixedReferenceWithType] = Field(default=None, description="Reference to the local directory service the object belongs to.") + server: Optional[FixedReferenceWithType] = Field(default=None, description="Reference to the server the object belongs to. When the value is empty or set to `null` it means the object lives outside of a server scope.") + built_in: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the local group is built in. Returns a value of `false` if the group has been created manually.") + email: Optional[StrictStr] = Field(default=None, description="The email address of the local group.") + gid: Optional[StrictInt] = Field(default=None, description="The POSIX user ID of this object (group ID).") + name: Optional[StrictStr] = Field(default=None, description="The local group name.") + sid: Optional[StrictStr] = Field(default=None, description="The SID (Security Identifier) of the local group.") + __properties = ["context", "realms", "local_directory_service", "server", "built_in", "email", "gid", "name", "sid"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "realms", + "server", + "built_in", + "sid", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of local_directory_service + if _include_in_dict('local_directory_service', include_readonly, excluded_fields, none_fields): + _dict['local_directory_service'] = self.local_directory_service.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of server + if _include_in_dict('server', include_readonly, excluded_fields, none_fields): + _dict['server'] = self.server.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> LocalGroup: + """Create an instance of LocalGroup from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> LocalGroup: + """Create an instance of LocalGroup from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return LocalGroup.parse_obj(obj) + + _obj = LocalGroup.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "local_directory_service": FixedReferenceWithType.from_dict(obj.get("local_directory_service")) if obj.get("local_directory_service") is not None else None, + "server": FixedReferenceWithType.from_dict(obj.get("server")) if obj.get("server") is not None else None, + "built_in": obj.get("built_in"), + "email": obj.get("email"), + "gid": obj.get("gid"), + "name": obj.get("name"), + "sid": obj.get("sid") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/local_member_v_2_55.py b/pypureclient/flasharray/_common/models/local_member_v_2_55.py new file mode 100644 index 0000000000..e0d6aad6c2 --- /dev/null +++ b/pypureclient/flasharray/_common/models/local_member_v_2_55.py @@ -0,0 +1,158 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType + + +class LocalMember(BaseModel): + """ + LocalMember + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + local_directory_service: Optional[FixedReferenceWithType] = Field(default=None, description="Reference to the local directory service the object belongs to.") + server: Optional[FixedReferenceWithType] = Field(default=None, description="Reference to the server the object belongs to. When the value is empty or set to `null` it means the object lives outside of a server scope.") + group: Optional[FixedReferenceWithType] = Field(default=None, description="Reference to the group to which the member belongs.") + group_gid: Optional[StrictInt] = Field(default=None, description="GID of the group to which the member belongs.") + is_primary_group: Optional[StrictBool] = Field(default=None, description="When a membership of `member_type` has the value `User`, this specifies whether this membership is a primary-group mapping or not. In any other case, this field will be `false`.") + member: Optional[FixedReferenceWithType] = Field(default=None, description="Reference to the member of the group.") + member_id: Optional[StrictInt] = Field(default=None, description="GID if the `member_type` is `Group` and UID if the `member_type` is `User`.") + __properties = ["context", "realms", "local_directory_service", "server", "group", "group_gid", "is_primary_group", "member", "member_id"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "realms", + "server", + "is_primary_group", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of local_directory_service + if _include_in_dict('local_directory_service', include_readonly, excluded_fields, none_fields): + _dict['local_directory_service'] = self.local_directory_service.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of server + if _include_in_dict('server', include_readonly, excluded_fields, none_fields): + _dict['server'] = self.server.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of group + if _include_in_dict('group', include_readonly, excluded_fields, none_fields): + _dict['group'] = self.group.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of member + if _include_in_dict('member', include_readonly, excluded_fields, none_fields): + _dict['member'] = self.member.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> LocalMember: + """Create an instance of LocalMember from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> LocalMember: + """Create an instance of LocalMember from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return LocalMember.parse_obj(obj) + + _obj = LocalMember.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "local_directory_service": FixedReferenceWithType.from_dict(obj.get("local_directory_service")) if obj.get("local_directory_service") is not None else None, + "server": FixedReferenceWithType.from_dict(obj.get("server")) if obj.get("server") is not None else None, + "group": FixedReferenceWithType.from_dict(obj.get("group")) if obj.get("group") is not None else None, + "group_gid": obj.get("group_gid"), + "is_primary_group": obj.get("is_primary_group"), + "member": FixedReferenceWithType.from_dict(obj.get("member")) if obj.get("member") is not None else None, + "member_id": obj.get("member_id") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/local_membership_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/local_membership_get_response_v_2_55.py new file mode 100644 index 0000000000..8158401ed4 --- /dev/null +++ b/pypureclient/flasharray/_common/models/local_membership_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.local_member_v_2_55 import LocalMember + + +class LocalMembershipGetResponse(BaseModel): + """ + LocalMembershipGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(LocalMember)] = Field(default=None, description="Displays a list of all items after filtering. The values are displayed for each name, if meaningful.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> LocalMembershipGetResponse: + """Create an instance of LocalMembershipGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> LocalMembershipGetResponse: + """Create an instance of LocalMembershipGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return LocalMembershipGetResponse.parse_obj(obj) + + _obj = LocalMembershipGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [LocalMember.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/local_membership_response_v_2_55.py b/pypureclient/flasharray/_common/models/local_membership_response_v_2_55.py new file mode 100644 index 0000000000..929f110a9b --- /dev/null +++ b/pypureclient/flasharray/_common/models/local_membership_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.local_member_v_2_55 import LocalMember + + +class LocalMembershipResponse(BaseModel): + """ + LocalMembershipResponse + """ + items: Optional[conlist(LocalMember)] = Field(default=None, description="Displays a list of all items after filtering. The values are displayed for each name, if meaningful.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> LocalMembershipResponse: + """Create an instance of LocalMembershipResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> LocalMembershipResponse: + """Create an instance of LocalMembershipResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return LocalMembershipResponse.parse_obj(obj) + + _obj = LocalMembershipResponse.construct(_fields_set=None, **{ + "items": [LocalMember.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/local_user_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/local_user_get_response_v_2_55.py new file mode 100644 index 0000000000..a77d4a74b3 --- /dev/null +++ b/pypureclient/flasharray/_common/models/local_user_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.local_user_v_2_55 import LocalUser + + +class LocalUserGetResponse(BaseModel): + """ + LocalUserGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(LocalUser)] = Field(default=None, description="Displays a list of all items after filtering. The values are displayed for each name, if meaningful.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> LocalUserGetResponse: + """Create an instance of LocalUserGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> LocalUserGetResponse: + """Create an instance of LocalUserGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return LocalUserGetResponse.parse_obj(obj) + + _obj = LocalUserGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [LocalUser.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/local_user_response_v_2_55.py b/pypureclient/flasharray/_common/models/local_user_response_v_2_55.py new file mode 100644 index 0000000000..fd4b666a6d --- /dev/null +++ b/pypureclient/flasharray/_common/models/local_user_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.local_user_v_2_55 import LocalUser + + +class LocalUserResponse(BaseModel): + """ + LocalUserResponse + """ + items: Optional[conlist(LocalUser)] = Field(default=None, description="Displays a list of all items after filtering. The values are displayed for each name, if meaningful.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> LocalUserResponse: + """Create an instance of LocalUserResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> LocalUserResponse: + """Create an instance of LocalUserResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return LocalUserResponse.parse_obj(obj) + + _obj = LocalUserResponse.construct(_fields_set=None, **{ + "items": [LocalUser.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/local_user_v_2_55.py b/pypureclient/flasharray/_common/models/local_user_v_2_55.py new file mode 100644 index 0000000000..c679d885ea --- /dev/null +++ b/pypureclient/flasharray/_common/models/local_user_v_2_55.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.reference_with_type_v_2_54 import ReferenceWithType + + +class LocalUser(BaseModel): + """ + LocalUser + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + local_directory_service: Optional[FixedReferenceWithType] = Field(default=None, description="Reference to the local directory service the object belongs to.") + server: Optional[FixedReferenceWithType] = Field(default=None, description="Reference to the server the object belongs to. When the value is empty or set to `null` it means the object lives outside of a server scope.") + built_in: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the local user is built in. Otherwise returns a value of `false` if the user has been created manually.") + email: Optional[StrictStr] = Field(default=None, description="The email address of the local user.") + enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the local user is enabled.") + name: Optional[StrictStr] = Field(default=None, description="The name of the local user.") + primary_group: Optional[ReferenceWithType] = Field(default=None, description="Primary group of the local user.") + sid: Optional[StrictStr] = Field(default=None, description="The SID (Security Identifier) of the local user.") + uid: Optional[StrictInt] = Field(default=None, description="The POSIX user ID of this object (user ID).") + __properties = ["context", "realms", "local_directory_service", "server", "built_in", "email", "enabled", "name", "primary_group", "sid", "uid"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "realms", + "server", + "built_in", + "sid", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of local_directory_service + if _include_in_dict('local_directory_service', include_readonly, excluded_fields, none_fields): + _dict['local_directory_service'] = self.local_directory_service.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of server + if _include_in_dict('server', include_readonly, excluded_fields, none_fields): + _dict['server'] = self.server.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of primary_group + if _include_in_dict('primary_group', include_readonly, excluded_fields, none_fields): + _dict['primary_group'] = self.primary_group.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> LocalUser: + """Create an instance of LocalUser from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> LocalUser: + """Create an instance of LocalUser from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return LocalUser.parse_obj(obj) + + _obj = LocalUser.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "local_directory_service": FixedReferenceWithType.from_dict(obj.get("local_directory_service")) if obj.get("local_directory_service") is not None else None, + "server": FixedReferenceWithType.from_dict(obj.get("server")) if obj.get("server") is not None else None, + "built_in": obj.get("built_in"), + "email": obj.get("email"), + "enabled": obj.get("enabled"), + "name": obj.get("name"), + "primary_group": ReferenceWithType.from_dict(obj.get("primary_group")) if obj.get("primary_group") is not None else None, + "sid": obj.get("sid"), + "uid": obj.get("uid") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/network_interface_eth_v_2_55.py b/pypureclient/flasharray/_common/models/network_interface_eth_v_2_55.py new file mode 100644 index 0000000000..b5a95d1c18 --- /dev/null +++ b/pypureclient/flasharray/_common/models/network_interface_eth_v_2_55.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.array_availability_v_2_55 import ArrayAvailability +from pypureclient.flasharray._common.models.fixed_reference_no_id_v_2_0 import FixedReferenceNoId +from pypureclient.flasharray._common.models.reference_no_id_v_2_0 import ReferenceNoId +from pypureclient.flasharray._common.models.reference_with_type_v_2_54 import ReferenceWithType + + +class NetworkInterfaceEth(BaseModel): + """ + Ethernet network interface properties. + """ + address: Optional[StrictStr] = Field(default=None, description="The IPv4 or IPv6 address to be associated with the specified network interface.") + array_availability: Optional[conlist(ArrayAvailability)] = Field(default=None, description="The status of the `interface` on `arrays` where the `interface` can reside. This is applicable only to `file virtual interfaces`.") + gateway: Optional[StrictStr] = Field(default=None, description="The IPv4 or IPv6 address of the gateway through which the specified network interface is to communicate with the network.") + mac_address: Optional[StrictStr] = Field(default=None, description="The media access control address associated with the specified network interface.") + mtu: Optional[StrictInt] = Field(default=None, description="The maximum message transfer unit (packet) size for the `network interface`, in `bytes`. The `MTU` setting cannot exceed the `MTU` of the corresponding `physical interface`.") + netmask: Optional[StrictStr] = Field(default=None, description="The `netmask` of the specified `network interface` that, when combined with the `address` of the `interface`, determines the `network address` of the `interface`.") + preferred_arrays: Optional[conlist(ReferenceWithType, max_items=1)] = Field(default=None, description="The list of `arrays` which are preferred by the specified `network interface`.") + remediation_mode: Optional[StrictStr] = Field(default=None, description="The remediation mode of the specified network interface.") + subinterfaces: Optional[conlist(FixedReferenceNoId)] = Field(default=None, description="The list of `network interfaces` configured to be a `subinterface` of the specified `network interface`.") + subnet: Optional[ReferenceNoId] = Field(default=None, description="The `subnet` that is associated with the specified `network interface`.") + subtype: Optional[StrictStr] = Field(default=None, description="The subtype of the specified network interface. Only interfaces of subtype `virtual` can be created. Configurable on POST only. Valid values are `failover_bond`, `lacp_bond`, `physical`, and `virtual`.") + vlan: Optional[StrictInt] = Field(default=None, description="VLAN ID") + __properties = ["address", "array_availability", "gateway", "mac_address", "mtu", "netmask", "preferred_arrays", "remediation_mode", "subinterfaces", "subnet", "subtype", "vlan"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "mac_address", + "vlan", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in array_availability (list) + if _include_in_dict('array_availability', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.array_availability: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['array_availability'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in preferred_arrays (list) + if _include_in_dict('preferred_arrays', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.preferred_arrays: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['preferred_arrays'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in subinterfaces (list) + if _include_in_dict('subinterfaces', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.subinterfaces: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['subinterfaces'] = _items + # override the default output from pydantic by calling `to_dict()` of subnet + if _include_in_dict('subnet', include_readonly, excluded_fields, none_fields): + _dict['subnet'] = self.subnet.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> NetworkInterfaceEth: + """Create an instance of NetworkInterfaceEth from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> NetworkInterfaceEth: + """Create an instance of NetworkInterfaceEth from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return NetworkInterfaceEth.parse_obj(obj) + + _obj = NetworkInterfaceEth.construct(_fields_set=None, **{ + "address": obj.get("address"), + "array_availability": [ArrayAvailability.from_dict(_item) for _item in obj.get("array_availability")] if obj.get("array_availability") is not None else None, + "gateway": obj.get("gateway"), + "mac_address": obj.get("mac_address"), + "mtu": obj.get("mtu"), + "netmask": obj.get("netmask"), + "preferred_arrays": [ReferenceWithType.from_dict(_item) for _item in obj.get("preferred_arrays")] if obj.get("preferred_arrays") is not None else None, + "remediation_mode": obj.get("remediation_mode"), + "subinterfaces": [FixedReferenceNoId.from_dict(_item) for _item in obj.get("subinterfaces")] if obj.get("subinterfaces") is not None else None, + "subnet": ReferenceNoId.from_dict(obj.get("subnet")) if obj.get("subnet") is not None else None, + "subtype": obj.get("subtype"), + "vlan": obj.get("vlan") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/network_interface_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/network_interface_get_response_v_2_55.py new file mode 100644 index 0000000000..c1d8895d2b --- /dev/null +++ b/pypureclient/flasharray/_common/models/network_interface_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.network_interface_v_2_55 import NetworkInterface + + +class NetworkInterfaceGetResponse(BaseModel): + """ + NetworkInterfaceGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(NetworkInterface)] = None + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> NetworkInterfaceGetResponse: + """Create an instance of NetworkInterfaceGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> NetworkInterfaceGetResponse: + """Create an instance of NetworkInterfaceGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return NetworkInterfaceGetResponse.parse_obj(obj) + + _obj = NetworkInterfaceGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [NetworkInterface.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/network_interface_patch_v_2_55.py b/pypureclient/flasharray/_common/models/network_interface_patch_v_2_55.py new file mode 100644 index 0000000000..2951836ae5 --- /dev/null +++ b/pypureclient/flasharray/_common/models/network_interface_patch_v_2_55.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist +from pypureclient.flasharray._common.models.networkinterfacepatch_eth_v_2_55 import NetworkinterfacepatchEth +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference + + +class NetworkInterfacePatch(BaseModel): + """ + NetworkInterfacePatch + """ + attached_servers: Optional[conlist(Reference, max_items=1)] = Field(default=None, description="Applicable only to Ethernet interfaces. List of servers to be associated with the specified network interface for data ingress. At most one server can be specified for each interface. To attach the network interface to a server, `name` or `id` the desired server must be provided. To detach a network interface from all servers, an empty list `[]` should be passed to the `attached_servers` field.") + enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the specified network interface or Fibre Channel port is enabled. Returns a value of `false` if the specified network interface or Fibre Channel port is disabled.") + eth: Optional[NetworkinterfacepatchEth] = None + override_npiv_check: Optional[StrictBool] = Field(default=None, description="N-Port ID Virtualization (NPIV) requires a balanced configuration of Fibre Channel ports configured for SCSI on both controllers. Enabling or Disabling a Fibre Channel port configured for SCSI might cause the NPIV status to change from enabled to disabled or vice versa. Set this option to proceed with enabling or disabling the port.") + services: Optional[conlist(StrictStr)] = Field(default=None, description="The services provided by the specified network interface or Fibre Channel port.") + __properties = ["attached_servers", "enabled", "eth", "override_npiv_check", "services"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in attached_servers (list) + if _include_in_dict('attached_servers', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.attached_servers: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['attached_servers'] = _items + # override the default output from pydantic by calling `to_dict()` of eth + if _include_in_dict('eth', include_readonly, excluded_fields, none_fields): + _dict['eth'] = self.eth.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> NetworkInterfacePatch: + """Create an instance of NetworkInterfacePatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> NetworkInterfacePatch: + """Create an instance of NetworkInterfacePatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return NetworkInterfacePatch.parse_obj(obj) + + _obj = NetworkInterfacePatch.construct(_fields_set=None, **{ + "attached_servers": [Reference.from_dict(_item) for _item in obj.get("attached_servers")] if obj.get("attached_servers") is not None else None, + "enabled": obj.get("enabled"), + "eth": NetworkinterfacepatchEth.from_dict(obj.get("eth")) if obj.get("eth") is not None else None, + "override_npiv_check": obj.get("override_npiv_check"), + "services": obj.get("services") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/network_interface_post_v_2_55.py b/pypureclient/flasharray/_common/models/network_interface_post_v_2_55.py new file mode 100644 index 0000000000..218b8c0523 --- /dev/null +++ b/pypureclient/flasharray/_common/models/network_interface_post_v_2_55.py @@ -0,0 +1,134 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr, conlist +from pypureclient.flasharray._common.models.networkinterfacepost_eth_v_2_55 import NetworkinterfacepostEth +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference + + +class NetworkInterfacePost(BaseModel): + """ + NetworkInterfacePost + """ + name: Optional[StrictStr] = Field(default=None, description="A locally unique, system-generated name. The name cannot be modified.") + attached_servers: Optional[conlist(Reference, max_items=1)] = Field(default=None, description="Applies only to Ethernet interfaces. The list of servers to be associated with the specified network interface for data ingress. At most one server can be specified for each interface. To attach the network interface to a server, the name or id of the desired server must be provided. If not specified and the interface is created at the array level, defaults to the _array_server instance. If not specified and the interface is created within a server, defaults to that server. To create a network interface that is not attached to any server, specify an empty list [].") + eth: Optional[NetworkinterfacepostEth] = None + services: Optional[conlist(StrictStr)] = Field(default=None, description="The services provided by the specified network interface or Fibre Channel port.") + __properties = ["name", "attached_servers", "eth", "services"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "name", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in attached_servers (list) + if _include_in_dict('attached_servers', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.attached_servers: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['attached_servers'] = _items + # override the default output from pydantic by calling `to_dict()` of eth + if _include_in_dict('eth', include_readonly, excluded_fields, none_fields): + _dict['eth'] = self.eth.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> NetworkInterfacePost: + """Create an instance of NetworkInterfacePost from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> NetworkInterfacePost: + """Create an instance of NetworkInterfacePost from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return NetworkInterfacePost.parse_obj(obj) + + _obj = NetworkInterfacePost.construct(_fields_set=None, **{ + "name": obj.get("name"), + "attached_servers": [Reference.from_dict(_item) for _item in obj.get("attached_servers")] if obj.get("attached_servers") is not None else None, + "eth": NetworkinterfacepostEth.from_dict(obj.get("eth")) if obj.get("eth") is not None else None, + "services": obj.get("services") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/network_interface_response_v_2_55.py b/pypureclient/flasharray/_common/models/network_interface_response_v_2_55.py new file mode 100644 index 0000000000..101cfb264a --- /dev/null +++ b/pypureclient/flasharray/_common/models/network_interface_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, conlist +from pypureclient.flasharray._common.models.network_interface_v_2_55 import NetworkInterface + + +class NetworkInterfaceResponse(BaseModel): + """ + NetworkInterfaceResponse + """ + items: Optional[conlist(NetworkInterface)] = None + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> NetworkInterfaceResponse: + """Create an instance of NetworkInterfaceResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> NetworkInterfaceResponse: + """Create an instance of NetworkInterfaceResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return NetworkInterfaceResponse.parse_obj(obj) + + _obj = NetworkInterfaceResponse.construct(_fields_set=None, **{ + "items": [NetworkInterface.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/network_interface_v_2_55.py b/pypureclient/flasharray/_common/models/network_interface_v_2_55.py new file mode 100644 index 0000000000..9e675af848 --- /dev/null +++ b/pypureclient/flasharray/_common/models/network_interface_v_2_55.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.network_interface_eth_v_2_55 import NetworkInterfaceEth +from pypureclient.flasharray._common.models.network_interface_fc_v_2_4 import NetworkInterfaceFc + + +class NetworkInterface(BaseModel): + """ + NetworkInterface + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + name: Optional[StrictStr] = Field(default=None, description="A locally unique, system-generated name. The name cannot be modified.") + server: Optional[FixedReferenceWithType] = Field(default=None, description="Reference to the server the object belongs to. When the value is empty or set to `null` it means the object lives outside of a server scope.") + attached_servers: Optional[conlist(FixedReferenceWithType, max_items=1)] = Field(default=None, description="List of servers associated with the specified network interface for data ingress.") + enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the specified network interface or Fibre Channel port is enabled. Returns a value of `false` if the specified network interface or Fibre Channel port is disabled.") + eth: Optional[NetworkInterfaceEth] = None + fc: Optional[NetworkInterfaceFc] = None + interface_type: Optional[StrictStr] = Field(default=None, description="The interface type. Valid values are `eth` and `fc`.") + services: Optional[conlist(StrictStr)] = Field(default=None, description="The services provided by the specified network interface or Fibre Channel port.") + speed: Optional[StrictInt] = Field(default=None, description="Configured speed of the specified network interface or Fibre Channel port (in Gb/s). Typically this is the maximum speed of the port or bond represented by the network interface.") + __properties = ["context", "realms", "name", "server", "attached_servers", "enabled", "eth", "fc", "interface_type", "services", "speed"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "realms", + "name", + "server", + "enabled", + "interface_type", + "services", + "speed", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of server + if _include_in_dict('server', include_readonly, excluded_fields, none_fields): + _dict['server'] = self.server.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in attached_servers (list) + if _include_in_dict('attached_servers', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.attached_servers: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['attached_servers'] = _items + # override the default output from pydantic by calling `to_dict()` of eth + if _include_in_dict('eth', include_readonly, excluded_fields, none_fields): + _dict['eth'] = self.eth.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of fc + if _include_in_dict('fc', include_readonly, excluded_fields, none_fields): + _dict['fc'] = self.fc.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> NetworkInterface: + """Create an instance of NetworkInterface from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> NetworkInterface: + """Create an instance of NetworkInterface from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return NetworkInterface.parse_obj(obj) + + _obj = NetworkInterface.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "name": obj.get("name"), + "server": FixedReferenceWithType.from_dict(obj.get("server")) if obj.get("server") is not None else None, + "attached_servers": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("attached_servers")] if obj.get("attached_servers") is not None else None, + "enabled": obj.get("enabled"), + "eth": NetworkInterfaceEth.from_dict(obj.get("eth")) if obj.get("eth") is not None else None, + "fc": NetworkInterfaceFc.from_dict(obj.get("fc")) if obj.get("fc") is not None else None, + "interface_type": obj.get("interface_type"), + "services": obj.get("services"), + "speed": obj.get("speed") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/networkinterfacepatch_eth_v_2_55.py b/pypureclient/flasharray/_common/models/networkinterfacepatch_eth_v_2_55.py new file mode 100644 index 0000000000..7acdb6024e --- /dev/null +++ b/pypureclient/flasharray/_common/models/networkinterfacepatch_eth_v_2_55.py @@ -0,0 +1,166 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.reference_no_id_v_2_0 import ReferenceNoId + + +class NetworkinterfacepatchEth(BaseModel): + """ + Ethernet network interface properties. + """ + add_subinterfaces: Optional[conlist(ReferenceNoId)] = Field(default=None, description="The `child devices` to be added to the specified `bond interface`.") + address: Optional[StrictStr] = Field(default=None, description="The IPv4 or IPv6 address to be associated with the specified network interface.") + gateway: Optional[StrictStr] = Field(default=None, description="The IPv4 or IPv6 address of the gateway through which the specified network interface is to communicate with the network.") + mtu: Optional[StrictInt] = Field(default=None, description="The maximum message transfer unit (packet) size for the `network interface` in `bytes`. The `MTU` setting cannot exceed the `MTU` of the corresponding `physical interface`.") + netmask: Optional[StrictStr] = Field(default=None, description="The `netmask` of the specified `network interface` that, when combined with the `address` of the `interface`, determines the `network address` of the `interface`.") + preferred_arrays: Optional[conlist(Reference, max_items=1)] = Field(default=None, description="The list of `arrays` preferred by the specified `network interface`. This is applicable only to `file virtual interfaces`. Currently, at most one `array` can be specified for each `interface`. To specify an `array` as a preference for the `network interface`, the `name` or `id` of the desired `array` must be provided. An empty list `[]` for the `preferred_arrays` field implies no preference for the specified `network interface`.") + remediation_mode: Optional[StrictStr] = Field(default=None, description="The remediation mode of the specified `network interface`. This is applicable only to `file virtual interfaces`. The remediation mode can be either `auto` or `manual`. The remediation mode specifies the mode of migration to the `preferred_arrays`, if configured.") + remove_subinterfaces: Optional[conlist(ReferenceNoId)] = Field(default=None, description="The `child devices` to be removed from the specified `bond interface`.") + subinterfaces: Optional[conlist(ReferenceNoId)] = Field(default=None, description="The `child devices` to be added to the specified `bond interface`.") + subnet: Optional[ReferenceNoId] = Field(default=None, description="The `subnet` that is associated with the specified `network interface`.") + __properties = ["add_subinterfaces", "address", "gateway", "mtu", "netmask", "preferred_arrays", "remediation_mode", "remove_subinterfaces", "subinterfaces", "subnet"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in add_subinterfaces (list) + if _include_in_dict('add_subinterfaces', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.add_subinterfaces: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['add_subinterfaces'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in preferred_arrays (list) + if _include_in_dict('preferred_arrays', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.preferred_arrays: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['preferred_arrays'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in remove_subinterfaces (list) + if _include_in_dict('remove_subinterfaces', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.remove_subinterfaces: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['remove_subinterfaces'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in subinterfaces (list) + if _include_in_dict('subinterfaces', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.subinterfaces: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['subinterfaces'] = _items + # override the default output from pydantic by calling `to_dict()` of subnet + if _include_in_dict('subnet', include_readonly, excluded_fields, none_fields): + _dict['subnet'] = self.subnet.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> NetworkinterfacepatchEth: + """Create an instance of NetworkinterfacepatchEth from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> NetworkinterfacepatchEth: + """Create an instance of NetworkinterfacepatchEth from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return NetworkinterfacepatchEth.parse_obj(obj) + + _obj = NetworkinterfacepatchEth.construct(_fields_set=None, **{ + "add_subinterfaces": [ReferenceNoId.from_dict(_item) for _item in obj.get("add_subinterfaces")] if obj.get("add_subinterfaces") is not None else None, + "address": obj.get("address"), + "gateway": obj.get("gateway"), + "mtu": obj.get("mtu"), + "netmask": obj.get("netmask"), + "preferred_arrays": [Reference.from_dict(_item) for _item in obj.get("preferred_arrays")] if obj.get("preferred_arrays") is not None else None, + "remediation_mode": obj.get("remediation_mode"), + "remove_subinterfaces": [ReferenceNoId.from_dict(_item) for _item in obj.get("remove_subinterfaces")] if obj.get("remove_subinterfaces") is not None else None, + "subinterfaces": [ReferenceNoId.from_dict(_item) for _item in obj.get("subinterfaces")] if obj.get("subinterfaces") is not None else None, + "subnet": ReferenceNoId.from_dict(obj.get("subnet")) if obj.get("subnet") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/networkinterfacepost_eth_v_2_55.py b/pypureclient/flasharray/_common/models/networkinterfacepost_eth_v_2_55.py new file mode 100644 index 0000000000..746a301830 --- /dev/null +++ b/pypureclient/flasharray/_common/models/networkinterfacepost_eth_v_2_55.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr, conlist +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.reference_no_id_v_2_0 import ReferenceNoId + + +class NetworkinterfacepostEth(BaseModel): + """ + Ethernet network interface properties. + """ + address: Optional[StrictStr] = Field(default=None, description="The IPv4 or IPv6 address to be associated with the specified network interface.") + preferred_arrays: Optional[conlist(Reference, max_items=1)] = Field(default=None, description="The list of `arrays` preferred by the specified `network interface`. This is applicable only to `file virtual interfaces`. Currently, at most one `array` can be specified for each `interface`. To specify an `array` as a preference for the `network interface`, the `name` or `id` of the desired `array` must be provided. An empty list `[]` for the `preferred_arrays` field implies no preference for the specified `network interface`. When the `preferred_arrays` field is not specified in the request, the `network interface` will not have any `preferred arrays`.") + remediation_mode: Optional[StrictStr] = Field(default=None, description="The remediation mode of the specified `network interface`. This is applicable only to `file virtual interfaces`. The remediation mode can be either `auto` or `manual`. The remediation mode specifies the mode of migration to the `preferred_arrays`, if configured. Defaults to `auto`.") + subinterfaces: Optional[conlist(ReferenceNoId)] = Field(default=None, description="The list of `network interfaces` configured to be a `subinterface` of the specified `network interface`.") + subnet: Optional[ReferenceNoId] = Field(default=None, description="The `subnet` that is associated with the specified `network interface`.") + subtype: Optional[StrictStr] = Field(default=None, description="The subtype of the specified network interface. Only interfaces of subtype `vif` and `lacp_bond` can be created. Configurable on POST only. Valid values are `failover_bond`, `lacp_bond`, `physical`, and `vif`. If the subtype is `vif`, the services parameter must not be set.") + __properties = ["address", "preferred_arrays", "remediation_mode", "subinterfaces", "subnet", "subtype"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in preferred_arrays (list) + if _include_in_dict('preferred_arrays', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.preferred_arrays: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['preferred_arrays'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in subinterfaces (list) + if _include_in_dict('subinterfaces', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.subinterfaces: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['subinterfaces'] = _items + # override the default output from pydantic by calling `to_dict()` of subnet + if _include_in_dict('subnet', include_readonly, excluded_fields, none_fields): + _dict['subnet'] = self.subnet.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> NetworkinterfacepostEth: + """Create an instance of NetworkinterfacepostEth from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> NetworkinterfacepostEth: + """Create an instance of NetworkinterfacepostEth from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return NetworkinterfacepostEth.parse_obj(obj) + + _obj = NetworkinterfacepostEth.construct(_fields_set=None, **{ + "address": obj.get("address"), + "preferred_arrays": [Reference.from_dict(_item) for _item in obj.get("preferred_arrays")] if obj.get("preferred_arrays") is not None else None, + "remediation_mode": obj.get("remediation_mode"), + "subinterfaces": [ReferenceNoId.from_dict(_item) for _item in obj.get("subinterfaces")] if obj.get("subinterfaces") is not None else None, + "subnet": ReferenceNoId.from_dict(obj.get("subnet")) if obj.get("subnet") is not None else None, + "subtype": obj.get("subtype") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/object_store_access_key_post_base_v_2_55.py b/pypureclient/flasharray/_common/models/object_store_access_key_post_base_v_2_55.py new file mode 100644 index 0000000000..6496b43cd3 --- /dev/null +++ b/pypureclient/flasharray/_common/models/object_store_access_key_post_base_v_2_55.py @@ -0,0 +1,119 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field +except ModuleNotFoundError: + from pydantic import BaseModel, Field +from pypureclient.flasharray._common.models.reference_with_fixed_type_v_2_55 import ReferenceWithFixedType + + +class ObjectStoreAccessKeyPostBase(BaseModel): + """ + ObjectStoreAccessKeyPostBase + """ + user: Optional[ReferenceWithFixedType] = Field(default=None, description="The user associated with the access key.") + __properties = ["user"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of user + if _include_in_dict('user', include_readonly, excluded_fields, none_fields): + _dict['user'] = self.user.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> ObjectStoreAccessKeyPostBase: + """Create an instance of ObjectStoreAccessKeyPostBase from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> ObjectStoreAccessKeyPostBase: + """Create an instance of ObjectStoreAccessKeyPostBase from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ObjectStoreAccessKeyPostBase.parse_obj(obj) + + _obj = ObjectStoreAccessKeyPostBase.construct(_fields_set=None, **{ + "user": ReferenceWithFixedType.from_dict(obj.get("user")) if obj.get("user") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/pod_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/pod_get_response_v_2_55.py new file mode 100644 index 0000000000..7e9e0d7ae2 --- /dev/null +++ b/pypureclient/flasharray/_common/models/pod_get_response_v_2_55.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.pod_v_2_55 import Pod + + +class PodGetResponse(BaseModel): + """ + PodGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(Pod)] = None + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + total: Optional[conlist(Pod)] = Field(default=None, description="The aggregate value of all items after filtering. When applicable, the average value is displayed instead. The values are displayed for each field, if meaningful.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors", "total"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in total (list) + if _include_in_dict('total', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.total: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['total'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PodGetResponse: + """Create an instance of PodGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PodGetResponse: + """Create an instance of PodGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PodGetResponse.parse_obj(obj) + + _obj = PodGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [Pod.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None, + "total": [Pod.from_dict(_item) for _item in obj.get("total")] if obj.get("total") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/pod_patch_v_2_55.py b/pypureclient/flasharray/_common/models/pod_patch_v_2_55.py new file mode 100644 index 0000000000..ceecddd659 --- /dev/null +++ b/pypureclient/flasharray/_common/models/pod_patch_v_2_55.py @@ -0,0 +1,142 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist +from pypureclient.flasharray._common.models.quota_limit_patch_v_2_52 import QuotaLimitPatch +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference + + +class PodPatch(BaseModel): + """ + PodPatch + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + quota_limit: Optional[QuotaLimitPatch] = None + destroyed: Optional[StrictBool] = Field(default=None, description="If set to `true`, the pod has been destroyed and is pending eradication. The `time_remaining` value displays the amount of time left until the destroyed pod is permanently eradicated. A pod can only be destroyed if it is empty, so before destroying a pod, ensure all volumes and protection groups inside the pod have been either moved out of the pod or destroyed. A stretched pod cannot be destroyed unless you unstretch it first. Before the `time_remaining` period has elapsed, the destroyed pod can be recovered by setting `destroyed=false`. Once the `time_remaining` period has elapsed, the pod is permanently eradicated and can no longer be recovered.") + failover_preferences: Optional[conlist(Reference)] = Field(default=None, description="Determines which array within a stretched pod should be given priority to stay online should the arrays ever lose contact with each other. The current array and any peer arrays that are connected to the current array for synchronous replication can be added to a pod for failover preference. By default, `failover_preferences=null`, meaning no arrays have been configured for failover preference. Enter multiple arrays in comma-separated format. For a pod in a stretched realm, the realm failover-preference takes precedence over the failover-preference of the pod.") + ignore_usage: Optional[StrictBool] = Field(default=None, description="Set to `true` to set a `quota_limit` that is lower than the existing usage. This ensures that no new volumes can be created until the existing usage drops below the `quota_limit`. If not specified, defaults to `false`.") + mediator: Optional[StrictStr] = Field(default=None, description="Sets the URL of the mediator for this pod, replacing the URL of the current mediator. By default, the Pure1 Cloud Mediator (`purestorage`) serves as the mediator. For a pod in a stretched realm, the realm mediator takes precedence over the mediator of the pod.") + requested_promotion_state: Optional[StrictStr] = Field(default=None, description="Patch `requested_promotion_state` to `demoted` to demote the pod so that it can be used as a link target for continuous replication between pods. Demoted pods do not accept write requests, and a destroyed version of the pod with `undo-demote` appended to the pod name is created on the array with the state of the pod when it was in the promoted state. Patch `requested_promotion_state` to `promoted` to start the process of promoting the pod. The `promotion_status` indicates when the pod has been successfully promoted. Promoted pods stop incorporating replicated data from the source pod and start accepting write requests. The replication process does not stop when the source pod continues replicating data to the pod. The space consumed by the unique replicated data is tracked by the `space.journal` field of the pod.") + __properties = ["id", "name", "quota_limit", "destroyed", "failover_preferences", "ignore_usage", "mediator", "requested_promotion_state"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of quota_limit + if _include_in_dict('quota_limit', include_readonly, excluded_fields, none_fields): + _dict['quota_limit'] = self.quota_limit.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in failover_preferences (list) + if _include_in_dict('failover_preferences', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.failover_preferences: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['failover_preferences'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PodPatch: + """Create an instance of PodPatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PodPatch: + """Create an instance of PodPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PodPatch.parse_obj(obj) + + _obj = PodPatch.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "quota_limit": QuotaLimitPatch.from_dict(obj.get("quota_limit")) if obj.get("quota_limit") is not None else None, + "destroyed": obj.get("destroyed"), + "failover_preferences": [Reference.from_dict(_item) for _item in obj.get("failover_preferences")] if obj.get("failover_preferences") is not None else None, + "ignore_usage": obj.get("ignore_usage"), + "mediator": obj.get("mediator"), + "requested_promotion_state": obj.get("requested_promotion_state") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/pod_performance_replication_by_array_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/pod_performance_replication_by_array_get_response_v_2_55.py new file mode 100644 index 0000000000..c2e5a7c5c2 --- /dev/null +++ b/pypureclient/flasharray/_common/models/pod_performance_replication_by_array_get_response_v_2_55.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.pod_performance_replication_by_array_v_2_55 import PodPerformanceReplicationByArray + + +class PodPerformanceReplicationByArrayGetResponse(BaseModel): + """ + PodPerformanceReplicationByArrayGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(PodPerformanceReplicationByArray)] = Field(default=None, description="A list of pod performance replication objects, arranged by array.") + total: Optional[conlist(PodPerformanceReplicationByArray)] = Field(default=None, description="The aggregate value of all items after filtering. When applicable, the average value is displayed instead. The values are displayed for each field if meaningful.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "total", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in total (list) + if _include_in_dict('total', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.total: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['total'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PodPerformanceReplicationByArrayGetResponse: + """Create an instance of PodPerformanceReplicationByArrayGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PodPerformanceReplicationByArrayGetResponse: + """Create an instance of PodPerformanceReplicationByArrayGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PodPerformanceReplicationByArrayGetResponse.parse_obj(obj) + + _obj = PodPerformanceReplicationByArrayGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [PodPerformanceReplicationByArray.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "total": [PodPerformanceReplicationByArray.from_dict(_item) for _item in obj.get("total")] if obj.get("total") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/pod_performance_replication_by_array_response_v_2_55.py b/pypureclient/flasharray/_common/models/pod_performance_replication_by_array_response_v_2_55.py new file mode 100644 index 0000000000..f3000a9b75 --- /dev/null +++ b/pypureclient/flasharray/_common/models/pod_performance_replication_by_array_response_v_2_55.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.pod_performance_replication_by_array_v_2_55 import PodPerformanceReplicationByArray + + +class PodPerformanceReplicationByArrayResponse(BaseModel): + """ + PodPerformanceReplicationByArrayResponse + """ + items: Optional[conlist(PodPerformanceReplicationByArray)] = Field(default=None, description="A list of pod performance replication objects, arranged by array.") + total: Optional[conlist(PodPerformanceReplicationByArray)] = Field(default=None, description="The aggregate value of all items after filtering. When applicable, the average value is displayed instead. The values are displayed for each field if meaningful.") + __properties = ["items", "total"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in total (list) + if _include_in_dict('total', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.total: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['total'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PodPerformanceReplicationByArrayResponse: + """Create an instance of PodPerformanceReplicationByArrayResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PodPerformanceReplicationByArrayResponse: + """Create an instance of PodPerformanceReplicationByArrayResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PodPerformanceReplicationByArrayResponse.parse_obj(obj) + + _obj = PodPerformanceReplicationByArrayResponse.construct(_fields_set=None, **{ + "items": [PodPerformanceReplicationByArray.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "total": [PodPerformanceReplicationByArray.from_dict(_item) for _item in obj.get("total")] if obj.get("total") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/pod_performance_replication_by_array_v_2_55.py b/pypureclient/flasharray/_common/models/pod_performance_replication_by_array_v_2_55.py new file mode 100644 index 0000000000..2cf7c4b6af --- /dev/null +++ b/pypureclient/flasharray/_common/models/pod_performance_replication_by_array_v_2_55.py @@ -0,0 +1,164 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictInt, conint +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictInt, conint +from pypureclient.flasharray._common.models.fixed_reference_v_2_49 import FixedReference +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.replication_performance_with_total_v_2_2 import ReplicationPerformanceWithTotal +from pypureclient.flasharray._common.models.resource_v_2_49 import Resource + + +class PodPerformanceReplicationByArray(BaseModel): + """ + PodPerformanceReplicationByArray + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + continuous_bytes_per_sec: Optional[ReplicationPerformanceWithTotal] = Field(default=None, description="The total number of `bytes` transmitted or received per second for continuous replication. The continuous replication feature is used for disaster recovery on FlashArray and provides a recovery point objective (RPO) of significantly less than 30 seconds.") + periodic_bytes_per_sec: Optional[ReplicationPerformanceWithTotal] = Field(default=None, description="The total number of `bytes` transmitted or received per second for periodic replication.") + resync_bytes_per_sec: Optional[ReplicationPerformanceWithTotal] = Field(default=None, description="The total number of `bytes` transmitted or received per second during resync replication. Resync replication is the mechanism to bring two `arrays` into sync. This may occur during an initial `pod` stretch, or, in the case of an outage, when two `arrays` reestablish connection. After the connection is restored, the `array` that was online starts replicating `pod` data to its peer `array` until the `pod` is once again in sync.") + sync_bytes_per_sec: Optional[ReplicationPerformanceWithTotal] = Field(default=None, description="The total number of `bytes` transmitted or received per second for synchronous replication.") + time: Optional[StrictInt] = Field(default=None, description="The sample time recorded in `milliseconds` since the UNIX epoch.") + total_bytes_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The total number of `bytes` transmitted and received per second for all types of replication.") + pod: Optional[FixedReference] = Field(default=None, description="Reference to the pod that the performance data is associated with.") + array: Optional[Resource] = Field(default=None, description="Array that shares this pod.") + member: Optional[FixedReferenceWithType] = Field(default=None, description="The member that shares this pod.") + __properties = ["context", "continuous_bytes_per_sec", "periodic_bytes_per_sec", "resync_bytes_per_sec", "sync_bytes_per_sec", "time", "total_bytes_per_sec", "pod", "array", "member"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "time", + "total_bytes_per_sec", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of continuous_bytes_per_sec + if _include_in_dict('continuous_bytes_per_sec', include_readonly, excluded_fields, none_fields): + _dict['continuous_bytes_per_sec'] = self.continuous_bytes_per_sec.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of periodic_bytes_per_sec + if _include_in_dict('periodic_bytes_per_sec', include_readonly, excluded_fields, none_fields): + _dict['periodic_bytes_per_sec'] = self.periodic_bytes_per_sec.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of resync_bytes_per_sec + if _include_in_dict('resync_bytes_per_sec', include_readonly, excluded_fields, none_fields): + _dict['resync_bytes_per_sec'] = self.resync_bytes_per_sec.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of sync_bytes_per_sec + if _include_in_dict('sync_bytes_per_sec', include_readonly, excluded_fields, none_fields): + _dict['sync_bytes_per_sec'] = self.sync_bytes_per_sec.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of pod + if _include_in_dict('pod', include_readonly, excluded_fields, none_fields): + _dict['pod'] = self.pod.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of array + if _include_in_dict('array', include_readonly, excluded_fields, none_fields): + _dict['array'] = self.array.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of member + if _include_in_dict('member', include_readonly, excluded_fields, none_fields): + _dict['member'] = self.member.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PodPerformanceReplicationByArray: + """Create an instance of PodPerformanceReplicationByArray from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PodPerformanceReplicationByArray: + """Create an instance of PodPerformanceReplicationByArray from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PodPerformanceReplicationByArray.parse_obj(obj) + + _obj = PodPerformanceReplicationByArray.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "continuous_bytes_per_sec": ReplicationPerformanceWithTotal.from_dict(obj.get("continuous_bytes_per_sec")) if obj.get("continuous_bytes_per_sec") is not None else None, + "periodic_bytes_per_sec": ReplicationPerformanceWithTotal.from_dict(obj.get("periodic_bytes_per_sec")) if obj.get("periodic_bytes_per_sec") is not None else None, + "resync_bytes_per_sec": ReplicationPerformanceWithTotal.from_dict(obj.get("resync_bytes_per_sec")) if obj.get("resync_bytes_per_sec") is not None else None, + "sync_bytes_per_sec": ReplicationPerformanceWithTotal.from_dict(obj.get("sync_bytes_per_sec")) if obj.get("sync_bytes_per_sec") is not None else None, + "time": obj.get("time"), + "total_bytes_per_sec": obj.get("total_bytes_per_sec"), + "pod": FixedReference.from_dict(obj.get("pod")) if obj.get("pod") is not None else None, + "array": Resource.from_dict(obj.get("array")) if obj.get("array") is not None else None, + "member": FixedReferenceWithType.from_dict(obj.get("member")) if obj.get("member") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/pod_performance_replication_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/pod_performance_replication_get_response_v_2_55.py new file mode 100644 index 0000000000..9b39c9aaa7 --- /dev/null +++ b/pypureclient/flasharray/_common/models/pod_performance_replication_get_response_v_2_55.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.pod_performance_replication_v_2_55 import PodPerformanceReplication + + +class PodPerformanceReplicationGetResponse(BaseModel): + """ + PodPerformanceReplicationGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(PodPerformanceReplication)] = Field(default=None, description="A list of pod performance replication objects.") + total: Optional[conlist(PodPerformanceReplication)] = Field(default=None, description="The aggregate value of all items after filtering. For real-time performance, the values are aggregated for the latest timestamp. For historical performance, the values are aggregated for each timestamp from `start_time` to `end_time`. When applicable, the average value is displayed instead. The values are displayed for each field if meaningful.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "total", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in total (list) + if _include_in_dict('total', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.total: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['total'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PodPerformanceReplicationGetResponse: + """Create an instance of PodPerformanceReplicationGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PodPerformanceReplicationGetResponse: + """Create an instance of PodPerformanceReplicationGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PodPerformanceReplicationGetResponse.parse_obj(obj) + + _obj = PodPerformanceReplicationGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [PodPerformanceReplication.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "total": [PodPerformanceReplication.from_dict(_item) for _item in obj.get("total")] if obj.get("total") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/pod_performance_replication_response_v_2_55.py b/pypureclient/flasharray/_common/models/pod_performance_replication_response_v_2_55.py new file mode 100644 index 0000000000..9d280fdc16 --- /dev/null +++ b/pypureclient/flasharray/_common/models/pod_performance_replication_response_v_2_55.py @@ -0,0 +1,132 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.pod_performance_replication_v_2_55 import PodPerformanceReplication + + +class PodPerformanceReplicationResponse(BaseModel): + """ + PodPerformanceReplicationResponse + """ + items: Optional[conlist(PodPerformanceReplication)] = Field(default=None, description="A list of pod performance replication objects.") + total: Optional[conlist(PodPerformanceReplication)] = Field(default=None, description="The aggregate value of all items after filtering. For real-time performance, the values are aggregated for the latest timestamp. For historical performance, the values are aggregated for each timestamp from `start_time` to `end_time`. When applicable, the average value is displayed instead. The values are displayed for each field if meaningful.") + __properties = ["items", "total"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in total (list) + if _include_in_dict('total', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.total: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['total'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PodPerformanceReplicationResponse: + """Create an instance of PodPerformanceReplicationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PodPerformanceReplicationResponse: + """Create an instance of PodPerformanceReplicationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PodPerformanceReplicationResponse.parse_obj(obj) + + _obj = PodPerformanceReplicationResponse.construct(_fields_set=None, **{ + "items": [PodPerformanceReplication.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "total": [PodPerformanceReplication.from_dict(_item) for _item in obj.get("total")] if obj.get("total") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/pod_performance_replication_v_2_55.py b/pypureclient/flasharray/_common/models/pod_performance_replication_v_2_55.py new file mode 100644 index 0000000000..13df766d49 --- /dev/null +++ b/pypureclient/flasharray/_common/models/pod_performance_replication_v_2_55.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictInt, conint +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictInt, conint +from pypureclient.flasharray._common.models.fixed_reference_v_2_49 import FixedReference +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.replication_performance_with_total_v_2_2 import ReplicationPerformanceWithTotal + + +class PodPerformanceReplication(BaseModel): + """ + PodPerformanceReplication + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + continuous_bytes_per_sec: Optional[ReplicationPerformanceWithTotal] = Field(default=None, description="The total number of `bytes` transmitted or received per second for continuous replication. The continuous replication feature is used for disaster recovery on FlashArray and provides a recovery point objective (RPO) of significantly less than 30 seconds.") + periodic_bytes_per_sec: Optional[ReplicationPerformanceWithTotal] = Field(default=None, description="The total number of `bytes` transmitted or received per second for periodic replication.") + resync_bytes_per_sec: Optional[ReplicationPerformanceWithTotal] = Field(default=None, description="The total number of `bytes` transmitted or received per second during resync replication. Resync replication is the mechanism to bring two `arrays` into sync. This may occur during an initial `pod` stretch, or, in the case of an outage, when two `arrays` reestablish connection. After the connection is restored, the `array` that was online starts replicating `pod` data to its peer `array` until the `pod` is once again in sync.") + sync_bytes_per_sec: Optional[ReplicationPerformanceWithTotal] = Field(default=None, description="The total number of `bytes` transmitted or received per second for synchronous replication.") + time: Optional[StrictInt] = Field(default=None, description="The sample time recorded in `milliseconds` since the UNIX epoch.") + total_bytes_per_sec: Optional[conint(strict=True, ge=0)] = Field(default=None, description="The total number of `bytes` transmitted and received per second for all types of replication.") + pod: Optional[FixedReference] = Field(default=None, description="Reference to the pod that the performance data is associated with.") + __properties = ["context", "continuous_bytes_per_sec", "periodic_bytes_per_sec", "resync_bytes_per_sec", "sync_bytes_per_sec", "time", "total_bytes_per_sec", "pod"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "time", + "total_bytes_per_sec", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of continuous_bytes_per_sec + if _include_in_dict('continuous_bytes_per_sec', include_readonly, excluded_fields, none_fields): + _dict['continuous_bytes_per_sec'] = self.continuous_bytes_per_sec.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of periodic_bytes_per_sec + if _include_in_dict('periodic_bytes_per_sec', include_readonly, excluded_fields, none_fields): + _dict['periodic_bytes_per_sec'] = self.periodic_bytes_per_sec.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of resync_bytes_per_sec + if _include_in_dict('resync_bytes_per_sec', include_readonly, excluded_fields, none_fields): + _dict['resync_bytes_per_sec'] = self.resync_bytes_per_sec.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of sync_bytes_per_sec + if _include_in_dict('sync_bytes_per_sec', include_readonly, excluded_fields, none_fields): + _dict['sync_bytes_per_sec'] = self.sync_bytes_per_sec.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of pod + if _include_in_dict('pod', include_readonly, excluded_fields, none_fields): + _dict['pod'] = self.pod.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PodPerformanceReplication: + """Create an instance of PodPerformanceReplication from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PodPerformanceReplication: + """Create an instance of PodPerformanceReplication from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PodPerformanceReplication.parse_obj(obj) + + _obj = PodPerformanceReplication.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "continuous_bytes_per_sec": ReplicationPerformanceWithTotal.from_dict(obj.get("continuous_bytes_per_sec")) if obj.get("continuous_bytes_per_sec") is not None else None, + "periodic_bytes_per_sec": ReplicationPerformanceWithTotal.from_dict(obj.get("periodic_bytes_per_sec")) if obj.get("periodic_bytes_per_sec") is not None else None, + "resync_bytes_per_sec": ReplicationPerformanceWithTotal.from_dict(obj.get("resync_bytes_per_sec")) if obj.get("resync_bytes_per_sec") is not None else None, + "sync_bytes_per_sec": ReplicationPerformanceWithTotal.from_dict(obj.get("sync_bytes_per_sec")) if obj.get("sync_bytes_per_sec") is not None else None, + "time": obj.get("time"), + "total_bytes_per_sec": obj.get("total_bytes_per_sec"), + "pod": FixedReference.from_dict(obj.get("pod")) if obj.get("pod") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/pod_post_v_2_55.py b/pypureclient/flasharray/_common/models/pod_post_v_2_55.py new file mode 100644 index 0000000000..5df01ef322 --- /dev/null +++ b/pypureclient/flasharray/_common/models/pod_post_v_2_55.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr, conint, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr, conint, conlist +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.tag_v_2_50 import Tag + + +class PodPost(BaseModel): + """ + PodPost + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A locally unique, system-generated name. The name cannot be modified.") + failover_preferences: Optional[conlist(Reference)] = Field(default=None, description="Determines which array or realm within a stretched pod should be given priority to stay online should the arrays or realms ever lose contact with each other. The current array, current realm, and any peer arrays or realms that are connected to the current array or realm for synchronous replication can be added to a pod for failover preference. For a pod in a stretched realm, the realm failover-preference takes precedence over the failover-preference of the pod. By default, `failover_preferences=null`, meaning no arrays or realms have been configured for failover preference. Enter multiple arrays or realms in comma-separated format. To clear the list of failover preferences, set to an empty list [].") + quota_limit: Optional[conint(strict=True, le=4503599627370496, ge=1048576)] = Field(default=None, description="The logical quota limit of the pod, measured in bytes. Must be a multiple of 512.") + source: Optional[Reference] = Field(default=None, description="The source pod from where data is cloned to create the new pod.") + tags: Optional[conlist(Tag)] = Field(default=None, description="The list of tags to be upserted with the object.") + __properties = ["id", "name", "failover_preferences", "quota_limit", "source", "tags"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "name", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in failover_preferences (list) + if _include_in_dict('failover_preferences', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.failover_preferences: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['failover_preferences'] = _items + # override the default output from pydantic by calling `to_dict()` of source + if _include_in_dict('source', include_readonly, excluded_fields, none_fields): + _dict['source'] = self.source.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in tags (list) + if _include_in_dict('tags', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.tags: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['tags'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PodPost: + """Create an instance of PodPost from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PodPost: + """Create an instance of PodPost from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PodPost.parse_obj(obj) + + _obj = PodPost.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "failover_preferences": [Reference.from_dict(_item) for _item in obj.get("failover_preferences")] if obj.get("failover_preferences") is not None else None, + "quota_limit": obj.get("quota_limit"), + "source": Reference.from_dict(obj.get("source")) if obj.get("source") is not None else None, + "tags": [Tag.from_dict(_item) for _item in obj.get("tags")] if obj.get("tags") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/pod_response_v_2_55.py b/pypureclient/flasharray/_common/models/pod_response_v_2_55.py new file mode 100644 index 0000000000..368b25d0f8 --- /dev/null +++ b/pypureclient/flasharray/_common/models/pod_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, conlist +from pypureclient.flasharray._common.models.pod_v_2_55 import Pod + + +class PodResponse(BaseModel): + """ + PodResponse + """ + items: Optional[conlist(Pod)] = None + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PodResponse: + """Create an instance of PodResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PodResponse: + """Create an instance of PodResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PodResponse.parse_obj(obj) + + _obj = PodResponse.construct(_fields_set=None, **{ + "items": [Pod.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/pod_v_2_55.py b/pypureclient/flasharray/_common/models/pod_v_2_55.py new file mode 100644 index 0000000000..959e09ca2e --- /dev/null +++ b/pypureclient/flasharray/_common/models/pod_v_2_55.py @@ -0,0 +1,198 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conint, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conint, conlist +from pypureclient.flasharray._common.models.container_eradication_config_v_2_49 import ContainerEradicationConfig +from pypureclient.flasharray._common.models.fixed_reference_v_2_49 import FixedReference +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.pod_array_status_v_2_54 import PodArrayStatus +from pypureclient.flasharray._common.models.pod_space_v_2_50 import PodSpace +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.reference_with_type_v_2_54 import ReferenceWithType + + +class Pod(BaseModel): + """ + Pod + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + array_count: Optional[StrictInt] = Field(default=None, description="The number of arrays a pod connects to.") + arrays: Optional[conlist(PodArrayStatus, min_items=1)] = Field(default=None, description="A list of arrays over which the pod is stretched. If there are two or more arrays in the stretched pod, all data in the pod is synchronously replicated between all of the arrays within the pod.") + destroyed: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the pod has been destroyed and is pending eradication. The `time_remaining` value displays the amount of time left until the destroyed pod is permanently eradicated. Before the `time_remaining` period has elapsed, the destroyed pod can be recovered by setting `destroyed=false`. Once the `time_remaining` period has elapsed, the pod is permanently eradicated and can no longer be recovered.") + eradication_config: Optional[ContainerEradicationConfig] = None + failover_preferences: Optional[conlist(Reference)] = Field(default=None, description="Determines which array or realm within a stretched pod should be given priority to stay online should the arrays or realms ever lose contact with each other. The current array/realm and any peer arrays/realms that are connected to the current array/ream for synchronous replication can be added to a pod for failover preference. By default, `failover_preferences=null`, meaning no arrays or realms have been configured for failover preference. For a pod in a stretched realm, the realm failover-preference takes precedence over the failover-preference of the pod.") + footprint: Optional[conint(strict=True, ge=0)] = Field(default=None, description="This field has been deprecated. Use the `space.footprint` field in the future, as it contains the same information. The maximum amount of space the pod would take up on any array, ignoring any data shared outside the pod. Measured in bytes. The footprint metric is mostly used for capacity planning.") + link_source_count: Optional[StrictInt] = Field(default=None, description="The number of source pods that link to the pod.") + link_target_count: Optional[StrictInt] = Field(default=None, description="The number of target pods that link to the pod.") + mediator: Optional[StrictStr] = Field(default=None, description="The URL of the mediator for the pod. By default, the Pure1 Cloud Mediator (`purestorage`) serves as the mediator. For a pod in a stretched realm, the realm mediator takes precedence over the mediator of the pod.") + mediator_version: Optional[StrictStr] = Field(default=None, description="The mediator version.") + members: Optional[conlist(ReferenceWithType, min_items=1)] = Field(default=None, description="A list of arrays or realms over which the pod is stretched. If there are two or more members in the stretched pod, all data in the pod is synchronously replicated between all of the members within the pod.") + promotion_status: Optional[StrictStr] = Field(default=None, description="Current promotion status of a pod. Values include `promoted`, `demoted`, and `promoting`. The `promoted` status indicates that the pod has been promoted. The pod takes writes from hosts instead of incorporating replicated data. This is the default mode for a pod when it is created. The `demoted` status indicates that the pod has been demoted. The pod does not accept write requests and is ready to be used as a link target. The `promoting` status indicates that the pod is in an intermediate status between `demoted` and `promoted` while the promotion process is taking place.") + quota_limit: Optional[conint(strict=True, le=4503599627370496, ge=1048576)] = Field(default=None, description="The logical quota limit of the pod, measured in bytes.") + requested_promotion_state: Optional[StrictStr] = Field(default=None, description="Values include `promoted` and `demoted`. Patch `requested_promotion_state` to `demoted` to demote the pod so that it can be used as a link target for continuous replication between pods. Demoted pods do not accept write requests, and a destroyed version of the pod with `undo-demote` appended to the pod name is created on the array with the state of the pod when it was in the promoted state. Patch `requested_promotion_state` to `promoted` to start the process of promoting the pod. The `promotion_status` indicates when the pod has been successfully promoted. Promoted pods stop incorporating replicated data from the source pod and start accepting write requests. The replication process does not stop as the source pod continues replicating data to the pod. The space consumed by the unique replicated data is tracked by the `space.journal` field of the pod.") + source: Optional[FixedReference] = Field(default=None, description="The source pod from where data is cloned to create the new pod.") + space: Optional[PodSpace] = Field(default=None, description="Displays provisioned size and physical storage consumption information for the sum of all volumes connected to the specified host.") + time_remaining: Optional[StrictInt] = Field(default=None, description="The amount of time left until the destroyed pod is permanently eradicated, measured in milliseconds. Before the `time_remaining` period has elapsed, the destroyed pod can be recovered by setting `destroyed=false`.") + __properties = ["id", "name", "context", "array_count", "arrays", "destroyed", "eradication_config", "failover_preferences", "footprint", "link_source_count", "link_target_count", "mediator", "mediator_version", "members", "promotion_status", "quota_limit", "requested_promotion_state", "source", "space", "time_remaining"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "context", + "members", + "quota_limit", + "time_remaining", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in arrays (list) + if _include_in_dict('arrays', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.arrays: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['arrays'] = _items + # override the default output from pydantic by calling `to_dict()` of eradication_config + if _include_in_dict('eradication_config', include_readonly, excluded_fields, none_fields): + _dict['eradication_config'] = self.eradication_config.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in failover_preferences (list) + if _include_in_dict('failover_preferences', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.failover_preferences: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['failover_preferences'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in members (list) + if _include_in_dict('members', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.members: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['members'] = _items + # override the default output from pydantic by calling `to_dict()` of source + if _include_in_dict('source', include_readonly, excluded_fields, none_fields): + _dict['source'] = self.source.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of space + if _include_in_dict('space', include_readonly, excluded_fields, none_fields): + _dict['space'] = self.space.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> Pod: + """Create an instance of Pod from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> Pod: + """Create an instance of Pod from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Pod.parse_obj(obj) + + _obj = Pod.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "array_count": obj.get("array_count"), + "arrays": [PodArrayStatus.from_dict(_item) for _item in obj.get("arrays")] if obj.get("arrays") is not None else None, + "destroyed": obj.get("destroyed"), + "eradication_config": ContainerEradicationConfig.from_dict(obj.get("eradication_config")) if obj.get("eradication_config") is not None else None, + "failover_preferences": [Reference.from_dict(_item) for _item in obj.get("failover_preferences")] if obj.get("failover_preferences") is not None else None, + "footprint": obj.get("footprint"), + "link_source_count": obj.get("link_source_count"), + "link_target_count": obj.get("link_target_count"), + "mediator": obj.get("mediator"), + "mediator_version": obj.get("mediator_version"), + "members": [ReferenceWithType.from_dict(_item) for _item in obj.get("members")] if obj.get("members") is not None else None, + "promotion_status": obj.get("promotion_status"), + "quota_limit": obj.get("quota_limit"), + "requested_promotion_state": obj.get("requested_promotion_state"), + "source": FixedReference.from_dict(obj.get("source")) if obj.get("source") is not None else None, + "space": PodSpace.from_dict(obj.get("space")) if obj.get("space") is not None else None, + "time_remaining": obj.get("time_remaining") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_audit_file_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_audit_file_get_response_v_2_55.py new file mode 100644 index 0000000000..7d22c1c5bc --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_audit_file_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.policy_audit_file_v_2_55 import PolicyAuditFile + + +class PolicyAuditFileGetResponse(BaseModel): + """ + PolicyAuditFileGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(PolicyAuditFile)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyAuditFileGetResponse: + """Create an instance of PolicyAuditFileGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyAuditFileGetResponse: + """Create an instance of PolicyAuditFileGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyAuditFileGetResponse.parse_obj(obj) + + _obj = PolicyAuditFileGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [PolicyAuditFile.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_audit_file_patch_v_2_55.py b/pypureclient/flasharray/_common/models/policy_audit_file_patch_v_2_55.py new file mode 100644 index 0000000000..1bc297a005 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_audit_file_patch_v_2_55.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist +from pypureclient.flasharray._common.models.reference_no_id_with_type_v_2_55 import ReferenceNoIdWithType + + +class PolicyAuditFilePatch(BaseModel): + """ + PolicyAuditFilePatch + """ + name: Optional[StrictStr] = Field(default=None, description="The new name for the resource.") + enabled: Optional[StrictBool] = Field(default=None, description="If set to `true`, enables the policy. If set to `false`, disables the policy.") + log_targets: Optional[conlist(ReferenceNoIdWithType)] = Field(default=None, description="A list of targets to which audit logs will be sent. This list, if sent, overrides existing target list.") + __properties = ["name", "enabled", "log_targets"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in log_targets (list) + if _include_in_dict('log_targets', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.log_targets: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['log_targets'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyAuditFilePatch: + """Create an instance of PolicyAuditFilePatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyAuditFilePatch: + """Create an instance of PolicyAuditFilePatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyAuditFilePatch.parse_obj(obj) + + _obj = PolicyAuditFilePatch.construct(_fields_set=None, **{ + "name": obj.get("name"), + "enabled": obj.get("enabled"), + "log_targets": [ReferenceNoIdWithType.from_dict(_item) for _item in obj.get("log_targets")] if obj.get("log_targets") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_audit_file_post_v_2_55.py b/pypureclient/flasharray/_common/models/policy_audit_file_post_v_2_55.py new file mode 100644 index 0000000000..efab25d671 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_audit_file_post_v_2_55.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, conlist +from pypureclient.flasharray._common.models.reference_no_id_with_type_v_2_55 import ReferenceNoIdWithType + + +class PolicyAuditFilePost(BaseModel): + """ + PolicyAuditFilePost + """ + enabled: Optional[StrictBool] = Field(default=None, description="If set to `true`, enables the policy. If set to `false`, disables the policy.") + log_targets: Optional[conlist(ReferenceNoIdWithType)] = Field(default=None, description="A list of targets to which audit logs will be sent.") + __properties = ["enabled", "log_targets"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in log_targets (list) + if _include_in_dict('log_targets', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.log_targets: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['log_targets'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyAuditFilePost: + """Create an instance of PolicyAuditFilePost from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyAuditFilePost: + """Create an instance of PolicyAuditFilePost from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyAuditFilePost.parse_obj(obj) + + _obj = PolicyAuditFilePost.construct(_fields_set=None, **{ + "enabled": obj.get("enabled"), + "log_targets": [ReferenceNoIdWithType.from_dict(_item) for _item in obj.get("log_targets")] if obj.get("log_targets") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_audit_file_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_audit_file_response_v_2_55.py new file mode 100644 index 0000000000..1cff3a5801 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_audit_file_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.policy_audit_file_v_2_55 import PolicyAuditFile + + +class PolicyAuditFileResponse(BaseModel): + """ + PolicyAuditFileResponse + """ + items: Optional[conlist(PolicyAuditFile)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyAuditFileResponse: + """Create an instance of PolicyAuditFileResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyAuditFileResponse: + """Create an instance of PolicyAuditFileResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyAuditFileResponse.parse_obj(obj) + + _obj = PolicyAuditFileResponse.construct(_fields_set=None, **{ + "items": [PolicyAuditFile.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_audit_file_v_2_55.py b/pypureclient/flasharray/_common/models/policy_audit_file_v_2_55.py new file mode 100644 index 0000000000..e3ca6c6dc8 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_audit_file_v_2_55.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.reference_no_id_with_type_v_2_55 import ReferenceNoIdWithType + + +class PolicyAuditFile(BaseModel): + """ + PolicyAuditFile + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + policy_type: Optional[StrictStr] = Field(default=None, description="The type of policy. Values include `autodir`, `network-access`, `nfs`, `smb`, `snapshot`, `quota`, and `object-store-access`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + destroyed: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy has been destroyed and is pending eradication. The `time_remaining` value displays the amount of time left until the destroyed policy is permanently eradicated. Once the `time_remaining` period has elapsed, the policy is permanently eradicated and can no longer be recovered.") + enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy is enabled.") + pod: Optional[Reference] = Field(default=None, description="A reference to the pod.") + time_remaining: Optional[StrictInt] = Field(default=None, description="The amount of time left, measured in milliseconds, until the destroyed policy is permanently eradicated.") + log_targets: Optional[conlist(ReferenceNoIdWithType)] = Field(default=None, description="A list of targets to which audit logs will be sent.") + __properties = ["id", "name", "context", "policy_type", "realms", "destroyed", "enabled", "pod", "time_remaining", "log_targets"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "context", + "policy_type", + "realms", + "time_remaining", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of pod + if _include_in_dict('pod', include_readonly, excluded_fields, none_fields): + _dict['pod'] = self.pod.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in log_targets (list) + if _include_in_dict('log_targets', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.log_targets: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['log_targets'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyAuditFile: + """Create an instance of PolicyAuditFile from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyAuditFile: + """Create an instance of PolicyAuditFile from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyAuditFile.parse_obj(obj) + + _obj = PolicyAuditFile.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "policy_type": obj.get("policy_type"), + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "destroyed": obj.get("destroyed"), + "enabled": obj.get("enabled"), + "pod": Reference.from_dict(obj.get("pod")) if obj.get("pod") is not None else None, + "time_remaining": obj.get("time_remaining"), + "log_targets": [ReferenceNoIdWithType.from_dict(_item) for _item in obj.get("log_targets")] if obj.get("log_targets") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_get_response_v_2_55.py new file mode 100644 index 0000000000..4e955cc311 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.policy_v_2_55 import Policy + + +class PolicyGetResponse(BaseModel): + """ + PolicyGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(Policy)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyGetResponse: + """Create an instance of PolicyGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyGetResponse: + """Create an instance of PolicyGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyGetResponse.parse_obj(obj) + + _obj = PolicyGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [Policy.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_lockable_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_lockable_get_response_v_2_55.py new file mode 100644 index 0000000000..fbb5536bde --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_lockable_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.policy_lockable_v_2_55 import PolicyLockable + + +class PolicyLockableGetResponse(BaseModel): + """ + PolicyLockableGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(PolicyLockable)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyLockableGetResponse: + """Create an instance of PolicyLockableGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyLockableGetResponse: + """Create an instance of PolicyLockableGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyLockableGetResponse.parse_obj(obj) + + _obj = PolicyLockableGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [PolicyLockable.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_lockable_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_lockable_response_v_2_55.py new file mode 100644 index 0000000000..7c0c463474 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_lockable_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.policy_lockable_v_2_55 import PolicyLockable + + +class PolicyLockableResponse(BaseModel): + """ + PolicyLockableResponse + """ + items: Optional[conlist(PolicyLockable)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyLockableResponse: + """Create an instance of PolicyLockableResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyLockableResponse: + """Create an instance of PolicyLockableResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyLockableResponse.parse_obj(obj) + + _obj = PolicyLockableResponse.construct(_fields_set=None, **{ + "items": [PolicyLockable.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_lockable_v_2_55.py b/pypureclient/flasharray/_common/models/policy_lockable_v_2_55.py new file mode 100644 index 0000000000..bae8779ea7 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_lockable_v_2_55.py @@ -0,0 +1,165 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.policy_lockable_eradication_config_v_2_49 import PolicyLockableEradicationConfig +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.workload_configuration_fixed_reference_v_2_51 import WorkloadConfigurationFixedReference + + +class PolicyLockable(BaseModel): + """ + PolicyLockable + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + policy_type: Optional[StrictStr] = Field(default=None, description="The type of policy. Values include `autodir`, `network-access`, `nfs`, `smb`, `snapshot`, `quota`, and `object-store-access`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + destroyed: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy has been destroyed and is pending eradication. The `time_remaining` value displays the amount of time left until the destroyed policy is permanently eradicated. Once the `time_remaining` period has elapsed, the policy is permanently eradicated and can no longer be recovered.") + enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy is enabled.") + pod: Optional[Reference] = Field(default=None, description="A reference to the pod.") + time_remaining: Optional[StrictInt] = Field(default=None, description="The amount of time left, measured in milliseconds, until the destroyed policy is permanently eradicated.") + eradication_config: Optional[PolicyLockableEradicationConfig] = None + retention_lock: Optional[StrictStr] = Field(default=None, description="The valid values are `ratcheted` and `unlocked`. The default value for a newly created policy is `unlocked`. Set `retention_lock` to `ratcheted` to enable SafeMode restrictions on the policy. Contact Pure Technical Services to change `retention_lock` to `unlocked`.") + workload: Optional[WorkloadConfigurationFixedReference] = None + __properties = ["id", "name", "context", "policy_type", "realms", "destroyed", "enabled", "pod", "time_remaining", "eradication_config", "retention_lock", "workload"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "context", + "policy_type", + "realms", + "time_remaining", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of pod + if _include_in_dict('pod', include_readonly, excluded_fields, none_fields): + _dict['pod'] = self.pod.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of eradication_config + if _include_in_dict('eradication_config', include_readonly, excluded_fields, none_fields): + _dict['eradication_config'] = self.eradication_config.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of workload + if _include_in_dict('workload', include_readonly, excluded_fields, none_fields): + _dict['workload'] = self.workload.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyLockable: + """Create an instance of PolicyLockable from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyLockable: + """Create an instance of PolicyLockable from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyLockable.parse_obj(obj) + + _obj = PolicyLockable.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "policy_type": obj.get("policy_type"), + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "destroyed": obj.get("destroyed"), + "enabled": obj.get("enabled"), + "pod": Reference.from_dict(obj.get("pod")) if obj.get("pod") is not None else None, + "time_remaining": obj.get("time_remaining"), + "eradication_config": PolicyLockableEradicationConfig.from_dict(obj.get("eradication_config")) if obj.get("eradication_config") is not None else None, + "retention_lock": obj.get("retention_lock"), + "workload": WorkloadConfigurationFixedReference.from_dict(obj.get("workload")) if obj.get("workload") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_member_export_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_member_export_get_response_v_2_55.py new file mode 100644 index 0000000000..c07937f281 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_member_export_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.policy_member_export_v_2_55 import PolicyMemberExport + + +class PolicyMemberExportGetResponse(BaseModel): + """ + PolicyMemberExportGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(PolicyMemberExport)] = Field(default=None, description="Displays a list of all items after filtering. The values are displayed for each name, if meaningful.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyMemberExportGetResponse: + """Create an instance of PolicyMemberExportGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyMemberExportGetResponse: + """Create an instance of PolicyMemberExportGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyMemberExportGetResponse.parse_obj(obj) + + _obj = PolicyMemberExportGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [PolicyMemberExport.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_member_export_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_member_export_response_v_2_55.py new file mode 100644 index 0000000000..774b295034 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_member_export_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.policy_member_export_v_2_55 import PolicyMemberExport + + +class PolicyMemberExportResponse(BaseModel): + """ + PolicyMemberExportResponse + """ + items: Optional[conlist(PolicyMemberExport)] = Field(default=None, description="Displays a list of all items after filtering. The values are displayed for each name, if meaningful.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyMemberExportResponse: + """Create an instance of PolicyMemberExportResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyMemberExportResponse: + """Create an instance of PolicyMemberExportResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyMemberExportResponse.parse_obj(obj) + + _obj = PolicyMemberExportResponse.construct(_fields_set=None, **{ + "items": [PolicyMemberExport.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_member_export_v_2_55.py b/pypureclient/flasharray/_common/models/policy_member_export_v_2_55.py new file mode 100644 index 0000000000..952bfa3d46 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_member_export_v_2_55.py @@ -0,0 +1,160 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType + + +class PolicyMemberExport(BaseModel): + """ + PolicyMemberExport + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + member: Optional[FixedReferenceWithType] = Field(default=None, description="The reference to the resource targeted by the policy.") + policy: Optional[FixedReferenceWithType] = Field(default=None, description="The reference to the policy.") + destroyed: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the member is destroyed.") + enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if and only if the export policy that manages this export is enabled AND this export is enabled.") + time_remaining: Optional[StrictInt] = Field(default=None, description="The amount of time left, in milliseconds, until the destroyed policy member is permanently eradicated.") + export_name: Optional[StrictStr] = Field(default=None, description="The export name for accessing this export.") + status: Optional[StrictStr] = Field(default=None, description="Explains why `enabled` is `false`, or whether there is a name conflict with another export. Valid values include `policy_disabled`, `export_disabled`, and `name_conflict`.") + server: Optional[FixedReferenceWithType] = Field(default=None, description="Reference to the server the object belongs to. When the value is empty or set to `null` it means the object lives outside of a server scope.") + __properties = ["context", "realms", "member", "policy", "destroyed", "enabled", "time_remaining", "export_name", "status", "server"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "realms", + "destroyed", + "enabled", + "time_remaining", + "status", + "server", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of member + if _include_in_dict('member', include_readonly, excluded_fields, none_fields): + _dict['member'] = self.member.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of policy + if _include_in_dict('policy', include_readonly, excluded_fields, none_fields): + _dict['policy'] = self.policy.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of server + if _include_in_dict('server', include_readonly, excluded_fields, none_fields): + _dict['server'] = self.server.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyMemberExport: + """Create an instance of PolicyMemberExport from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyMemberExport: + """Create an instance of PolicyMemberExport from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyMemberExport.parse_obj(obj) + + _obj = PolicyMemberExport.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "member": FixedReferenceWithType.from_dict(obj.get("member")) if obj.get("member") is not None else None, + "policy": FixedReferenceWithType.from_dict(obj.get("policy")) if obj.get("policy") is not None else None, + "destroyed": obj.get("destroyed"), + "enabled": obj.get("enabled"), + "time_remaining": obj.get("time_remaining"), + "export_name": obj.get("export_name"), + "status": obj.get("status"), + "server": FixedReferenceWithType.from_dict(obj.get("server")) if obj.get("server") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_nfs_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_nfs_get_response_v_2_55.py new file mode 100644 index 0000000000..7696d1e662 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_nfs_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.policy_nfs_v_2_55 import PolicyNfs + + +class PolicyNfsGetResponse(BaseModel): + """ + PolicyNfsGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(PolicyNfs)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyNfsGetResponse: + """Create an instance of PolicyNfsGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyNfsGetResponse: + """Create an instance of PolicyNfsGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyNfsGetResponse.parse_obj(obj) + + _obj = PolicyNfsGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [PolicyNfs.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_nfs_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_nfs_response_v_2_55.py new file mode 100644 index 0000000000..8a52451452 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_nfs_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.policy_nfs_v_2_55 import PolicyNfs + + +class PolicyNfsResponse(BaseModel): + """ + PolicyNfsResponse + """ + items: Optional[conlist(PolicyNfs)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyNfsResponse: + """Create an instance of PolicyNfsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyNfsResponse: + """Create an instance of PolicyNfsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyNfsResponse.parse_obj(obj) + + _obj = PolicyNfsResponse.construct(_fields_set=None, **{ + "items": [PolicyNfs.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_nfs_v_2_55.py b/pypureclient/flasharray/_common/models/policy_nfs_v_2_55.py new file mode 100644 index 0000000000..14f3ed3fac --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_nfs_v_2_55.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.policy_nfs_policy_mapping_v_2_32 import PolicyNfsPolicyMapping +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.workload_configuration_fixed_reference_v_2_51 import WorkloadConfigurationFixedReference + + +class PolicyNfs(BaseModel): + """ + PolicyNfs + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + policy_type: Optional[StrictStr] = Field(default=None, description="The type of policy. Values include `autodir`, `network-access`, `nfs`, `smb`, `snapshot`, `quota`, and `object-store-access`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + destroyed: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy has been destroyed and is pending eradication. The `time_remaining` value displays the amount of time left until the destroyed policy is permanently eradicated. Once the `time_remaining` period has elapsed, the policy is permanently eradicated and can no longer be recovered.") + enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy is enabled.") + pod: Optional[Reference] = Field(default=None, description="A reference to the pod.") + time_remaining: Optional[StrictInt] = Field(default=None, description="The amount of time left, measured in milliseconds, until the destroyed policy is permanently eradicated.") + nfs_version: Optional[conlist(StrictStr)] = Field(default=None, description="NFS protocol version allowed for the export. If NFS version is allowed for all rules of the policy it is cascaded exactly as: `nfsv3`, `nfsv4`. If the NFS version is supported partially by the rules of the policy it will be cascaded as: `nfsv3-partial`, `nfsv4-partial`. If the NFS version is not supported by any rules or there are no rules of the policy then it will not be in the result array. If there are no rules in the policy the array will be empty. If there are two rules, one supporting `nfsv3` and the other supporting `nfsv3` and `nfsv4` then the array would contain `nfsv3` and `nfsv4-partial`.") + policy_mapping: Optional[PolicyNfsPolicyMapping] = Field(default=None, description="Specifies the mapping of this policy across a pod replica link. If this policy is not inside a pod of a pod replica link, mapping is `null`.") + security: Optional[conlist(StrictStr)] = Field(default=None, description="The security flavors to use for accessing files on this mount point. Values include `auth_sys`, `auth_sys-partial`, `krb5`, `krb5-partial`, `krb5i`, and `krb5p`. If the server does not support the requested flavor, the mount operation fails. If `auth_sys`, the client is trusted to specify the identity of the user. If `krb5`, cryptographic proof of the identity of the user is provided in each RPC request. Note that additional configuration besides adding this mount option is required in order to enable Kerberos security. If `krb5i`, integrity checking is added to krb5, to ensure the data has not been tampered with. If `krb5p`, integrity checking and encryption are added to `krb5`. This is the most secure setting, but it also involves the most performance overhead. If security option is allowed for all rules of the policy, it is cascaded exactly. Examples: `auth_sys`, `krb5`. If the security option is supported partially by the rules of the policy, it will be cascaded with the `-partial` suffix. Examples include: `auth_sys-partial`, `krb5-partial`. If the security option is not supported by any rules or there are no rules of the policy, then it will not be in the result array. If there are no rules in the policy the array of values will be empty. If there are two rules, one supporting auth_sys and the other supporting auth_sys and krb5 the array of values would contain `auth_sys` and `krb5-partial`.") + user_mapping_enabled: Optional[StrictBool] = Field(default=None, description="Returns `true` if user mapping is enabled on the policy. If `true`, FlashArray queries the joined AD/OpenLDAP server to find the user corresponding to the incoming UID. If `false`, users are defined by UID/GID pair.") + workload: Optional[WorkloadConfigurationFixedReference] = None + __properties = ["context", "id", "name", "policy_type", "realms", "destroyed", "enabled", "pod", "time_remaining", "nfs_version", "policy_mapping", "security", "user_mapping_enabled", "workload"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "id", + "policy_type", + "realms", + "time_remaining", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of pod + if _include_in_dict('pod', include_readonly, excluded_fields, none_fields): + _dict['pod'] = self.pod.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of policy_mapping + if _include_in_dict('policy_mapping', include_readonly, excluded_fields, none_fields): + _dict['policy_mapping'] = self.policy_mapping.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of workload + if _include_in_dict('workload', include_readonly, excluded_fields, none_fields): + _dict['workload'] = self.workload.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyNfs: + """Create an instance of PolicyNfs from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyNfs: + """Create an instance of PolicyNfs from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyNfs.parse_obj(obj) + + _obj = PolicyNfs.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "id": obj.get("id"), + "name": obj.get("name"), + "policy_type": obj.get("policy_type"), + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "destroyed": obj.get("destroyed"), + "enabled": obj.get("enabled"), + "pod": Reference.from_dict(obj.get("pod")) if obj.get("pod") is not None else None, + "time_remaining": obj.get("time_remaining"), + "nfs_version": obj.get("nfs_version"), + "policy_mapping": PolicyNfsPolicyMapping.from_dict(obj.get("policy_mapping")) if obj.get("policy_mapping") is not None else None, + "security": obj.get("security"), + "user_mapping_enabled": obj.get("user_mapping_enabled"), + "workload": WorkloadConfigurationFixedReference.from_dict(obj.get("workload")) if obj.get("workload") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_qos_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_qos_get_response_v_2_55.py new file mode 100644 index 0000000000..be9f7b6fd2 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_qos_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.policy_qos_v_2_55 import PolicyQos + + +class PolicyQosGetResponse(BaseModel): + """ + PolicyQosGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(PolicyQos)] = Field(default=None, description="The operation that displays a list of all items after filtering. If applicable, the specific values are displayed for each `name`.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyQosGetResponse: + """Create an instance of PolicyQosGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyQosGetResponse: + """Create an instance of PolicyQosGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyQosGetResponse.parse_obj(obj) + + _obj = PolicyQosGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [PolicyQos.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_qos_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_qos_response_v_2_55.py new file mode 100644 index 0000000000..4474084736 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_qos_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.policy_qos_v_2_55 import PolicyQos + + +class PolicyQosResponse(BaseModel): + """ + PolicyQosResponse + """ + items: Optional[conlist(PolicyQos)] = Field(default=None, description="The operation that displays a list of all items after filtering. If applicable, the specific values are displayed for each `name`.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyQosResponse: + """Create an instance of PolicyQosResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyQosResponse: + """Create an instance of PolicyQosResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyQosResponse.parse_obj(obj) + + _obj = PolicyQosResponse.construct(_fields_set=None, **{ + "items": [PolicyQos.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_qos_v_2_55.py b/pypureclient/flasharray/_common/models/policy_qos_v_2_55.py new file mode 100644 index 0000000000..35a79833d6 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_qos_v_2_55.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conint, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conint, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference + + +class PolicyQos(BaseModel): + """ + PolicyQos + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + policy_type: Optional[StrictStr] = Field(default=None, description="The type of policy. Values include `autodir`, `network-access`, `nfs`, `smb`, `snapshot`, `quota`, and `object-store-access`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + destroyed: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy has been destroyed and is pending eradication. The `time_remaining` value displays the amount of time left until the destroyed policy is permanently eradicated. Once the `time_remaining` period has elapsed, the policy is permanently eradicated and can no longer be recovered.") + enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy is enabled.") + pod: Optional[Reference] = Field(default=None, description="A reference to the pod.") + time_remaining: Optional[StrictInt] = Field(default=None, description="The amount of time left, measured in milliseconds, until the destroyed policy is permanently eradicated.") + max_total_bytes_per_sec: Optional[conint(strict=True, le=549755813888, ge=1048576)] = Field(default=None, description="The maximum allowed bytes/s totaled across all the clients. Throttling occurs when the total bandwidth exceeds this limit. Minimum limit is 1MB/s and maximum limit is 512GB/s. If not specified at creation time, defaults to `null` to indicate no limit.") + max_total_ops_per_sec: Optional[conint(strict=True, le=100000000, ge=100)] = Field(default=None, description="The maximum allowed operations/s totaled across all the clients. Throttling occurs when the total IOPs exceeds this limit. Minimum limit is 100 IOPs/s and maximum limit is 100M IOPs/s. If not specified at creation time, defaults to `null` to indicate no limit.") + __properties = ["id", "name", "context", "policy_type", "realms", "destroyed", "enabled", "pod", "time_remaining", "max_total_bytes_per_sec", "max_total_ops_per_sec"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "context", + "policy_type", + "realms", + "time_remaining", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of pod + if _include_in_dict('pod', include_readonly, excluded_fields, none_fields): + _dict['pod'] = self.pod.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyQos: + """Create an instance of PolicyQos from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyQos: + """Create an instance of PolicyQos from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyQos.parse_obj(obj) + + _obj = PolicyQos.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "policy_type": obj.get("policy_type"), + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "destroyed": obj.get("destroyed"), + "enabled": obj.get("enabled"), + "pod": Reference.from_dict(obj.get("pod")) if obj.get("pod") is not None else None, + "time_remaining": obj.get("time_remaining"), + "max_total_bytes_per_sec": obj.get("max_total_bytes_per_sec"), + "max_total_ops_per_sec": obj.get("max_total_ops_per_sec") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_quota_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_quota_get_response_v_2_55.py new file mode 100644 index 0000000000..88942a3832 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_quota_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.policy_quota_v_2_55 import PolicyQuota + + +class PolicyQuotaGetResponse(BaseModel): + """ + PolicyQuotaGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(PolicyQuota)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyQuotaGetResponse: + """Create an instance of PolicyQuotaGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyQuotaGetResponse: + """Create an instance of PolicyQuotaGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyQuotaGetResponse.parse_obj(obj) + + _obj = PolicyQuotaGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [PolicyQuota.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_quota_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_quota_response_v_2_55.py new file mode 100644 index 0000000000..45a179ac56 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_quota_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.policy_quota_v_2_55 import PolicyQuota + + +class PolicyQuotaResponse(BaseModel): + """ + PolicyQuotaResponse + """ + items: Optional[conlist(PolicyQuota)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyQuotaResponse: + """Create an instance of PolicyQuotaResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyQuotaResponse: + """Create an instance of PolicyQuotaResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyQuotaResponse.parse_obj(obj) + + _obj = PolicyQuotaResponse.construct(_fields_set=None, **{ + "items": [PolicyQuota.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_quota_v_2_55.py b/pypureclient/flasharray/_common/models/policy_quota_v_2_55.py new file mode 100644 index 0000000000..6e63ded8a4 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_quota_v_2_55.py @@ -0,0 +1,157 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.workload_configuration_fixed_reference_v_2_51 import WorkloadConfigurationFixedReference + + +class PolicyQuota(BaseModel): + """ + PolicyQuota + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + policy_type: Optional[StrictStr] = Field(default=None, description="The type of policy. Values include `autodir`, `network-access`, `nfs`, `smb`, `snapshot`, `quota`, and `object-store-access`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + destroyed: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy has been destroyed and is pending eradication. The `time_remaining` value displays the amount of time left until the destroyed policy is permanently eradicated. Once the `time_remaining` period has elapsed, the policy is permanently eradicated and can no longer be recovered.") + enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy is enabled.") + pod: Optional[Reference] = Field(default=None, description="A reference to the pod.") + time_remaining: Optional[StrictInt] = Field(default=None, description="The amount of time left, measured in milliseconds, until the destroyed policy is permanently eradicated.") + workload: Optional[WorkloadConfigurationFixedReference] = None + __properties = ["id", "name", "context", "policy_type", "realms", "destroyed", "enabled", "pod", "time_remaining", "workload"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "context", + "policy_type", + "realms", + "time_remaining", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of pod + if _include_in_dict('pod', include_readonly, excluded_fields, none_fields): + _dict['pod'] = self.pod.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of workload + if _include_in_dict('workload', include_readonly, excluded_fields, none_fields): + _dict['workload'] = self.workload.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyQuota: + """Create an instance of PolicyQuota from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyQuota: + """Create an instance of PolicyQuota from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyQuota.parse_obj(obj) + + _obj = PolicyQuota.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "policy_type": obj.get("policy_type"), + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "destroyed": obj.get("destroyed"), + "enabled": obj.get("enabled"), + "pod": Reference.from_dict(obj.get("pod")) if obj.get("pod") is not None else None, + "time_remaining": obj.get("time_remaining"), + "workload": WorkloadConfigurationFixedReference.from_dict(obj.get("workload")) if obj.get("workload") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_response_v_2_55.py new file mode 100644 index 0000000000..20cad1872d --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.policy_v_2_55 import Policy + + +class PolicyResponse(BaseModel): + """ + PolicyResponse + """ + items: Optional[conlist(Policy)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyResponse: + """Create an instance of PolicyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyResponse: + """Create an instance of PolicyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyResponse.parse_obj(obj) + + _obj = PolicyResponse.construct(_fields_set=None, **{ + "items": [Policy.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_smb_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_smb_get_response_v_2_55.py new file mode 100644 index 0000000000..84cb7083e3 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_smb_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.policy_smb_v_2_55 import PolicySmb + + +class PolicySmbGetResponse(BaseModel): + """ + PolicySmbGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(PolicySmb)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicySmbGetResponse: + """Create an instance of PolicySmbGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicySmbGetResponse: + """Create an instance of PolicySmbGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicySmbGetResponse.parse_obj(obj) + + _obj = PolicySmbGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [PolicySmb.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_smb_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_smb_response_v_2_55.py new file mode 100644 index 0000000000..c07d5bfd51 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_smb_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.policy_smb_v_2_55 import PolicySmb + + +class PolicySmbResponse(BaseModel): + """ + PolicySmbResponse + """ + items: Optional[conlist(PolicySmb)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicySmbResponse: + """Create an instance of PolicySmbResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicySmbResponse: + """Create an instance of PolicySmbResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicySmbResponse.parse_obj(obj) + + _obj = PolicySmbResponse.construct(_fields_set=None, **{ + "items": [PolicySmb.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_smb_v_2_55.py b/pypureclient/flasharray/_common/models/policy_smb_v_2_55.py new file mode 100644 index 0000000000..d2a77b23bb --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_smb_v_2_55.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.policy_nfs_policy_mapping_v_2_32 import PolicyNfsPolicyMapping +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.workload_configuration_fixed_reference_v_2_51 import WorkloadConfigurationFixedReference + + +class PolicySmb(BaseModel): + """ + PolicySmb + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + policy_type: Optional[StrictStr] = Field(default=None, description="The type of policy. Values include `autodir`, `network-access`, `nfs`, `smb`, `snapshot`, `quota`, and `object-store-access`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + destroyed: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy has been destroyed and is pending eradication. The `time_remaining` value displays the amount of time left until the destroyed policy is permanently eradicated. Once the `time_remaining` period has elapsed, the policy is permanently eradicated and can no longer be recovered.") + enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy is enabled.") + pod: Optional[Reference] = Field(default=None, description="A reference to the pod.") + time_remaining: Optional[StrictInt] = Field(default=None, description="The amount of time left, measured in milliseconds, until the destroyed policy is permanently eradicated.") + access_based_enumeration_enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if access based enumeration is enabled on the policy. When access based enumeration is enabled on a policy, files and folders within exports that are attached to the policy will be hidden from users who do not have permission to view them.") + continuous_availability_enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if continuous availability is enabled on the policy. When continuous availability is enabled on a policy, file shares are accessible during otherwise disruptive scenarios such as temporary network outages, controller upgrades or failovers.") + policy_mapping: Optional[PolicyNfsPolicyMapping] = Field(default=None, description="Specifies the mapping of this policy across a pod replica link. If this policy is not inside a pod of a pod replica link, mapping is `null`.") + workload: Optional[WorkloadConfigurationFixedReference] = None + __properties = ["context", "id", "name", "policy_type", "realms", "destroyed", "enabled", "pod", "time_remaining", "access_based_enumeration_enabled", "continuous_availability_enabled", "policy_mapping", "workload"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "id", + "policy_type", + "realms", + "time_remaining", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of pod + if _include_in_dict('pod', include_readonly, excluded_fields, none_fields): + _dict['pod'] = self.pod.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of policy_mapping + if _include_in_dict('policy_mapping', include_readonly, excluded_fields, none_fields): + _dict['policy_mapping'] = self.policy_mapping.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of workload + if _include_in_dict('workload', include_readonly, excluded_fields, none_fields): + _dict['workload'] = self.workload.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicySmb: + """Create an instance of PolicySmb from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicySmb: + """Create an instance of PolicySmb from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicySmb.parse_obj(obj) + + _obj = PolicySmb.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "id": obj.get("id"), + "name": obj.get("name"), + "policy_type": obj.get("policy_type"), + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "destroyed": obj.get("destroyed"), + "enabled": obj.get("enabled"), + "pod": Reference.from_dict(obj.get("pod")) if obj.get("pod") is not None else None, + "time_remaining": obj.get("time_remaining"), + "access_based_enumeration_enabled": obj.get("access_based_enumeration_enabled"), + "continuous_availability_enabled": obj.get("continuous_availability_enabled"), + "policy_mapping": PolicyNfsPolicyMapping.from_dict(obj.get("policy_mapping")) if obj.get("policy_mapping") is not None else None, + "workload": WorkloadConfigurationFixedReference.from_dict(obj.get("workload")) if obj.get("workload") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_tls_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_tls_get_response_v_2_55.py new file mode 100644 index 0000000000..464659e21e --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_tls_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.policy_tls_v_2_55 import PolicyTls + + +class PolicyTlsGetResponse(BaseModel): + """ + PolicyTlsGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(PolicyTls)] = Field(default=None, description="The operation that returns a list of all items after filtering. If applicable, the values are displayed for each `name`.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyTlsGetResponse: + """Create an instance of PolicyTlsGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyTlsGetResponse: + """Create an instance of PolicyTlsGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyTlsGetResponse.parse_obj(obj) + + _obj = PolicyTlsGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [PolicyTls.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_tls_response_v_2_55.py b/pypureclient/flasharray/_common/models/policy_tls_response_v_2_55.py new file mode 100644 index 0000000000..5a8ef00116 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_tls_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.policy_tls_v_2_55 import PolicyTls + + +class PolicyTlsResponse(BaseModel): + """ + PolicyTlsResponse + """ + items: Optional[conlist(PolicyTls)] = Field(default=None, description="The operation that returns a list of all items after filtering. If applicable, the values are displayed for each `name`.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyTlsResponse: + """Create an instance of PolicyTlsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyTlsResponse: + """Create an instance of PolicyTlsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyTlsResponse.parse_obj(obj) + + _obj = PolicyTlsResponse.construct(_fields_set=None, **{ + "items": [PolicyTls.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_tls_v_2_55.py b/pypureclient/flasharray/_common/models/policy_tls_v_2_55.py new file mode 100644 index 0000000000..7f045dff47 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_tls_v_2_55.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist, constr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist, constr +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.reference_with_type_v_2_54 import ReferenceWithType + + +class PolicyTls(BaseModel): + """ + PolicyTls + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + policy_type: Optional[StrictStr] = Field(default=None, description="The type of policy. Values include `autodir`, `network-access`, `nfs`, `smb`, `snapshot`, `quota`, and `object-store-access`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + destroyed: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy has been destroyed and is pending eradication. The `time_remaining` value displays the amount of time left until the destroyed policy is permanently eradicated. Once the `time_remaining` period has elapsed, the policy is permanently eradicated and can no longer be recovered.") + enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy is enabled.") + pod: Optional[Reference] = Field(default=None, description="A reference to the pod.") + time_remaining: Optional[StrictInt] = Field(default=None, description="The amount of time left, measured in milliseconds, until the destroyed policy is permanently eradicated.") + appliance_certificate: Optional[ReferenceWithType] = Field(default=None, description="The reference to a `certificate` that will be presented as the server certificate in TLS negotiations with any clients that connect to appliance network addresses to which this policy applies.") + client_certificates_required: Optional[StrictBool] = Field(default=None, description="The property that determines whether client certificates are mandatory. If set to `true`, all clients negotiating TLS connections with network interfaces to which this policy applies are required to provide their client certificates during TLS negotiation. Any client's failure to provide a certificate will cause the TLS negotiation to be rejected. If set to `false`, providing a client certificate in TLS negotiation is not mandatory, and TLS negotiation can succeed when none is provided. If not specified, this value defaults to `false`.") + disabled_tls_ciphers: Optional[conlist(constr(strict=True, max_length=128), max_items=64)] = Field(default=None, description="The parameter that disables specific TLS ciphers. If all TLS ciphers available for a specific TLS version on the system are disabled, client access over that TLS version is not possible. As a result, the configuration must still leave at least one cipher available for each enabled TLS version. Changes to this setting can disrupt traffic for any clients relying on the disabled ciphers.") + enabled_tls_ciphers: Optional[conlist(constr(strict=True, max_length=128), max_items=64)] = Field(default=None, description="The parameter that enables only the specified TLS ciphers. If all available TLS ciphers for a specific TLS version on the system are disabled, client access over that TLS version is not possible. Therefore, the enabled ciphers must always contain at least one cipher for each enabled TLS version. Changes to this setting can disrupt traffic for any clients relying on ciphers that are removed. If set to `default`, the enabled ciphers may be automatically adjusted during software upgrades to align with best practices at the time of the release.") + min_tls_version: Optional[StrictStr] = Field(default=None, description="The minimum TLS version allowed for inbound connections on IP addresses to which this policy applies. Changing this setting can disrupt connections for any clients relying on older TLS versions that are disabled. If set to `default`, the lowest TLS version permitted may be automatically raised during software upgrades to align with best practices at the time of the release. Configuring an explicit, low value can prevent upgrades to newer software versions that no longer support older TLS versions. Valid values include `default`, `1.2`, and `1.3`.") + tls_enforced_for: Optional[conlist(StrictStr, max_items=1)] = Field(default=None, description="The list of `protocols` for which TLS is required. If a protocol is not included in this list, then this policy does not mandate that TLS be negotiated for that protocol.") + trusted_client_certificate_authority: Optional[ReferenceWithType] = Field(default=None, description="The reference to a `certificate`. The referenced `certificate` is used to verify the certificates presented by clients when `verify_client_certificate_trust` is set to `true`.") + verify_client_certificate_trust: Optional[StrictBool] = Field(default=None, description="The property that determines if client certificates undergo strict trust verification. If set to `true`, any certificate presented by a client in TLS negotiation undergoes strict trust verification using the certificates referenced by `trusted_client_certificate_authority`. If set to `false`, certificates are only checked for proper construction and expiration, and the `trusted_client_certificate_authority` is not used. If `client_certificates_required` is `false` and no certificate is provided, no verification is performed. However, if a client provides a certificate voluntarily and this field is `true`, it will undergo trust verification. If not specified, this value defaults to `false`.") + __properties = ["id", "name", "context", "policy_type", "realms", "destroyed", "enabled", "pod", "time_remaining", "appliance_certificate", "client_certificates_required", "disabled_tls_ciphers", "enabled_tls_ciphers", "min_tls_version", "tls_enforced_for", "trusted_client_certificate_authority", "verify_client_certificate_trust"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "context", + "policy_type", + "realms", + "time_remaining", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of pod + if _include_in_dict('pod', include_readonly, excluded_fields, none_fields): + _dict['pod'] = self.pod.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of appliance_certificate + if _include_in_dict('appliance_certificate', include_readonly, excluded_fields, none_fields): + _dict['appliance_certificate'] = self.appliance_certificate.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of trusted_client_certificate_authority + if _include_in_dict('trusted_client_certificate_authority', include_readonly, excluded_fields, none_fields): + _dict['trusted_client_certificate_authority'] = self.trusted_client_certificate_authority.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> PolicyTls: + """Create an instance of PolicyTls from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> PolicyTls: + """Create an instance of PolicyTls from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return PolicyTls.parse_obj(obj) + + _obj = PolicyTls.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "policy_type": obj.get("policy_type"), + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "destroyed": obj.get("destroyed"), + "enabled": obj.get("enabled"), + "pod": Reference.from_dict(obj.get("pod")) if obj.get("pod") is not None else None, + "time_remaining": obj.get("time_remaining"), + "appliance_certificate": ReferenceWithType.from_dict(obj.get("appliance_certificate")) if obj.get("appliance_certificate") is not None else None, + "client_certificates_required": obj.get("client_certificates_required"), + "disabled_tls_ciphers": obj.get("disabled_tls_ciphers"), + "enabled_tls_ciphers": obj.get("enabled_tls_ciphers"), + "min_tls_version": obj.get("min_tls_version"), + "tls_enforced_for": obj.get("tls_enforced_for"), + "trusted_client_certificate_authority": ReferenceWithType.from_dict(obj.get("trusted_client_certificate_authority")) if obj.get("trusted_client_certificate_authority") is not None else None, + "verify_client_certificate_trust": obj.get("verify_client_certificate_trust") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/policy_v_2_55.py b/pypureclient/flasharray/_common/models/policy_v_2_55.py new file mode 100644 index 0000000000..aa175b43f6 --- /dev/null +++ b/pypureclient/flasharray/_common/models/policy_v_2_55.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference + + +class Policy(BaseModel): + """ + Policy + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + policy_type: Optional[StrictStr] = Field(default=None, description="The type of policy. Values include `autodir`, `network-access`, `nfs`, `smb`, `snapshot`, `quota`, and `object-store-access`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + destroyed: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy has been destroyed and is pending eradication. The `time_remaining` value displays the amount of time left until the destroyed policy is permanently eradicated. Once the `time_remaining` period has elapsed, the policy is permanently eradicated and can no longer be recovered.") + enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the policy is enabled.") + pod: Optional[Reference] = Field(default=None, description="A reference to the pod.") + time_remaining: Optional[StrictInt] = Field(default=None, description="The amount of time left, measured in milliseconds, until the destroyed policy is permanently eradicated.") + __properties = ["id", "name", "context", "policy_type", "realms", "destroyed", "enabled", "pod", "time_remaining"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "context", + "policy_type", + "realms", + "time_remaining", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of pod + if _include_in_dict('pod', include_readonly, excluded_fields, none_fields): + _dict['pod'] = self.pod.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> Policy: + """Create an instance of Policy from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> Policy: + """Create an instance of Policy from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Policy.parse_obj(obj) + + _obj = Policy.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "policy_type": obj.get("policy_type"), + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "destroyed": obj.get("destroyed"), + "enabled": obj.get("enabled"), + "pod": Reference.from_dict(obj.get("pod")) if obj.get("pod") is not None else None, + "time_remaining": obj.get("time_remaining") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/realm_array_status_v_2_55.py b/pypureclient/flasharray/_common/models/realm_array_status_v_2_55.py new file mode 100644 index 0000000000..be615d191c --- /dev/null +++ b/pypureclient/flasharray/_common/models/realm_array_status_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional, Union + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr +from pypureclient.flasharray._common.models.reference_with_fixed_type_v_2_55 import ReferenceWithFixedType + + +class RealmArrayStatus(BaseModel): + """ + RealmArrayStatus + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified.") + name: Optional[StrictStr] = Field(default=None, description="The resource name, such as volume name, pod name, snapshot name, and so on.") + resource_type: Optional[StrictStr] = Field(default=None, description="Type of the object (full name of the endpoint). Valid values are `hosts`, `host-groups`, `network-interfaces`, `pods`, `ports`, `pod-replica-links`, `subnets`, `volumes`, `volume-snapshots`, `volume-groups`, `directories`, `policies/nfs`, `policies/smb`, `policies/snapshot`, etc.") + frozen_at: Optional[StrictInt] = Field(default=None, description="The timestamp of when the data on the realm was frozen when the array went offline. Measured in milliseconds since the UNIX epoch. Also known as the recovery point. If the realm is in sync, a value of `null` will be returned.") + mediator_status: Optional[StrictStr] = Field(default=None, description="The status of the mediator, which determines whether it is available to mediate a high availability event. Valid values are `flummoxed`, `online`, `unknown`, and `unreachable`. Only mediators in the `online` status can mediate high availability events. If set to `flummoxed`, the array can reach a mediator, but it is talking to the wrong one. Verify that the DNS in the environment is properly configured. This status might also appear if the realm has been offline on one array for an extended period of time and the peer array is unreachable. If set to `online`, the array is successfully communicating with the mediator, and the mediator is available to mediate a high availability event. If set to `unreachable`, the array cannot reach the mediator, either due to network issues or because the mediator is down. When a mediator is unreachable, synchronous replication continues to function provided all arrays are healthy and communicating, but a high availability event without mediator access can result in an outage.") + member: Optional[ReferenceWithFixedType] = Field(default=None, description="The reference to the `member` associated with the `realm's array status`.") + pre_elected: Optional[StrictBool] = Field(default=None, description="If set to `true`, the `array` has been pre-elected to remain online in the rare event that the `mediator` is inaccessible on both `arrays` within the `stretched realm`, and then later, the `arrays` within the `stretched realm` become disconnected from each other. If set to `false`, either the `array` has been pre-elected to remain offline while its `peer array` remains online, or pre-election is not in effect. One and only one `array` within each `realm` is pre-elected at a given point in time, so while a `pre-elected array` is keeping the `realm` online, the `realm` on its `non-elected peer array` remains offline during the communication failure. Users cannot pre-elect `arrays`.") + progress: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="The percentage progress of the realm resyncing process for this array. The percentage is displayed as a decimal value, starting at 0.00 and ending at 1.00.") + status: Optional[StrictStr] = Field(default=None, description="The status of the array within the stretched realm. Valid values are `offline`, `online`, `resyncing`, `suspended`, and `unknown`. If set to `offline`, the array is experiencing problems and may not have the latest realm data. The array cannot handle I/O to the realm and cannot take over during a high availability event. If set to `online`, the array is online and has the latest realm data. The array can handle I/O to the realm and take over during a high availability event. If set to `suspended`, the array is experiencing a short connection glitch of the realm. This is a temporary status and would transition to either `online` or `offline` soon. `suspended` is a new status that is exposed, starting from version 6.6.0. If set to `resyncing`, the array is actively getting the latest realm data so that it becomes fully synchronized with its peer array. During the resyncing process, the array cannot handle I/O to the realm. Once the arrays are fully synchronized, the array changes to `online` status. If set to `unknown`, the status of the peer array is unknown because this array is offline and cannot determine the state of the realm on the peer array. Only the peer array can ever be in unknown status; this unknown status is unique to the local array and will differ when viewed from its peer array.") + __properties = ["id", "name", "resource_type", "frozen_at", "mediator_status", "member", "pre_elected", "progress", "status"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "frozen_at", + "mediator_status", + "pre_elected", + "progress", + "status", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of member + if _include_in_dict('member', include_readonly, excluded_fields, none_fields): + _dict['member'] = self.member.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> RealmArrayStatus: + """Create an instance of RealmArrayStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> RealmArrayStatus: + """Create an instance of RealmArrayStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RealmArrayStatus.parse_obj(obj) + + _obj = RealmArrayStatus.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "resource_type": obj.get("resource_type"), + "frozen_at": obj.get("frozen_at"), + "mediator_status": obj.get("mediator_status"), + "member": ReferenceWithFixedType.from_dict(obj.get("member")) if obj.get("member") is not None else None, + "pre_elected": obj.get("pre_elected"), + "progress": obj.get("progress"), + "status": obj.get("status") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/realm_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/realm_get_response_v_2_55.py new file mode 100644 index 0000000000..8eade60284 --- /dev/null +++ b/pypureclient/flasharray/_common/models/realm_get_response_v_2_55.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.realm_v_2_55 import Realm + + +class RealmGetResponse(BaseModel): + """ + RealmGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(Realm)] = None + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + total: Optional[conlist(Realm)] = Field(default=None, description="The aggregate value of all items after filtering. When applicable, the average value is displayed instead. The values are displayed for each field, if meaningful.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors", "total"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in total (list) + if _include_in_dict('total', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.total: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['total'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> RealmGetResponse: + """Create an instance of RealmGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> RealmGetResponse: + """Create an instance of RealmGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RealmGetResponse.parse_obj(obj) + + _obj = RealmGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [Realm.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None, + "total": [Realm.from_dict(_item) for _item in obj.get("total")] if obj.get("total") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/realm_member_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/realm_member_get_response_v_2_55.py new file mode 100644 index 0000000000..17b77931f1 --- /dev/null +++ b/pypureclient/flasharray/_common/models/realm_member_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.realm_member_v_2_55 import RealmMember + + +class RealmMemberGetResponse(BaseModel): + """ + RealmMemberGetResponse + """ + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(RealmMember)] = Field(default=None, description="The list of all `items` displayed after `filtering`. The `values` are displayed for each `name` where meaningful. If the `total_only` parameter is set to `true`, the `items` list will be empty.") + __properties = ["errors", "continuation_token", "more_items_remaining", "total_item_count", "items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> RealmMemberGetResponse: + """Create an instance of RealmMemberGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> RealmMemberGetResponse: + """Create an instance of RealmMemberGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RealmMemberGetResponse.parse_obj(obj) + + _obj = RealmMemberGetResponse.construct(_fields_set=None, **{ + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None, + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [RealmMember.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/realm_member_response_v_2_55.py b/pypureclient/flasharray/_common/models/realm_member_response_v_2_55.py new file mode 100644 index 0000000000..658b7785fd --- /dev/null +++ b/pypureclient/flasharray/_common/models/realm_member_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.realm_member_v_2_55 import RealmMember + + +class RealmMemberResponse(BaseModel): + """ + RealmMemberResponse + """ + items: Optional[conlist(RealmMember)] = Field(default=None, description="The list of all `items` displayed after `filtering`. The `values` are displayed for each `name` where meaningful. If the `total_only` parameter is set to `true`, the `items` list will be empty.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> RealmMemberResponse: + """Create an instance of RealmMemberResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> RealmMemberResponse: + """Create an instance of RealmMemberResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RealmMemberResponse.parse_obj(obj) + + _obj = RealmMemberResponse.construct(_fields_set=None, **{ + "items": [RealmMember.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/realm_member_v_2_55.py b/pypureclient/flasharray/_common/models/realm_member_v_2_55.py new file mode 100644 index 0000000000..7c2b2050a1 --- /dev/null +++ b/pypureclient/flasharray/_common/models/realm_member_v_2_55.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field +except ModuleNotFoundError: + from pydantic import BaseModel, Field +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.reference_with_fixed_type_v_2_55 import ReferenceWithFixedType + + +class RealmMember(BaseModel): + """ + RealmMember + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + member: Optional[ReferenceWithFixedType] = None + realm: Optional[ReferenceWithFixedType] = None + __properties = ["context", "member", "realm"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of member + if _include_in_dict('member', include_readonly, excluded_fields, none_fields): + _dict['member'] = self.member.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of realm + if _include_in_dict('realm', include_readonly, excluded_fields, none_fields): + _dict['realm'] = self.realm.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> RealmMember: + """Create an instance of RealmMember from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> RealmMember: + """Create an instance of RealmMember from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RealmMember.parse_obj(obj) + + _obj = RealmMember.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "member": ReferenceWithFixedType.from_dict(obj.get("member")) if obj.get("member") is not None else None, + "realm": ReferenceWithFixedType.from_dict(obj.get("realm")) if obj.get("realm") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/realm_patch_v_2_55.py b/pypureclient/flasharray/_common/models/realm_patch_v_2_55.py new file mode 100644 index 0000000000..d8c240b86c --- /dev/null +++ b/pypureclient/flasharray/_common/models/realm_patch_v_2_55.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist +from pypureclient.flasharray._common.models.container_qos_patch_v_2_54 import ContainerQosPatch +from pypureclient.flasharray._common.models.quota_limit_patch_v_2_52 import QuotaLimitPatch +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference + + +class RealmPatch(BaseModel): + """ + RealmPatch + """ + name: Optional[StrictStr] = Field(default=None, description="The new name for the resource.") + quota_limit: Optional[QuotaLimitPatch] = None + data_sealing_key: Optional[Reference] = Field(default=None, description="The reference (name and resource type) to the `data sealing key` to use for isolating the `realm`. The `data sealing key` must exist before isolating the `realm`. Once the `realm` is isolated, `data` will be encrypted using this `key`.") + destroyed: Optional[StrictBool] = Field(default=None, description="If set to `true`, the realm will be destroyed and pending eradication. The `time_remaining` value displays the amount of time left until the destroyed realm is permanently eradicated. A realm can only be destroyed if it is empty or destroy_contents is set to true. Before the `time_remaining` period has elapsed, the destroyed realm can be recovered by setting `destroyed=false`. Once the `time_remaining` period has elapsed, the realm is permanently eradicated and can no longer be recovered.") + failover_preferences: Optional[conlist(Reference)] = Field(default=None, description="Determines which array within a stretched realm should be given priority to stay online should the arrays ever lose contact with each other. The current array and any peer arrays that are connected to the current array for synchronous replication can be added to a realm for failover preference. By default, `failover_preferences=null`, meaning no arrays have been configured for failover preference. Enter multiple arrays in comma-separated format. To clear the list of failover preferences, set to an empty list `[]`.") + mediator: Optional[StrictStr] = Field(default=None, description="Sets the URL of the mediator for this realm, replacing the URL of the current mediator. By default, the Pure1 Cloud Mediator (`purestorage`) serves as the mediator.") + qos: Optional[ContainerQosPatch] = Field(default=None, description="Sets QoS limits.") + requested_isolation_state: Optional[StrictStr] = Field(default=None, description="The desired isolation state of the realm, can be `no-isolation` or `data-isolated`. The default value is 'no-isolation'. The requested isolation state can be changed only when the realm does not contain any data.") + __properties = ["name", "quota_limit", "data_sealing_key", "destroyed", "failover_preferences", "mediator", "qos", "requested_isolation_state"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of quota_limit + if _include_in_dict('quota_limit', include_readonly, excluded_fields, none_fields): + _dict['quota_limit'] = self.quota_limit.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of data_sealing_key + if _include_in_dict('data_sealing_key', include_readonly, excluded_fields, none_fields): + _dict['data_sealing_key'] = self.data_sealing_key.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in failover_preferences (list) + if _include_in_dict('failover_preferences', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.failover_preferences: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['failover_preferences'] = _items + # override the default output from pydantic by calling `to_dict()` of qos + if _include_in_dict('qos', include_readonly, excluded_fields, none_fields): + _dict['qos'] = self.qos.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> RealmPatch: + """Create an instance of RealmPatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> RealmPatch: + """Create an instance of RealmPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RealmPatch.parse_obj(obj) + + _obj = RealmPatch.construct(_fields_set=None, **{ + "name": obj.get("name"), + "quota_limit": QuotaLimitPatch.from_dict(obj.get("quota_limit")) if obj.get("quota_limit") is not None else None, + "data_sealing_key": Reference.from_dict(obj.get("data_sealing_key")) if obj.get("data_sealing_key") is not None else None, + "destroyed": obj.get("destroyed"), + "failover_preferences": [Reference.from_dict(_item) for _item in obj.get("failover_preferences")] if obj.get("failover_preferences") is not None else None, + "mediator": obj.get("mediator"), + "qos": ContainerQosPatch.from_dict(obj.get("qos")) if obj.get("qos") is not None else None, + "requested_isolation_state": obj.get("requested_isolation_state") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/realm_post_v_2_55.py b/pypureclient/flasharray/_common/models/realm_post_v_2_55.py new file mode 100644 index 0000000000..9e3f1bbf03 --- /dev/null +++ b/pypureclient/flasharray/_common/models/realm_post_v_2_55.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr, conint, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr, conint, conlist +from pypureclient.flasharray._common.models.container_qos_v_2_47 import ContainerQos +from pypureclient.flasharray._common.models.non_copyable_tag_v_2_49 import NonCopyableTag +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference + + +class RealmPost(BaseModel): + """ + RealmPost + """ + data_sealing_keying_material: Optional[StrictStr] = Field(default=None, description="The base64-encoded keying material (per RFC 4648, section 4) of the 256-bit `AES data sealing key`. This property is required when creating a `data-isolated realm` (`requested_isolation_state` is set to `data-isolated`). This property must not be set when `requested_isolation_state` is `no-isolation`.") + failover_preferences: Optional[conlist(Reference)] = Field(default=None, description="Determines which array within a stretched realm should be given priority to stay online should the arrays ever lose contact with each other. The current array and any peer arrays that are connected to the current array for synchronous replication can be added to a realm for failover preference. By default, `failover_preferences=null`, meaning no arrays have been configured for failover preference. Enter multiple arrays in comma-separated format. To clear the list of failover preferences, set to an empty list `[]`.") + qos: Optional[ContainerQos] = Field(default=None, description="Sets QoS limits.") + quota_limit: Optional[conint(strict=True, le=4503599627370496, ge=1048576)] = Field(default=None, description="The logical quota limit of the realm, measured in bytes. Must be a multiple of 512.") + requested_isolation_state: Optional[StrictStr] = Field(default=None, description="The desired isolation state of the realm, can be `no-isolation` or `data-isolated`. The default value is 'no-isolation'. Once the realm is created, the requested isolation state cannot be changed.") + tags: Optional[conlist(NonCopyableTag)] = Field(default=None, description="The list of tags to be upserted with the object.") + __properties = ["data_sealing_keying_material", "failover_preferences", "qos", "quota_limit", "requested_isolation_state", "tags"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in failover_preferences (list) + if _include_in_dict('failover_preferences', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.failover_preferences: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['failover_preferences'] = _items + # override the default output from pydantic by calling `to_dict()` of qos + if _include_in_dict('qos', include_readonly, excluded_fields, none_fields): + _dict['qos'] = self.qos.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in tags (list) + if _include_in_dict('tags', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.tags: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['tags'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> RealmPost: + """Create an instance of RealmPost from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> RealmPost: + """Create an instance of RealmPost from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RealmPost.parse_obj(obj) + + _obj = RealmPost.construct(_fields_set=None, **{ + "data_sealing_keying_material": obj.get("data_sealing_keying_material"), + "failover_preferences": [Reference.from_dict(_item) for _item in obj.get("failover_preferences")] if obj.get("failover_preferences") is not None else None, + "qos": ContainerQos.from_dict(obj.get("qos")) if obj.get("qos") is not None else None, + "quota_limit": obj.get("quota_limit"), + "requested_isolation_state": obj.get("requested_isolation_state"), + "tags": [NonCopyableTag.from_dict(_item) for _item in obj.get("tags")] if obj.get("tags") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/realm_remote_array_status_v_2_55.py b/pypureclient/flasharray/_common/models/realm_remote_array_status_v_2_55.py new file mode 100644 index 0000000000..a324cf3a57 --- /dev/null +++ b/pypureclient/flasharray/_common/models/realm_remote_array_status_v_2_55.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr +from pypureclient.flasharray._common.models.reference_with_type_v_2_54 import ReferenceWithType + + +class RealmRemoteArrayStatus(BaseModel): + """ + RealmRemoteArrayStatus + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified.") + name: Optional[StrictStr] = Field(default=None, description="The resource name, such as volume name, pod name, snapshot name, and so on.") + resource_type: Optional[StrictStr] = Field(default=None, description="Type of the object (full name of the endpoint). Valid values are `hosts`, `host-groups`, `network-interfaces`, `pods`, `ports`, `pod-replica-links`, `subnets`, `volumes`, `volume-snapshots`, `volume-groups`, `directories`, `policies/nfs`, `policies/smb`, `policies/snapshot`, etc.") + member: Optional[ReferenceWithType] = Field(default=None, description="The reference to the `member` associated with the `realm's array status`.") + __properties = ["id", "name", "resource_type", "member"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of member + if _include_in_dict('member', include_readonly, excluded_fields, none_fields): + _dict['member'] = self.member.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> RealmRemoteArrayStatus: + """Create an instance of RealmRemoteArrayStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> RealmRemoteArrayStatus: + """Create an instance of RealmRemoteArrayStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RealmRemoteArrayStatus.parse_obj(obj) + + _obj = RealmRemoteArrayStatus.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "resource_type": obj.get("resource_type"), + "member": ReferenceWithType.from_dict(obj.get("member")) if obj.get("member") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/realm_response_v_2_55.py b/pypureclient/flasharray/_common/models/realm_response_v_2_55.py new file mode 100644 index 0000000000..db0876b735 --- /dev/null +++ b/pypureclient/flasharray/_common/models/realm_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, conlist +from pypureclient.flasharray._common.models.realm_v_2_55 import Realm + + +class RealmResponse(BaseModel): + """ + RealmResponse + """ + items: Optional[conlist(Realm)] = None + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> RealmResponse: + """Create an instance of RealmResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> RealmResponse: + """Create an instance of RealmResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RealmResponse.parse_obj(obj) + + _obj = RealmResponse.construct(_fields_set=None, **{ + "items": [Realm.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/realm_v_2_55.py b/pypureclient/flasharray/_common/models/realm_v_2_55.py new file mode 100644 index 0000000000..6978008244 --- /dev/null +++ b/pypureclient/flasharray/_common/models/realm_v_2_55.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conint, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conint, conlist +from pypureclient.flasharray._common.models.container_eradication_config_v_2_49 import ContainerEradicationConfig +from pypureclient.flasharray._common.models.container_qos_v_2_47 import ContainerQos +from pypureclient.flasharray._common.models.fixed_reference_v_2_49 import FixedReference +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.realm_array_status_v_2_55 import RealmArrayStatus +from pypureclient.flasharray._common.models.reference_with_fixed_type_v_2_55 import ReferenceWithFixedType +from pypureclient.flasharray._common.models.reference_with_type_v_2_54 import ReferenceWithType +from pypureclient.flasharray._common.models.space_no_deprecated_physical_or_effective_v_2_50 import SpaceNoDeprecatedPhysicalOrEffective + + +class Realm(BaseModel): + """ + Realm + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + array_count: Optional[StrictInt] = Field(default=None, description="The number of arrays a realm connects to.") + arrays: Optional[conlist(RealmArrayStatus, min_items=1)] = Field(default=None, description="The list of `arrays` over which the `realm` is stretched. If there are two or more `arrays` in the `stretched realm`, all `data` in the `realm` is synchronously replicated between all of the `arrays` within the `realm`.") + created: Optional[StrictInt] = Field(default=None, description="The creation timestamp of the `realm`.") + data_availability_status: Optional[StrictStr] = Field(default=None, description="The data-isolated realm can be either `unsealed` or `sealed`. It is `unsealed` when the data sealing key is enabled and data can be served, and `sealed` when the key is disabled or unavailable, preventing data access. The data isolation status changes only when the data sealing key is enabled, disabled, or becomes unavailable after a power cycle.") + data_sealing_key: Optional[FixedReference] = Field(default=None, description="The `data sealing key` used to seal and unseal `data-isolated realms`. To seal or unseal the `realm`, the `data sealing key` should be `disabled` or `enabled`, respectively.") + destroyed: Optional[StrictBool] = Field(default=None, description="The boolean value that, if `true`, indicates the `realm` has been destroyed and is pending eradication. The `realm` cannot be modified while it is in the `destroyed` state. The `time_remaining` value displays the amount of time left until the destroyed `realm` is permanently eradicated. Once eradication has begun, the `realm` can no longer be recovered. Before the `time_remaining` period has elapsed, the destroyed `realm` can be recovered through the `PATCH` method.") + eradication_config: Optional[ContainerEradicationConfig] = None + failover_preferences: Optional[conlist(ReferenceWithType)] = Field(default=None, description="Determines which array or realm within a stretched realm should be given priority to stay online should the arrays or realms ever lose contact with each other. The current array and any peer arrays that are connected to the current array for synchronous replication can be added to a realm for failover preference. By default, `failover_preferences=null`, meaning no arrays have been configured for failover preference.") + isolation_status: Optional[StrictStr] = Field(default=None, description="The current isolation status of the realm can be `no-isolation` or `data-isolated`. `data-isolated` means the realm uses separate, externally provided encryption keys for user data.") + mediator: Optional[StrictStr] = Field(default=None, description="The URL of the mediator for the realm. By default, the Pure1 Cloud Mediator (`purestorage`) serves as the mediator.") + mediator_version: Optional[StrictStr] = Field(default=None, description="The mediator version.") + members: Optional[conlist(ReferenceWithFixedType, min_items=1)] = Field(default=None, description="The list of `arrays` over which the `realm` is stretched. If there are two or more `members` in the `stretched realm`, all `data` in the `realm` is synchronously replicated between all of the `members` within the `realm`.") + qos: Optional[ContainerQos] = Field(default=None, description="The Quality of Service (QoS) limit information for the `realm`.") + quota_limit: Optional[conint(strict=True, le=4503599627370496)] = Field(default=None, description="The logical quota limit of the realm, measured in bytes.") + requested_isolation_state: Optional[StrictStr] = Field(default=None, description="The desired isolation state of the realm, can be `no-isolation` or `data-isolated`. The default value is 'no-isolation'. The requested isolation state can be changed only when the realm does not contain any data.") + space: Optional[SpaceNoDeprecatedPhysicalOrEffective] = Field(default=None, description="The provisioned size and physical storage consumption information for the `realm`.") + time_remaining: Optional[StrictInt] = Field(default=None, description="The time, in milliseconds, before the `realm` is eradicated. This value is `null` if the `realm` is not destroyed.") + __properties = ["id", "name", "context", "array_count", "arrays", "created", "data_availability_status", "data_sealing_key", "destroyed", "eradication_config", "failover_preferences", "isolation_status", "mediator", "mediator_version", "members", "qos", "quota_limit", "requested_isolation_state", "space", "time_remaining"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "context", + "created", + "data_availability_status", + "isolation_status", + "members", + "quota_limit", + "time_remaining", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in arrays (list) + if _include_in_dict('arrays', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.arrays: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['arrays'] = _items + # override the default output from pydantic by calling `to_dict()` of data_sealing_key + if _include_in_dict('data_sealing_key', include_readonly, excluded_fields, none_fields): + _dict['data_sealing_key'] = self.data_sealing_key.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of eradication_config + if _include_in_dict('eradication_config', include_readonly, excluded_fields, none_fields): + _dict['eradication_config'] = self.eradication_config.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in failover_preferences (list) + if _include_in_dict('failover_preferences', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.failover_preferences: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['failover_preferences'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in members (list) + if _include_in_dict('members', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.members: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['members'] = _items + # override the default output from pydantic by calling `to_dict()` of qos + if _include_in_dict('qos', include_readonly, excluded_fields, none_fields): + _dict['qos'] = self.qos.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of space + if _include_in_dict('space', include_readonly, excluded_fields, none_fields): + _dict['space'] = self.space.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> Realm: + """Create an instance of Realm from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> Realm: + """Create an instance of Realm from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Realm.parse_obj(obj) + + _obj = Realm.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "array_count": obj.get("array_count"), + "arrays": [RealmArrayStatus.from_dict(_item) for _item in obj.get("arrays")] if obj.get("arrays") is not None else None, + "created": obj.get("created"), + "data_availability_status": obj.get("data_availability_status"), + "data_sealing_key": FixedReference.from_dict(obj.get("data_sealing_key")) if obj.get("data_sealing_key") is not None else None, + "destroyed": obj.get("destroyed"), + "eradication_config": ContainerEradicationConfig.from_dict(obj.get("eradication_config")) if obj.get("eradication_config") is not None else None, + "failover_preferences": [ReferenceWithType.from_dict(_item) for _item in obj.get("failover_preferences")] if obj.get("failover_preferences") is not None else None, + "isolation_status": obj.get("isolation_status"), + "mediator": obj.get("mediator"), + "mediator_version": obj.get("mediator_version"), + "members": [ReferenceWithFixedType.from_dict(_item) for _item in obj.get("members")] if obj.get("members") is not None else None, + "qos": ContainerQos.from_dict(obj.get("qos")) if obj.get("qos") is not None else None, + "quota_limit": obj.get("quota_limit"), + "requested_isolation_state": obj.get("requested_isolation_state"), + "space": SpaceNoDeprecatedPhysicalOrEffective.from_dict(obj.get("space")) if obj.get("space") is not None else None, + "time_remaining": obj.get("time_remaining") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/reference_no_id_with_type_v_2_55.py b/pypureclient/flasharray/_common/models/reference_no_id_with_type_v_2_55.py new file mode 100644 index 0000000000..6236fc75a7 --- /dev/null +++ b/pypureclient/flasharray/_common/models/reference_no_id_with_type_v_2_55.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr + + +class ReferenceNoIdWithType(BaseModel): + """ + ReferenceNoIdWithType + """ + name: Optional[StrictStr] = Field(default=None, description="The resource name, such as volume name, pod name, snapshot name, and so on.") + resource_type: Optional[StrictStr] = Field(default=None, description="Type of the object (full name of the endpoint). Valid values include `hosts`, `host-groups`, `network-interfaces`, `pods`, `ports`, `pod-replica-links`, `realms`, `subnets`, `volumes`, `volume-snapshots`, `volume-groups`, `directories`, `policies/nfs`, `policies/smb`, and `policies/snapshot`, etc.") + __properties = ["name", "resource_type"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> ReferenceNoIdWithType: + """Create an instance of ReferenceNoIdWithType from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> ReferenceNoIdWithType: + """Create an instance of ReferenceNoIdWithType from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ReferenceNoIdWithType.parse_obj(obj) + + _obj = ReferenceNoIdWithType.construct(_fields_set=None, **{ + "name": obj.get("name"), + "resource_type": obj.get("resource_type") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/reference_with_fixed_type_v_2_55.py b/pypureclient/flasharray/_common/models/reference_with_fixed_type_v_2_55.py new file mode 100644 index 0000000000..ae17ff2903 --- /dev/null +++ b/pypureclient/flasharray/_common/models/reference_with_fixed_type_v_2_55.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr + + +class ReferenceWithFixedType(BaseModel): + """ + ReferenceWithFixedType + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified.") + name: Optional[StrictStr] = Field(default=None, description="The resource name, such as volume name, pod name, snapshot name, and so on.") + resource_type: Optional[StrictStr] = Field(default=None, description="Type of the object (full name of the endpoint). Valid values are `hosts`, `host-groups`, `network-interfaces`, `pods`, `ports`, `pod-replica-links`, `realms`, `subnets`, `volumes`, `volume-snapshots`, `volume-groups`, `directories`, `policies/nfs`, `policies/smb`, and `policies/snapshot`, etc.") + __properties = ["id", "name", "resource_type"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "resource_type", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> ReferenceWithFixedType: + """Create an instance of ReferenceWithFixedType from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> ReferenceWithFixedType: + """Create an instance of ReferenceWithFixedType from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ReferenceWithFixedType.parse_obj(obj) + + _obj = ReferenceWithFixedType.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "resource_type": obj.get("resource_type") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/remote_realm_v_2_55.py b/pypureclient/flasharray/_common/models/remote_realm_v_2_55.py new file mode 100644 index 0000000000..20e8469847 --- /dev/null +++ b/pypureclient/flasharray/_common/models/remote_realm_v_2_55.py @@ -0,0 +1,145 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.realm_remote_array_status_v_2_55 import RealmRemoteArrayStatus +from pypureclient.flasharray._common.models.reference_with_type_v_2_54 import ReferenceWithType + + +class RemoteRealm(BaseModel): + """ + RemoteRealm + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + arrays: Optional[conlist(RealmRemoteArrayStatus, min_items=1)] = None + members: Optional[conlist(ReferenceWithType, min_items=1)] = Field(default=None, description="The list of `arrays` over which the `realm` is stretched. If there are two or more `members` in the `stretched realm`, all `data` in the `realm` is synchronously replicated among all of the `members`.") + __properties = ["context", "id", "name", "arrays", "members"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "id", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in arrays (list) + if _include_in_dict('arrays', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.arrays: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['arrays'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in members (list) + if _include_in_dict('members', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.members: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['members'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> RemoteRealm: + """Create an instance of RemoteRealm from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> RemoteRealm: + """Create an instance of RemoteRealm from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RemoteRealm.parse_obj(obj) + + _obj = RemoteRealm.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "id": obj.get("id"), + "name": obj.get("name"), + "arrays": [RealmRemoteArrayStatus.from_dict(_item) for _item in obj.get("arrays")] if obj.get("arrays") is not None else None, + "members": [ReferenceWithType.from_dict(_item) for _item in obj.get("members")] if obj.get("members") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/remote_realms_response_v_2_55.py b/pypureclient/flasharray/_common/models/remote_realms_response_v_2_55.py new file mode 100644 index 0000000000..28fdd3a0fe --- /dev/null +++ b/pypureclient/flasharray/_common/models/remote_realms_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.remote_realm_v_2_55 import RemoteRealm + + +class RemoteRealmsResponse(BaseModel): + """ + RemoteRealmsResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + items: Optional[conlist(RemoteRealm)] = Field(default=None, description="Displays a list of all items after filtering. The values are displayed for each name where meaningful.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "errors", "items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> RemoteRealmsResponse: + """Create an instance of RemoteRealmsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> RemoteRealmsResponse: + """Create an instance of RemoteRealmsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return RemoteRealmsResponse.parse_obj(obj) + + _obj = RemoteRealmsResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None, + "items": [RemoteRealm.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/server_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/server_get_response_v_2_55.py new file mode 100644 index 0000000000..fd2842961c --- /dev/null +++ b/pypureclient/flasharray/_common/models/server_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.server_v_2_55 import Server + + +class ServerGetResponse(BaseModel): + """ + ServerGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(Server)] = Field(default=None, description="The aggregate value of all items after filtering. When applicable, the average value is displayed instead. The values are displayed for each field, if meaningful.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> ServerGetResponse: + """Create an instance of ServerGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> ServerGetResponse: + """Create an instance of ServerGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ServerGetResponse.parse_obj(obj) + + _obj = ServerGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [Server.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/server_response_v_2_55.py b/pypureclient/flasharray/_common/models/server_response_v_2_55.py new file mode 100644 index 0000000000..03ccacc9ee --- /dev/null +++ b/pypureclient/flasharray/_common/models/server_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.server_v_2_55 import Server + + +class ServerResponse(BaseModel): + """ + ServerResponse + """ + items: Optional[conlist(Server)] = Field(default=None, description="The aggregate value of all items after filtering. When applicable, the average value is displayed instead. The values are displayed for each field, if meaningful.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> ServerResponse: + """Create an instance of ServerResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> ServerResponse: + """Create an instance of ServerResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return ServerResponse.parse_obj(obj) + + _obj = ServerResponse.construct(_fields_set=None, **{ + "items": [Server.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/server_v_2_55.py b/pypureclient/flasharray/_common/models/server_v_2_55.py new file mode 100644 index 0000000000..e55ab5d40f --- /dev/null +++ b/pypureclient/flasharray/_common/models/server_v_2_55.py @@ -0,0 +1,161 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType + + +class Server(BaseModel): + """ + Server + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + realms: Optional[conlist(FixedReferenceWithType)] = Field(default=None, description="Reference to the realms this resource belongs to. The value is set to empty array when the resource lives outside of a realm.") + created: Optional[StrictInt] = Field(default=None, description="Creation timestamp of the server.") + directory_services: Optional[conlist(FixedReferenceWithType, max_items=1)] = Field(default=None, description="The directory service configuration to be used by this server.") + dns: Optional[conlist(FixedReferenceWithType, max_items=1)] = Field(default=None, description="The DNS configuration to be used by this server.") + local_directory_service: Optional[FixedReferenceWithType] = Field(default=None, description="The Local Directory Service associated to the server.") + __properties = ["id", "name", "context", "realms", "created", "directory_services", "dns", "local_directory_service"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "context", + "realms", + "created", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in realms (list) + if _include_in_dict('realms', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.realms: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['realms'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in directory_services (list) + if _include_in_dict('directory_services', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.directory_services: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['directory_services'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in dns (list) + if _include_in_dict('dns', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.dns: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['dns'] = _items + # override the default output from pydantic by calling `to_dict()` of local_directory_service + if _include_in_dict('local_directory_service', include_readonly, excluded_fields, none_fields): + _dict['local_directory_service'] = self.local_directory_service.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> Server: + """Create an instance of Server from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> Server: + """Create an instance of Server from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Server.parse_obj(obj) + + _obj = Server.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "realms": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("realms")] if obj.get("realms") is not None else None, + "created": obj.get("created"), + "directory_services": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("directory_services")] if obj.get("directory_services") is not None else None, + "dns": [FixedReferenceWithType.from_dict(_item) for _item in obj.get("dns")] if obj.get("dns") is not None else None, + "local_directory_service": FixedReferenceWithType.from_dict(obj.get("local_directory_service")) if obj.get("local_directory_service") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/storage_class_member_v_2_56.py b/pypureclient/flasharray/_common/models/storage_class_member_v_2_56.py new file mode 100644 index 0000000000..63bfe3d726 --- /dev/null +++ b/pypureclient/flasharray/_common/models/storage_class_member_v_2_56.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.56 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field +except ModuleNotFoundError: + from pydantic import BaseModel, Field +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.fixed_reference_without_id_v_2_56 import FixedReferenceWithoutId + + +class StorageClassMember(BaseModel): + """ + StorageClassMember + """ + member: Optional[FixedReferenceWithType] = Field(default=None, description="A reference to the `storage class member`.") + storage_class: Optional[FixedReferenceWithoutId] = Field(default=None, description="A reference to the `storage class`.") + __properties = ["member", "storage_class"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of member + if _include_in_dict('member', include_readonly, excluded_fields, none_fields): + _dict['member'] = self.member.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of storage_class + if _include_in_dict('storage_class', include_readonly, excluded_fields, none_fields): + _dict['storage_class'] = self.storage_class.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> StorageClassMember: + """Create an instance of StorageClassMember from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> StorageClassMember: + """Create an instance of StorageClassMember from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return StorageClassMember.parse_obj(obj) + + _obj = StorageClassMember.construct(_fields_set=None, **{ + "member": FixedReferenceWithType.from_dict(obj.get("member")) if obj.get("member") is not None else None, + "storage_class": FixedReferenceWithoutId.from_dict(obj.get("storage_class")) if obj.get("storage_class") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/storage_classes_member_response_v_2_56.py b/pypureclient/flasharray/_common/models/storage_classes_member_response_v_2_56.py new file mode 100644 index 0000000000..aa984d665f --- /dev/null +++ b/pypureclient/flasharray/_common/models/storage_classes_member_response_v_2_56.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.56 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.storage_class_member_v_2_56 import StorageClassMember + + +class StorageClassesMemberResponse(BaseModel): + """ + StorageClassesMemberResponse + """ + items: Optional[conlist(StorageClassMember)] = Field(default=None, description="The list of `storage class membership` results.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> StorageClassesMemberResponse: + """Create an instance of StorageClassesMemberResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> StorageClassesMemberResponse: + """Create an instance of StorageClassesMemberResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return StorageClassesMemberResponse.parse_obj(obj) + + _obj = StorageClassesMemberResponse.construct(_fields_set=None, **{ + "items": [StorageClassMember.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/storage_classes_members_get_response_v_2_56.py b/pypureclient/flasharray/_common/models/storage_classes_members_get_response_v_2_56.py new file mode 100644 index 0000000000..01533585bd --- /dev/null +++ b/pypureclient/flasharray/_common/models/storage_classes_members_get_response_v_2_56.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.56 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.storage_class_member_v_2_56 import StorageClassMember + + +class StorageClassesMembersGetResponse(BaseModel): + """ + StorageClassesMembersGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(StorageClassMember)] = Field(default=None, description="The list of `storage class membership` results.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> StorageClassesMembersGetResponse: + """Create an instance of StorageClassesMembersGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> StorageClassesMembersGetResponse: + """Create an instance of StorageClassesMembersGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return StorageClassesMembersGetResponse.parse_obj(obj) + + _obj = StorageClassesMembersGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [StorageClassMember.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/subnet_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/subnet_get_response_v_2_55.py new file mode 100644 index 0000000000..55ec527421 --- /dev/null +++ b/pypureclient/flasharray/_common/models/subnet_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.subnet_v_2_55 import Subnet + + +class SubnetGetResponse(BaseModel): + """ + SubnetGetResponse + """ + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(Subnet)] = None + __properties = ["errors", "continuation_token", "more_items_remaining", "total_item_count", "items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> SubnetGetResponse: + """Create an instance of SubnetGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> SubnetGetResponse: + """Create an instance of SubnetGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SubnetGetResponse.parse_obj(obj) + + _obj = SubnetGetResponse.construct(_fields_set=None, **{ + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None, + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [Subnet.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/subnet_response_v_2_55.py b/pypureclient/flasharray/_common/models/subnet_response_v_2_55.py new file mode 100644 index 0000000000..a456e9b1d5 --- /dev/null +++ b/pypureclient/flasharray/_common/models/subnet_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, conlist +from pypureclient.flasharray._common.models.subnet_v_2_55 import Subnet + + +class SubnetResponse(BaseModel): + """ + SubnetResponse + """ + items: Optional[conlist(Subnet)] = None + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> SubnetResponse: + """Create an instance of SubnetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> SubnetResponse: + """Create an instance of SubnetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return SubnetResponse.parse_obj(obj) + + _obj = SubnetResponse.construct(_fields_set=None, **{ + "items": [Subnet.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/subnet_v_2_55.py b/pypureclient/flasharray/_common/models/subnet_v_2_55.py new file mode 100644 index 0000000000..5ce7af3cdf --- /dev/null +++ b/pypureclient/flasharray/_common/models/subnet_v_2_55.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conint, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conint, conlist +from pypureclient.flasharray._common.models.fixed_reference_no_id_v_2_0 import FixedReferenceNoId +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType + + +class Subnet(BaseModel): + """ + Subnet + """ + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + enabled: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subnet is enabled. Returns a value of `false` if subnet is disabled. If not specified, defaults to `true`.") + gateway: Optional[StrictStr] = Field(default=None, description="The IPv4 or IPv6 address of the gateway through which the specified subnet is to communicate with the network.") + mtu: Optional[conint(strict=True, le=9216, ge=1280)] = Field(default=None, description="Maximum message transfer unit (packet) size for the subnet in bytes. MTU setting cannot exceed the MTU of the corresponding physical interface. If not specified, defaults to `1500`.") + prefix: Optional[StrictStr] = Field(default=None, description="The IPv4 or IPv6 address to be associated with the specified subnet.") + vlan: Optional[StrictInt] = Field(default=None, description="VLAN ID number.") + interfaces: Optional[conlist(FixedReferenceNoId)] = Field(default=None, description="List of network interfaces associated with this subnet.") + services: Optional[conlist(StrictStr)] = Field(default=None, description="The services provided by this subnet, as inherited from all of its interfaces.") + __properties = ["context", "name", "enabled", "gateway", "mtu", "prefix", "vlan", "interfaces", "services"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "context", + "interfaces", + "services", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in interfaces (list) + if _include_in_dict('interfaces', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.interfaces: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['interfaces'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> Subnet: + """Create an instance of Subnet from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> Subnet: + """Create an instance of Subnet from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Subnet.parse_obj(obj) + + _obj = Subnet.construct(_fields_set=None, **{ + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "name": obj.get("name"), + "enabled": obj.get("enabled"), + "gateway": obj.get("gateway"), + "mtu": obj.get("mtu"), + "prefix": obj.get("prefix"), + "vlan": obj.get("vlan"), + "interfaces": [FixedReferenceNoId.from_dict(_item) for _item in obj.get("interfaces")] if obj.get("interfaces") is not None else None, + "services": obj.get("services") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/vchost_certificate_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/vchost_certificate_get_response_v_2_55.py new file mode 100644 index 0000000000..79526e4d53 --- /dev/null +++ b/pypureclient/flasharray/_common/models/vchost_certificate_get_response_v_2_55.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.vchost_certificate_v_2_55 import VchostCertificate + + +class VchostCertificateGetResponse(BaseModel): + """ + VchostCertificateGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(VchostCertificate)] = Field(default=None, description="Returns a list of all items after filtering. If applicable, the values are displayed for each name.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> VchostCertificateGetResponse: + """Create an instance of VchostCertificateGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> VchostCertificateGetResponse: + """Create an instance of VchostCertificateGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VchostCertificateGetResponse.parse_obj(obj) + + _obj = VchostCertificateGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [VchostCertificate.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/vchost_certificate_post_v_2_55.py b/pypureclient/flasharray/_common/models/vchost_certificate_post_v_2_55.py new file mode 100644 index 0000000000..3b9c482187 --- /dev/null +++ b/pypureclient/flasharray/_common/models/vchost_certificate_post_v_2_55.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr, conlist +from pypureclient.flasharray._common.models.reference_no_id_with_type_v_2_55 import ReferenceNoIdWithType + + +class VchostCertificatePost(BaseModel): + """ + VchostCertificatePost + """ + certificate: Optional[ReferenceNoIdWithType] = Field(default=None, description="The certificate to be presented by the vchost over the configured endpoints.") + endpoints: Optional[conlist(StrictStr)] = Field(default=None, description="The IPv4 or IPv6 addresses of the endpoints to configure for the vchost, over which the configured certificate will be presented.") + __properties = ["certificate", "endpoints"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of certificate + if _include_in_dict('certificate', include_readonly, excluded_fields, none_fields): + _dict['certificate'] = self.certificate.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> VchostCertificatePost: + """Create an instance of VchostCertificatePost from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> VchostCertificatePost: + """Create an instance of VchostCertificatePost from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VchostCertificatePost.parse_obj(obj) + + _obj = VchostCertificatePost.construct(_fields_set=None, **{ + "certificate": ReferenceNoIdWithType.from_dict(obj.get("certificate")) if obj.get("certificate") is not None else None, + "endpoints": obj.get("endpoints") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/vchost_certificate_response_v_2_55.py b/pypureclient/flasharray/_common/models/vchost_certificate_response_v_2_55.py new file mode 100644 index 0000000000..ca9d59b989 --- /dev/null +++ b/pypureclient/flasharray/_common/models/vchost_certificate_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.vchost_certificate_v_2_55 import VchostCertificate + + +class VchostCertificateResponse(BaseModel): + """ + VchostCertificateResponse + """ + items: Optional[conlist(VchostCertificate)] = Field(default=None, description="Returns a list of all items after filtering. If applicable, the values are displayed for each name.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> VchostCertificateResponse: + """Create an instance of VchostCertificateResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> VchostCertificateResponse: + """Create an instance of VchostCertificateResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VchostCertificateResponse.parse_obj(obj) + + _obj = VchostCertificateResponse.construct(_fields_set=None, **{ + "items": [VchostCertificate.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/vchost_certificate_v_2_55.py b/pypureclient/flasharray/_common/models/vchost_certificate_v_2_55.py new file mode 100644 index 0000000000..68cca95a56 --- /dev/null +++ b/pypureclient/flasharray/_common/models/vchost_certificate_v_2_55.py @@ -0,0 +1,131 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist +from pypureclient.flasharray._common.models.reference_no_id_with_type_v_2_55 import ReferenceNoIdWithType +from pypureclient.flasharray._common.models.reference_with_type_v_2_54 import ReferenceWithType + + +class VchostCertificate(BaseModel): + """ + VchostCertificate + """ + certificate: Optional[ReferenceNoIdWithType] = Field(default=None, description="A reference to the certificate that will be presented to clients accessing the referenced `vchost` using any of the network addresses defined by `endpoints`.") + endpoints: Optional[conlist(StrictStr)] = Field(default=None, description="The IPv4 or IPv6 addresses of the endpoints to configure for the vchost, over which the configured certificate will be presented.") + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified.") + is_local: Optional[StrictBool] = Field(default=None, description="Returns true if the vchost certificate is local to the array, and false otherwise.") + vchost: Optional[ReferenceWithType] = Field(default=None, description="The vchost by which the certificate is to be presented over the configured endpoints.") + __properties = ["certificate", "endpoints", "id", "is_local", "vchost"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of certificate + if _include_in_dict('certificate', include_readonly, excluded_fields, none_fields): + _dict['certificate'] = self.certificate.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of vchost + if _include_in_dict('vchost', include_readonly, excluded_fields, none_fields): + _dict['vchost'] = self.vchost.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> VchostCertificate: + """Create an instance of VchostCertificate from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> VchostCertificate: + """Create an instance of VchostCertificate from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VchostCertificate.parse_obj(obj) + + _obj = VchostCertificate.construct(_fields_set=None, **{ + "certificate": ReferenceNoIdWithType.from_dict(obj.get("certificate")) if obj.get("certificate") is not None else None, + "endpoints": obj.get("endpoints"), + "id": obj.get("id"), + "is_local": obj.get("is_local"), + "vchost": ReferenceWithType.from_dict(obj.get("vchost")) if obj.get("vchost") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/vchost_endpoint_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/vchost_endpoint_get_response_v_2_55.py new file mode 100644 index 0000000000..2dc8dd90a7 --- /dev/null +++ b/pypureclient/flasharray/_common/models/vchost_endpoint_get_response_v_2_55.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.vchost_endpoint_v_2_55 import VchostEndpoint + + +class VchostEndpointGetResponse(BaseModel): + """ + VchostEndpointGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(VchostEndpoint)] = Field(default=None, description="Returns a list of all items after filtering. If applicable, the values are displayed for each name.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> VchostEndpointGetResponse: + """Create an instance of VchostEndpointGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> VchostEndpointGetResponse: + """Create an instance of VchostEndpointGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VchostEndpointGetResponse.parse_obj(obj) + + _obj = VchostEndpointGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [VchostEndpoint.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/vchost_endpoint_patch_v_2_55.py b/pypureclient/flasharray/_common/models/vchost_endpoint_patch_v_2_55.py new file mode 100644 index 0000000000..bc8af05135 --- /dev/null +++ b/pypureclient/flasharray/_common/models/vchost_endpoint_patch_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.reference_no_id_with_type_v_2_55 import ReferenceNoIdWithType + + +class VchostEndpointPatch(BaseModel): + """ + VchostEndpointPatch + """ + certificates: Optional[conlist(ReferenceNoIdWithType)] = Field(default=None, description="The certificate to be presented by the vchost over the configured endpoints.") + __properties = ["certificates"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in certificates (list) + if _include_in_dict('certificates', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.certificates: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['certificates'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> VchostEndpointPatch: + """Create an instance of VchostEndpointPatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> VchostEndpointPatch: + """Create an instance of VchostEndpointPatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VchostEndpointPatch.parse_obj(obj) + + _obj = VchostEndpointPatch.construct(_fields_set=None, **{ + "certificates": [ReferenceNoIdWithType.from_dict(_item) for _item in obj.get("certificates")] if obj.get("certificates") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/vchost_endpoint_post_v_2_55.py b/pypureclient/flasharray/_common/models/vchost_endpoint_post_v_2_55.py new file mode 100644 index 0000000000..bdf35b5680 --- /dev/null +++ b/pypureclient/flasharray/_common/models/vchost_endpoint_post_v_2_55.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr, conlist +from pypureclient.flasharray._common.models.reference_no_id_with_type_v_2_55 import ReferenceNoIdWithType + + +class VchostEndpointPost(BaseModel): + """ + VchostEndpointPost + """ + certificates: Optional[conlist(ReferenceNoIdWithType)] = Field(default=None, description="The certificate to be presented by the vchost over the configured endpoints.") + endpoint: Optional[StrictStr] = Field(default=None, description="The IPv4 or IPv6 address of the endpoint.") + __properties = ["certificates", "endpoint"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in certificates (list) + if _include_in_dict('certificates', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.certificates: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['certificates'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> VchostEndpointPost: + """Create an instance of VchostEndpointPost from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> VchostEndpointPost: + """Create an instance of VchostEndpointPost from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VchostEndpointPost.parse_obj(obj) + + _obj = VchostEndpointPost.construct(_fields_set=None, **{ + "certificates": [ReferenceNoIdWithType.from_dict(_item) for _item in obj.get("certificates")] if obj.get("certificates") is not None else None, + "endpoint": obj.get("endpoint") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/vchost_endpoint_response_v_2_55.py b/pypureclient/flasharray/_common/models/vchost_endpoint_response_v_2_55.py new file mode 100644 index 0000000000..68f2561263 --- /dev/null +++ b/pypureclient/flasharray/_common/models/vchost_endpoint_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.vchost_endpoint_v_2_55 import VchostEndpoint + + +class VchostEndpointResponse(BaseModel): + """ + VchostEndpointResponse + """ + items: Optional[conlist(VchostEndpoint)] = Field(default=None, description="Returns a list of all items after filtering. If applicable, the values are displayed for each name.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> VchostEndpointResponse: + """Create an instance of VchostEndpointResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> VchostEndpointResponse: + """Create an instance of VchostEndpointResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VchostEndpointResponse.parse_obj(obj) + + _obj = VchostEndpointResponse.construct(_fields_set=None, **{ + "items": [VchostEndpoint.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/vchost_endpoint_v_2_55.py b/pypureclient/flasharray/_common/models/vchost_endpoint_v_2_55.py new file mode 100644 index 0000000000..368c8e1810 --- /dev/null +++ b/pypureclient/flasharray/_common/models/vchost_endpoint_v_2_55.py @@ -0,0 +1,135 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictStr, conlist +from pypureclient.flasharray._common.models.reference_no_id_with_type_v_2_55 import ReferenceNoIdWithType +from pypureclient.flasharray._common.models.reference_with_type_v_2_54 import ReferenceWithType + + +class VchostEndpoint(BaseModel): + """ + VchostEndpoint + """ + certificates: Optional[conlist(ReferenceNoIdWithType)] = Field(default=None, description="The certificate to be presented by the vchost over the configured endpoints.") + endpoint: Optional[StrictStr] = Field(default=None, description="The IPv4 or IPv6 address of the endpoint.") + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified.") + is_local: Optional[StrictBool] = Field(default=None, description="Returns true if the vchost endpoint is local to the array, and false otherwise.") + vchost: Optional[ReferenceWithType] = Field(default=None, description="The vchost for which this endpoint is to be configured.") + __properties = ["certificates", "endpoint", "id", "is_local", "vchost"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in certificates (list) + if _include_in_dict('certificates', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.certificates: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['certificates'] = _items + # override the default output from pydantic by calling `to_dict()` of vchost + if _include_in_dict('vchost', include_readonly, excluded_fields, none_fields): + _dict['vchost'] = self.vchost.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> VchostEndpoint: + """Create an instance of VchostEndpoint from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> VchostEndpoint: + """Create an instance of VchostEndpoint from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VchostEndpoint.parse_obj(obj) + + _obj = VchostEndpoint.construct(_fields_set=None, **{ + "certificates": [ReferenceNoIdWithType.from_dict(_item) for _item in obj.get("certificates")] if obj.get("certificates") is not None else None, + "endpoint": obj.get("endpoint"), + "id": obj.get("id"), + "is_local": obj.get("is_local"), + "vchost": ReferenceWithType.from_dict(obj.get("vchost")) if obj.get("vchost") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/volume_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/volume_get_response_v_2_55.py new file mode 100644 index 0000000000..b7c7b96fd7 --- /dev/null +++ b/pypureclient/flasharray/_common/models/volume_get_response_v_2_55.py @@ -0,0 +1,149 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.volume_v_2_55 import Volume + + +class VolumeGetResponse(BaseModel): + """ + VolumeGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(Volume)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name. If `total_only=true`, the `items` list is empty.") + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + total: Optional[conlist(Volume)] = Field(default=None, description="The aggregate value of all items after filtering. If applicable, the average value is displayed instead. If applicable, the values are displayed for each field.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors", "total"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in total (list) + if _include_in_dict('total', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.total: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['total'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> VolumeGetResponse: + """Create an instance of VolumeGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> VolumeGetResponse: + """Create an instance of VolumeGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VolumeGetResponse.parse_obj(obj) + + _obj = VolumeGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [Volume.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None, + "total": [Volume.from_dict(_item) for _item in obj.get("total")] if obj.get("total") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/volume_patch_v_2_55.py b/pypureclient/flasharray/_common/models/volume_patch_v_2_55.py new file mode 100644 index 0000000000..e93fef5e7c --- /dev/null +++ b/pypureclient/flasharray/_common/models/volume_patch_v_2_55.py @@ -0,0 +1,156 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conint +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictStr, conint +from pypureclient.flasharray._common.models.priority_adjustment_v_2_10 import PriorityAdjustment +from pypureclient.flasharray._common.models.protocol_endpoint_v_2_33 import ProtocolEndpoint +from pypureclient.flasharray._common.models.qos_patch_v_2_52 import QosPatch +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.workload_configuration_reference_patch_v_2_55 import WorkloadConfigurationReferencePatch + + +class VolumePatch(BaseModel): + """ + VolumePatch + """ + destroyed: Optional[StrictBool] = Field(default=None, description="If set to `true`, destroys a resource. Once set to `true`, the `time_remaining` value will display the amount of time left until the destroyed resource is permanently eradicated. Before the `time_remaining` period has elapsed, the destroyed resource can be recovered by setting `destroyed=false`. Once the `time_remaining` period has elapsed, the resource is permanently eradicated and can no longer be recovered.") + name: Optional[StrictStr] = Field(default=None, description="The new name for the resource.") + pod: Optional[Reference] = Field(default=None, description="Moves the volume into the specified pod.") + priority_adjustment: Optional[PriorityAdjustment] = Field(default=None, description="Adjusts volume priority.") + protocol_endpoint: Optional[ProtocolEndpoint] = Field(default=None, description="Sets the properties that are specific to protocol endpoints. This can only be used in conjunction to `subtype=protocol_endpoint`.") + provisioned: Optional[conint(strict=True, le=4503599627370496)] = Field(default=None, description="Updates the virtual size of the volume, measured in bytes.") + qos: Optional[QosPatch] = Field(default=None, description="Sets QoS limits.") + requested_promotion_state: Optional[StrictStr] = Field(default=None, description="Valid values are `promoted` and `demoted`. Patch `requested_promotion_state` to `demoted` to demote the volume so that the volume stops accepting write requests. Patch `requested_promotion_state` to `promoted` to promote the volume so that the volume starts accepting write requests.") + volume_group: Optional[Reference] = Field(default=None, description="Adds the volume to the specified volume group.") + workload: Optional[WorkloadConfigurationReferencePatch] = None + __properties = ["destroyed", "name", "pod", "priority_adjustment", "protocol_endpoint", "provisioned", "qos", "requested_promotion_state", "volume_group", "workload"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of pod + if _include_in_dict('pod', include_readonly, excluded_fields, none_fields): + _dict['pod'] = self.pod.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of priority_adjustment + if _include_in_dict('priority_adjustment', include_readonly, excluded_fields, none_fields): + _dict['priority_adjustment'] = self.priority_adjustment.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of protocol_endpoint + if _include_in_dict('protocol_endpoint', include_readonly, excluded_fields, none_fields): + _dict['protocol_endpoint'] = self.protocol_endpoint.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of qos + if _include_in_dict('qos', include_readonly, excluded_fields, none_fields): + _dict['qos'] = self.qos.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of volume_group + if _include_in_dict('volume_group', include_readonly, excluded_fields, none_fields): + _dict['volume_group'] = self.volume_group.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of workload + if _include_in_dict('workload', include_readonly, excluded_fields, none_fields): + _dict['workload'] = self.workload.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> VolumePatch: + """Create an instance of VolumePatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> VolumePatch: + """Create an instance of VolumePatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VolumePatch.parse_obj(obj) + + _obj = VolumePatch.construct(_fields_set=None, **{ + "destroyed": obj.get("destroyed"), + "name": obj.get("name"), + "pod": Reference.from_dict(obj.get("pod")) if obj.get("pod") is not None else None, + "priority_adjustment": PriorityAdjustment.from_dict(obj.get("priority_adjustment")) if obj.get("priority_adjustment") is not None else None, + "protocol_endpoint": ProtocolEndpoint.from_dict(obj.get("protocol_endpoint")) if obj.get("protocol_endpoint") is not None else None, + "provisioned": obj.get("provisioned"), + "qos": QosPatch.from_dict(obj.get("qos")) if obj.get("qos") is not None else None, + "requested_promotion_state": obj.get("requested_promotion_state"), + "volume_group": Reference.from_dict(obj.get("volume_group")) if obj.get("volume_group") is not None else None, + "workload": WorkloadConfigurationReferencePatch.from_dict(obj.get("workload")) if obj.get("workload") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/volume_post_v_2_55.py b/pypureclient/flasharray/_common/models/volume_post_v_2_55.py new file mode 100644 index 0000000000..16c5ec41a8 --- /dev/null +++ b/pypureclient/flasharray/_common/models/volume_post_v_2_55.py @@ -0,0 +1,159 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictStr, conint, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictStr, conint, conlist +from pypureclient.flasharray._common.models.priority_adjustment_v_2_10 import PriorityAdjustment +from pypureclient.flasharray._common.models.protocol_endpoint_v_2_33 import ProtocolEndpoint +from pypureclient.flasharray._common.models.qos_v_2_0 import Qos +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.tag_v_2_50 import Tag +from pypureclient.flasharray._common.models.workload_configuration_reference_post_v_2_55 import WorkloadConfigurationReferencePost + + +class VolumePost(BaseModel): + """ + VolumePost + """ + destroyed: Optional[StrictBool] = Field(default=None, description="If set to `true`, destroys a resource. Once set to `true`, the `time_remaining` value will display the amount of time left until the destroyed resource is permanently eradicated. Before the `time_remaining` period has elapsed, the destroyed resource can be recovered by setting `destroyed=false`. Once the `time_remaining` period has elapsed, the resource is permanently eradicated and can no longer be recovered.") + priority_adjustment: Optional[PriorityAdjustment] = Field(default=None, description="Adjusts volume priority.") + protocol_endpoint: Optional[ProtocolEndpoint] = Field(default=None, description="Sets the properties that are specific to protocol endpoints. This can only be used in conjunction to `subtype=protocol_endpoint`.") + provisioned: Optional[conint(strict=True, le=4503599627370496)] = Field(default=None, description="Sets the virtual size of the volume, measured in bytes.") + qos: Optional[Qos] = Field(default=None, description="Sets QoS limits.") + source: Optional[Reference] = Field(default=None, description="The source volume of a volume copy.") + subtype: Optional[StrictStr] = Field(default=None, description="The type of volume. Valid values are `protocol_endpoint` and `regular`.") + tags: Optional[conlist(Tag)] = Field(default=None, description="The list of tags to be upserted with the object.") + workload: Optional[WorkloadConfigurationReferencePost] = None + __properties = ["destroyed", "priority_adjustment", "protocol_endpoint", "provisioned", "qos", "source", "subtype", "tags", "workload"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of priority_adjustment + if _include_in_dict('priority_adjustment', include_readonly, excluded_fields, none_fields): + _dict['priority_adjustment'] = self.priority_adjustment.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of protocol_endpoint + if _include_in_dict('protocol_endpoint', include_readonly, excluded_fields, none_fields): + _dict['protocol_endpoint'] = self.protocol_endpoint.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of qos + if _include_in_dict('qos', include_readonly, excluded_fields, none_fields): + _dict['qos'] = self.qos.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of source + if _include_in_dict('source', include_readonly, excluded_fields, none_fields): + _dict['source'] = self.source.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of each item in tags (list) + if _include_in_dict('tags', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.tags: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['tags'] = _items + # override the default output from pydantic by calling `to_dict()` of workload + if _include_in_dict('workload', include_readonly, excluded_fields, none_fields): + _dict['workload'] = self.workload.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> VolumePost: + """Create an instance of VolumePost from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> VolumePost: + """Create an instance of VolumePost from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VolumePost.parse_obj(obj) + + _obj = VolumePost.construct(_fields_set=None, **{ + "destroyed": obj.get("destroyed"), + "priority_adjustment": PriorityAdjustment.from_dict(obj.get("priority_adjustment")) if obj.get("priority_adjustment") is not None else None, + "protocol_endpoint": ProtocolEndpoint.from_dict(obj.get("protocol_endpoint")) if obj.get("protocol_endpoint") is not None else None, + "provisioned": obj.get("provisioned"), + "qos": Qos.from_dict(obj.get("qos")) if obj.get("qos") is not None else None, + "source": Reference.from_dict(obj.get("source")) if obj.get("source") is not None else None, + "subtype": obj.get("subtype"), + "tags": [Tag.from_dict(_item) for _item in obj.get("tags")] if obj.get("tags") is not None else None, + "workload": WorkloadConfigurationReferencePost.from_dict(obj.get("workload")) if obj.get("workload") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/volume_response_v_2_55.py b/pypureclient/flasharray/_common/models/volume_response_v_2_55.py new file mode 100644 index 0000000000..17687dfe4e --- /dev/null +++ b/pypureclient/flasharray/_common/models/volume_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.volume_v_2_55 import Volume + + +class VolumeResponse(BaseModel): + """ + VolumeResponse + """ + items: Optional[conlist(Volume)] = Field(default=None, description="Displays a list of all items after filtering. If applicable, the values are displayed for each name. If `total_only=true`, the `items` list is empty.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> VolumeResponse: + """Create an instance of VolumeResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> VolumeResponse: + """Create an instance of VolumeResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VolumeResponse.parse_obj(obj) + + _obj = VolumeResponse.construct(_fields_set=None, **{ + "items": [Volume.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/volume_v_2_55.py b/pypureclient/flasharray/_common/models/volume_v_2_55.py new file mode 100644 index 0000000000..f332f1127e --- /dev/null +++ b/pypureclient/flasharray/_common/models/volume_v_2_55.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr +from pypureclient.flasharray._common.models.fixed_reference_v_2_49 import FixedReference +from pypureclient.flasharray._common.models.fixed_reference_with_type_v_2_49 import FixedReferenceWithType +from pypureclient.flasharray._common.models.priority_adjustment_v_2_10 import PriorityAdjustment +from pypureclient.flasharray._common.models.protocol_endpoint_v_2_33 import ProtocolEndpoint +from pypureclient.flasharray._common.models.qos_v_2_0 import Qos +from pypureclient.flasharray._common.models.reference_v_2_49 import Reference +from pypureclient.flasharray._common.models.volume_space_common_v_2_50 import VolumeSpaceCommon +from pypureclient.flasharray._common.models.workload_configuration_reference_v_2_55 import WorkloadConfigurationReference + + +class Volume(BaseModel): + """ + Volume + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified and cannot refer to another resource.") + name: Optional[StrictStr] = Field(default=None, description="A user-specified name. The name must be locally unique and can be changed.") + connection_count: Optional[StrictInt] = Field(default=None, description="The total number of hosts and host groups connected to the volume.") + created: Optional[StrictInt] = Field(default=None, description="The volume creation time, measured in milliseconds since the UNIX epoch.") + destroyed: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if the volume has been destroyed and is pending eradication. The `time_remaining` value displays the amount of time left until the destroyed volume is permanently eradicated. Before the `time_remaining` period has elapsed, the destroyed volume can be recovered by setting `destroyed=false`. Once the `time_remaining` period has elapsed, the volume is permanently eradicated and can no longer be recovered.") + host_encryption_key_status: Optional[StrictStr] = Field(default=None, description="The host encryption key status for this volume. Values include `none`, `detected`, and `fetched`.") + priority_adjustment: Optional[PriorityAdjustment] = Field(default=None, description="Priority adjustment operator and value.") + provisioned: Optional[StrictInt] = Field(default=None, description="The virtual size of the volume as a multiple of 512, measured in bytes. The maximum size is 4503599627370496 (4PB).") + qos: Optional[Qos] = Field(default=None, description="Displays QoS limit information.") + serial: Optional[StrictStr] = Field(default=None, description="A globally unique serial number generated by the FlashArray when the volume is created.") + space: Optional[VolumeSpaceCommon] = Field(default=None, description="Displays size and space consumption information.") + time_remaining: Optional[StrictInt] = Field(default=None, description="The amount of time left until the destroyed volume is permanently eradicated, measured in milliseconds. Before the `time_remaining` period has elapsed, the destroyed volume can be recovered by setting `destroyed=false`.") + context: Optional[FixedReferenceWithType] = Field(default=None, description="The context in which the operation was performed. Valid values include a reference to any array which is a member of the same fleet or to the fleet itself. Other parameters provided with the request, such as names of volumes or snapshots, are resolved relative to the provided `context`.") + pod: Optional[Reference] = Field(default=None, description="A reference to the pod.") + priority: Optional[StrictInt] = Field(default=None, description="The current priority value. Priority is calculated by combining all applicable relative `priority_adjustment` values or taking the exact value if the volume has an absolute `priority_adjustment` (specified by an `=` `priority_adjustment_operator`).") + promotion_status: Optional[StrictStr] = Field(default=None, description="Current promotion status of a volume. Values include `promoted` and `demoted`. A status of `promoted` indicates that the volume has been promoted and can accept write requests from hosts. This is the default status for a volume when it is created. A status of `demoted` indicates that the volume has been demoted and no longer accepts write requests.") + protocol_endpoint: Optional[ProtocolEndpoint] = Field(default=None, description="Properties that are specific to volumes of `subtype=protocol_endpoint`.") + requested_promotion_state: Optional[StrictStr] = Field(default=None, description="Values include `promoted` and `demoted`. Patch `requested_promotion_state` to `demoted` to demote the volume so that the volume stops accepting write requests. Patch `requested_promotion_state` to `promoted` to promote the volume so that the volume starts accepting write requests.") + source: Optional[FixedReference] = Field(default=None, description="A reference to the originating volume as a result of a volume copy.") + subtype: Optional[StrictStr] = Field(default=None, description="The type of volume. Values include `protocol_endpoint` and `regular`.") + volume_group: Optional[Reference] = Field(default=None, description="A reference to the volume group.") + workload: Optional[WorkloadConfigurationReference] = None + __properties = ["id", "name", "connection_count", "created", "destroyed", "host_encryption_key_status", "priority_adjustment", "provisioned", "qos", "serial", "space", "time_remaining", "context", "pod", "priority", "promotion_status", "protocol_endpoint", "requested_promotion_state", "source", "subtype", "volume_group", "workload"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "id", + "connection_count", + "created", + "host_encryption_key_status", + "serial", + "time_remaining", + "context", + "priority", + "subtype", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of priority_adjustment + if _include_in_dict('priority_adjustment', include_readonly, excluded_fields, none_fields): + _dict['priority_adjustment'] = self.priority_adjustment.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of qos + if _include_in_dict('qos', include_readonly, excluded_fields, none_fields): + _dict['qos'] = self.qos.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of space + if _include_in_dict('space', include_readonly, excluded_fields, none_fields): + _dict['space'] = self.space.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of context + if _include_in_dict('context', include_readonly, excluded_fields, none_fields): + _dict['context'] = self.context.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of pod + if _include_in_dict('pod', include_readonly, excluded_fields, none_fields): + _dict['pod'] = self.pod.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of protocol_endpoint + if _include_in_dict('protocol_endpoint', include_readonly, excluded_fields, none_fields): + _dict['protocol_endpoint'] = self.protocol_endpoint.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of source + if _include_in_dict('source', include_readonly, excluded_fields, none_fields): + _dict['source'] = self.source.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of volume_group + if _include_in_dict('volume_group', include_readonly, excluded_fields, none_fields): + _dict['volume_group'] = self.volume_group.to_dict(include_readonly=include_readonly) + # override the default output from pydantic by calling `to_dict()` of workload + if _include_in_dict('workload', include_readonly, excluded_fields, none_fields): + _dict['workload'] = self.workload.to_dict(include_readonly=include_readonly) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> Volume: + """Create an instance of Volume from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> Volume: + """Create an instance of Volume from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return Volume.parse_obj(obj) + + _obj = Volume.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "connection_count": obj.get("connection_count"), + "created": obj.get("created"), + "destroyed": obj.get("destroyed"), + "host_encryption_key_status": obj.get("host_encryption_key_status"), + "priority_adjustment": PriorityAdjustment.from_dict(obj.get("priority_adjustment")) if obj.get("priority_adjustment") is not None else None, + "provisioned": obj.get("provisioned"), + "qos": Qos.from_dict(obj.get("qos")) if obj.get("qos") is not None else None, + "serial": obj.get("serial"), + "space": VolumeSpaceCommon.from_dict(obj.get("space")) if obj.get("space") is not None else None, + "time_remaining": obj.get("time_remaining"), + "context": FixedReferenceWithType.from_dict(obj.get("context")) if obj.get("context") is not None else None, + "pod": Reference.from_dict(obj.get("pod")) if obj.get("pod") is not None else None, + "priority": obj.get("priority"), + "promotion_status": obj.get("promotion_status"), + "protocol_endpoint": ProtocolEndpoint.from_dict(obj.get("protocol_endpoint")) if obj.get("protocol_endpoint") is not None else None, + "requested_promotion_state": obj.get("requested_promotion_state"), + "source": FixedReference.from_dict(obj.get("source")) if obj.get("source") is not None else None, + "subtype": obj.get("subtype"), + "volume_group": Reference.from_dict(obj.get("volume_group")) if obj.get("volume_group") is not None else None, + "workload": WorkloadConfigurationReference.from_dict(obj.get("workload")) if obj.get("workload") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/volumes_batch_response_v_2_55.py b/pypureclient/flasharray/_common/models/volumes_batch_response_v_2_55.py new file mode 100644 index 0000000000..739a1270e4 --- /dev/null +++ b/pypureclient/flasharray/_common/models/volumes_batch_response_v_2_55.py @@ -0,0 +1,123 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, conlist +from pypureclient.flasharray._common.models.volume_v_2_55 import Volume + + +class VolumesBatchResponse(BaseModel): + """ + VolumesBatchResponse + """ + items: Optional[conlist(Volume)] = Field(default=None, description="Displays a list of all items. If applicable, the values are displayed for each name.") + __properties = ["items"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> VolumesBatchResponse: + """Create an instance of VolumesBatchResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> VolumesBatchResponse: + """Create an instance of VolumesBatchResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return VolumesBatchResponse.parse_obj(obj) + + _obj = VolumesBatchResponse.construct(_fields_set=None, **{ + "items": [Volume.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/workload_configuration_reference_patch_v_2_55.py b/pypureclient/flasharray/_common/models/workload_configuration_reference_patch_v_2_55.py new file mode 100644 index 0000000000..00dda569de --- /dev/null +++ b/pypureclient/flasharray/_common/models/workload_configuration_reference_patch_v_2_55.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr + + +class WorkloadConfigurationReferencePatch(BaseModel): + """ + The instruction for removing the resource from the workload. Setting the `id` or `name` of the workload to an empty string (`\"\"`) removes the resource. + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified.") + name: Optional[StrictStr] = Field(default=None, description="The resource name, such as volume name, pod name, snapshot name, and so on.") + resource_type: Optional[StrictStr] = Field(default=None, description="Type of the object (full name of the endpoint). Valid values are `hosts`, `host-groups`, `network-interfaces`, `pods`, `ports`, `pod-replica-links`, `realms`, `subnets`, `volumes`, `volume-snapshots`, `volume-groups`, `directories`, `policies/nfs`, `policies/smb`, and `policies/snapshot`, etc.") + __properties = ["id", "name", "resource_type"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "resource_type", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> WorkloadConfigurationReferencePatch: + """Create an instance of WorkloadConfigurationReferencePatch from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> WorkloadConfigurationReferencePatch: + """Create an instance of WorkloadConfigurationReferencePatch from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return WorkloadConfigurationReferencePatch.parse_obj(obj) + + _obj = WorkloadConfigurationReferencePatch.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "resource_type": obj.get("resource_type") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/workload_configuration_reference_post_v_2_55.py b/pypureclient/flasharray/_common/models/workload_configuration_reference_post_v_2_55.py new file mode 100644 index 0000000000..e0448ca2ae --- /dev/null +++ b/pypureclient/flasharray/_common/models/workload_configuration_reference_post_v_2_55.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr + + +class WorkloadConfigurationReferencePost(BaseModel): + """ + The workload to which the resource is added. Set one of `id` or `name`, and `configuration` to add the resource to the workload and configure it based on the `configuration` from the preset revision the workload was originally provisioned from. + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified.") + name: Optional[StrictStr] = Field(default=None, description="The resource name, such as volume name, pod name, snapshot name, and so on.") + resource_type: Optional[StrictStr] = Field(default=None, description="Type of the object (full name of the endpoint). Valid values are `hosts`, `host-groups`, `network-interfaces`, `pods`, `ports`, `pod-replica-links`, `realms`, `subnets`, `volumes`, `volume-snapshots`, `volume-groups`, `directories`, `policies/nfs`, `policies/smb`, and `policies/snapshot`, etc.") + configuration: Optional[StrictStr] = Field(default=None, description="The name of the preset configuration object.") + __properties = ["id", "name", "resource_type", "configuration"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "resource_type", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> WorkloadConfigurationReferencePost: + """Create an instance of WorkloadConfigurationReferencePost from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> WorkloadConfigurationReferencePost: + """Create an instance of WorkloadConfigurationReferencePost from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return WorkloadConfigurationReferencePost.parse_obj(obj) + + _obj = WorkloadConfigurationReferencePost.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "resource_type": obj.get("resource_type"), + "configuration": obj.get("configuration") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/workload_configuration_reference_v_2_55.py b/pypureclient/flasharray/_common/models/workload_configuration_reference_v_2_55.py new file mode 100644 index 0000000000..84b815e7e8 --- /dev/null +++ b/pypureclient/flasharray/_common/models/workload_configuration_reference_v_2_55.py @@ -0,0 +1,122 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictStr +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictStr + + +class WorkloadConfigurationReference(BaseModel): + """ + A reference to the workload that is managing this resource. The `name` and `configuration` may show as the string \"(unknown)\" briefly after a failover. + """ + id: Optional[StrictStr] = Field(default=None, description="A globally unique, system-generated ID. The ID cannot be modified.") + name: Optional[StrictStr] = Field(default=None, description="The resource name, such as volume name, pod name, snapshot name, and so on.") + resource_type: Optional[StrictStr] = Field(default=None, description="Type of the object (full name of the endpoint). Valid values are `hosts`, `host-groups`, `network-interfaces`, `pods`, `ports`, `pod-replica-links`, `realms`, `subnets`, `volumes`, `volume-snapshots`, `volume-groups`, `directories`, `policies/nfs`, `policies/smb`, and `policies/snapshot`, etc.") + configuration: Optional[StrictStr] = Field(default=None, description="The name of the preset configuration object.") + __properties = ["id", "name", "resource_type", "configuration"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "resource_type", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> WorkloadConfigurationReference: + """Create an instance of WorkloadConfigurationReference from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> WorkloadConfigurationReference: + """Create an instance of WorkloadConfigurationReference from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return WorkloadConfigurationReference.parse_obj(obj) + + _obj = WorkloadConfigurationReference.construct(_fields_set=None, **{ + "id": obj.get("id"), + "name": obj.get("name"), + "resource_type": obj.get("resource_type"), + "configuration": obj.get("configuration") + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flasharray/_common/models/workload_placement_recommendation_get_response_v_2_55.py b/pypureclient/flasharray/_common/models/workload_placement_recommendation_get_response_v_2_55.py new file mode 100644 index 0000000000..db1602eaab --- /dev/null +++ b/pypureclient/flasharray/_common/models/workload_placement_recommendation_get_response_v_2_55.py @@ -0,0 +1,140 @@ +# coding: utf-8 + +""" + FlashArray REST API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 2.55 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json +from typing import Set, Dict, Any + +from typing import List, Optional + +try: + from pydantic.v1 import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +except ModuleNotFoundError: + from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr, conlist +from pypureclient.flasharray._common.models.errorcontextresponse_errors_v_2_49 import ErrorcontextresponseErrors +from pypureclient.flasharray._common.models.workload_placement_recommendation_v_2_54 import WorkloadPlacementRecommendation + + +class WorkloadPlacementRecommendationGetResponse(BaseModel): + """ + WorkloadPlacementRecommendationGetResponse + """ + continuation_token: Optional[StrictStr] = Field(default=None, description="Continuation token that can be provided in the `continuation_token` query param to get the next page of data. If you use the continuation token to page through data you are guaranteed to get all items exactly once regardless of how items are modified. If an item is added or deleted during the pagination then it may or may not be returned. The continuation token is generated if the limit is less than the remaining number of items, and the default sort is used (no sort is specified).") + more_items_remaining: Optional[StrictBool] = Field(default=None, description="Returns a value of `true` if subsequent items can be retrieved.") + total_item_count: Optional[StrictInt] = Field(default=None, description="The total number of records after applying all filter query parameters. The `total_item_count` will be calculated if and only if the corresponding query parameter `total_item_count` is set to `true`. If this query parameter is not set or set to `false`, a value of `null` will be returned.") + items: Optional[conlist(WorkloadPlacementRecommendation)] = None + errors: Optional[conlist(ErrorcontextresponseErrors)] = Field(default=None, description="The list of errors encountered when attempting to perform an operation.") + __properties = ["continuation_token", "more_items_remaining", "total_item_count", "items", "errors"] + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.to_dict(include_readonly=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.as_request_dict()) + + def as_request_dict(self) -> Dict[str, Any]: + return self.to_dict(include_readonly=False) + + def to_dict(self, include_readonly: bool=True) -> Dict[str, Any]: + + """Returns the dictionary representation of the model using alias""" + excluded_fields: Set[str] = set() + if not include_readonly: + excluded_fields.update([ + "errors", + ]) + none_fields: Set[str] = set() + for _field in self.__fields__.keys(): + if super().__getattribute__(_field) is None: + none_fields.add(_field) + + _dict = self.dict(by_alias=True, exclude=excluded_fields, exclude_none=True) + # override the default output from pydantic by calling `to_dict()` of each item in items (list) + if _include_in_dict('items', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.items: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['items'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + if _include_in_dict('errors', include_readonly, excluded_fields, none_fields): + _items = [] + for _item in self.errors: + if _item: + _items.append(_item.to_dict(include_readonly=include_readonly)) + _dict['errors'] = _items + return _dict + + def __getitem__(self, key): + return super().__getattribute__(key) + + def __setitem__(self, key, value): + setattr(self, key, value) + + def __delitem__(self, key): + setattr(self, key, None) + + def __getattribute__(self, name: str) -> Any: + _value = super().__getattribute__(name) + if _value is None and name in self.__fields__.keys() and _should_raise_on_none(): + raise AttributeError + return _value + def __str__(self) -> str: + return self.to_str() + + def __repr__(self) -> str: + return self.to_str() + + @classmethod + def from_json(cls, json_str: str) -> WorkloadPlacementRecommendationGetResponse: + """Create an instance of WorkloadPlacementRecommendationGetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + @classmethod + def from_dict(cls, obj: dict) -> WorkloadPlacementRecommendationGetResponse: + """Create an instance of WorkloadPlacementRecommendationGetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return WorkloadPlacementRecommendationGetResponse.parse_obj(obj) + + _obj = WorkloadPlacementRecommendationGetResponse.construct(_fields_set=None, **{ + "continuation_token": obj.get("continuation_token"), + "more_items_remaining": obj.get("more_items_remaining"), + "total_item_count": obj.get("total_item_count"), + "items": [WorkloadPlacementRecommendation.from_dict(_item) for _item in obj.get("items")] if obj.get("items") is not None else None, + "errors": [ErrorcontextresponseErrors.from_dict(_item) for _item in obj.get("errors")] if obj.get("errors") is not None else None + }) + return _obj + +def _should_raise_on_none() -> bool: + import importlib + _package = importlib.import_module(__package__) + return _package._attribute_error_on_none + +def _include_in_dict(name: str, include_readonly: bool, excluded_fields: Set[str], none_fields: Set[str]) -> bool: + if name in none_fields: + return False + return (include_readonly or name not in excluded_fields) + diff --git a/pypureclient/flashblade/FB_2_17/api/__init__.py b/pypureclient/flashblade/FB_2_17/api/__init__.py index efde2a4de9..d8d7ca00c5 100644 --- a/pypureclient/flashblade/FB_2_17/api/__init__.py +++ b/pypureclient/flashblade/FB_2_17/api/__init__.py @@ -21,38 +21,38 @@ def load(self): return cls __class_apis_dict = { - 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_14', 'APIClientsApi', '2.17'), - 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_14', 'ActiveDirectoryApi', '2.17'), - 'AdministratorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.administrators_api_v_2_15', 'AdministratorsApi', '2.17'), - 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_14', 'AlertWatchersApi', '2.17'), - 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_14', 'AlertsApi', '2.17'), + 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_17', 'APIClientsApi', '2.17'), + 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_17', 'ActiveDirectoryApi', '2.17'), + 'AdministratorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.administrators_api_v_2_17', 'AdministratorsApi', '2.17'), + 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_17', 'AlertWatchersApi', '2.17'), + 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_17', 'AlertsApi', '2.17'), 'ArrayConnectionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.array_connections_api_v_2_17', 'ArrayConnectionsApi', '2.17'), 'ArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.arrays_api_v_2_17', 'ArraysApi', '2.17'), 'AuditsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audits_api_v_2_14', 'AuditsApi', '2.17'), - 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_14', 'AuthorizationApi', '2.17'), - 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_14', 'BladesApi', '2.17'), + 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_17', 'AuthorizationApi', '2.17'), + 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_17', 'BladesApi', '2.17'), 'BucketReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.bucket_replica_links_api_v_2_17', 'BucketReplicaLinksApi', '2.17'), 'BucketsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.buckets_api_v_2_17', 'BucketsApi', '2.17'), - 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_14', 'CertificateGroupsApi', '2.17'), - 'CertificatesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificates_api_v_2_14', 'CertificatesApi', '2.17'), - 'ClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.clients_api_v_2_14', 'ClientsApi', '2.17'), - 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_16', 'DNSApi', '2.17'), - 'DirectoryServicesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.directory_services_api_v_2_14', 'DirectoryServicesApi', '2.17'), - 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_14', 'DrivesApi', '2.17'), + 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_17', 'CertificateGroupsApi', '2.17'), + 'CertificatesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificates_api_v_2_17', 'CertificatesApi', '2.17'), + 'ClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.clients_api_v_2_17', 'ClientsApi', '2.17'), + 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_17', 'DNSApi', '2.17'), + 'DirectoryServicesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.directory_services_api_v_2_17', 'DirectoryServicesApi', '2.17'), + 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_17', 'DrivesApi', '2.17'), 'FileSystemExportsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_exports_api_v_2_17', 'FileSystemExportsApi', '2.17'), 'FileSystemReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_replica_links_api_v_2_17', 'FileSystemReplicaLinksApi', '2.17'), 'FileSystemSnapshotsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_snapshots_api_v_2_17', 'FileSystemSnapshotsApi', '2.17'), 'FileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_systems_api_v_2_17', 'FileSystemsApi', '2.17'), 'FleetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.fleets_api_v_2_17', 'FleetsApi', '2.17'), - 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_16', 'HardwareApi', '2.17'), - 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_14', 'HardwareConnectorsApi', '2.17'), - 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_14', 'KMIPApi', '2.17'), - 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_14', 'KeytabsApi', '2.17'), + 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_17', 'HardwareApi', '2.17'), + 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_17', 'HardwareConnectorsApi', '2.17'), + 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_17', 'KMIPApi', '2.17'), + 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_17', 'KeytabsApi', '2.17'), 'LegalHoldsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.legal_holds_api_v_2_17', 'LegalHoldsApi', '2.17'), 'LifecycleRulesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.lifecycle_rules_api_v_2_17', 'LifecycleRulesApi', '2.17'), - 'LinkAggregationGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.link_aggregation_groups_api_v_2_14', 'LinkAggregationGroupsApi', '2.17'), - 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_14', 'LogsApi', '2.17'), - 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_16', 'MaintenanceWindowsApi', '2.17'), + 'LinkAggregationGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.link_aggregation_groups_api_v_2_17', 'LinkAggregationGroupsApi', '2.17'), + 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_17', 'LogsApi', '2.17'), + 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_17', 'MaintenanceWindowsApi', '2.17'), 'NetworkInterfacesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.network_interfaces_api_v_2_17', 'NetworkInterfacesApi', '2.17'), 'OIDCSSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.oidcsso_api_v_2_17', 'OIDCSSOApi', '2.17'), 'ObjectStoreAccessKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.object_store_access_keys_api_v_2_17', 'ObjectStoreAccessKeysApi', '2.17'), @@ -64,35 +64,35 @@ def load(self): 'PoliciesAllApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_all_api_v_2_17', 'PoliciesAllApi', '2.17'), 'PoliciesAuditForFileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_audit_for_file_systems_api_v_2_17', 'PoliciesAuditForFileSystemsApi', '2.17'), 'PoliciesNFSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_nfs_api_v_2_17', 'PoliciesNFSApi', '2.17'), - 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_14', 'PoliciesNetworkAccessApi', '2.17'), + 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_17', 'PoliciesNetworkAccessApi', '2.17'), 'PoliciesObjectStoreAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_object_store_access_api_v_2_17', 'PoliciesObjectStoreAccessApi', '2.17'), - 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_16', 'PoliciesPasswordApi', '2.17'), + 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_17', 'PoliciesPasswordApi', '2.17'), 'PoliciesQoSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_qo_s_api_v_2_17', 'PoliciesQoSApi', '2.17'), 'PoliciesSMBClientApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_client_api_v_2_17', 'PoliciesSMBClientApi', '2.17'), 'PoliciesSMBShareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_share_api_v_2_17', 'PoliciesSMBShareApi', '2.17'), - 'PoliciesSSHCertificateAuthorityApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_ssh_certificate_authority_api_v_2_14', 'PoliciesSSHCertificateAuthorityApi', '2.17'), + 'PoliciesSSHCertificateAuthorityApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_ssh_certificate_authority_api_v_2_17', 'PoliciesSSHCertificateAuthorityApi', '2.17'), 'PoliciesSnapshotApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_snapshot_api_v_2_17', 'PoliciesSnapshotApi', '2.17'), 'PoliciesTLSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_tls_api_v_2_17', 'PoliciesTLSApi', '2.17'), 'PoliciesWORMDataApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_worm_data_api_v_2_17', 'PoliciesWORMDataApi', '2.17'), - 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_14', 'PublicKeysApi', '2.17'), + 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_17', 'PublicKeysApi', '2.17'), 'QuotasApi': __LazyApiLoader('pypureclient.flashblade._common.apis.quotas_api_v_2_17', 'QuotasApi', '2.17'), - 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_14', 'RDLApi', '2.17'), + 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_17', 'RDLApi', '2.17'), 'RemoteArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.remote_arrays_api_v_2_17', 'RemoteArraysApi', '2.17'), - 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_14', 'RolesApi', '2.17'), - 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_16', 'SAML2SSOApi', '2.17'), - 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_14', 'SMTPApi', '2.17'), - 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_14', 'SNMPAgentsApi', '2.17'), - 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_14', 'SNMPManagersApi', '2.17'), + 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_17', 'RolesApi', '2.17'), + 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_17', 'SAML2SSOApi', '2.17'), + 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_17', 'SMTPApi', '2.17'), + 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_17', 'SNMPAgentsApi', '2.17'), + 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_17', 'SNMPManagersApi', '2.17'), 'ServersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.servers_api_v_2_17', 'ServersApi', '2.17'), - 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_14', 'SessionsApi', '2.17'), - 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_16', 'SoftwareApi', '2.17'), - 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_14', 'SubnetsApi', '2.17'), - 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_14', 'SupportApi', '2.17'), - 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_16', 'SupportDiagnosticsApi', '2.17'), + 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_17', 'SessionsApi', '2.17'), + 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_17', 'SoftwareApi', '2.17'), + 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_17', 'SubnetsApi', '2.17'), + 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_17', 'SupportApi', '2.17'), + 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_17', 'SupportDiagnosticsApi', '2.17'), 'SyslogApi': __LazyApiLoader('pypureclient.flashblade._common.apis.syslog_api_v_2_17', 'SyslogApi', '2.17'), 'TargetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.targets_api_v_2_17', 'TargetsApi', '2.17'), 'UsageApi': __LazyApiLoader('pypureclient.flashblade._common.apis.usage_api_v_2_17', 'UsageApi', '2.17'), - 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_14', 'VerificationKeysApi', '2.17'), + 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_17', 'VerificationKeysApi', '2.17'), } __all__ = list(__class_apis_dict.keys()) diff --git a/pypureclient/flashblade/FB_2_18/api/__init__.py b/pypureclient/flashblade/FB_2_18/api/__init__.py index 251856c4bd..77bfb90e00 100644 --- a/pypureclient/flashblade/FB_2_18/api/__init__.py +++ b/pypureclient/flashblade/FB_2_18/api/__init__.py @@ -21,38 +21,38 @@ def load(self): return cls __class_apis_dict = { - 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_14', 'APIClientsApi', '2.18'), - 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_14', 'ActiveDirectoryApi', '2.18'), - 'AdministratorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.administrators_api_v_2_15', 'AdministratorsApi', '2.18'), - 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_14', 'AlertWatchersApi', '2.18'), - 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_14', 'AlertsApi', '2.18'), + 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_17', 'APIClientsApi', '2.18'), + 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_17', 'ActiveDirectoryApi', '2.18'), + 'AdministratorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.administrators_api_v_2_17', 'AdministratorsApi', '2.18'), + 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_17', 'AlertWatchersApi', '2.18'), + 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_17', 'AlertsApi', '2.18'), 'ArrayConnectionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.array_connections_api_v_2_17', 'ArrayConnectionsApi', '2.18'), 'ArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.arrays_api_v_2_18', 'ArraysApi', '2.18'), 'AuditsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audits_api_v_2_14', 'AuditsApi', '2.18'), - 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_14', 'AuthorizationApi', '2.18'), - 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_14', 'BladesApi', '2.18'), + 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_17', 'AuthorizationApi', '2.18'), + 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_17', 'BladesApi', '2.18'), 'BucketReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.bucket_replica_links_api_v_2_17', 'BucketReplicaLinksApi', '2.18'), 'BucketsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.buckets_api_v_2_17', 'BucketsApi', '2.18'), - 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_14', 'CertificateGroupsApi', '2.18'), - 'CertificatesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificates_api_v_2_14', 'CertificatesApi', '2.18'), + 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_17', 'CertificateGroupsApi', '2.18'), + 'CertificatesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificates_api_v_2_17', 'CertificatesApi', '2.18'), 'ClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.clients_api_v_2_18', 'ClientsApi', '2.18'), - 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_16', 'DNSApi', '2.18'), - 'DirectoryServicesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.directory_services_api_v_2_14', 'DirectoryServicesApi', '2.18'), - 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_14', 'DrivesApi', '2.18'), + 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_17', 'DNSApi', '2.18'), + 'DirectoryServicesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.directory_services_api_v_2_17', 'DirectoryServicesApi', '2.18'), + 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_17', 'DrivesApi', '2.18'), 'FileSystemExportsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_exports_api_v_2_17', 'FileSystemExportsApi', '2.18'), 'FileSystemReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_replica_links_api_v_2_17', 'FileSystemReplicaLinksApi', '2.18'), 'FileSystemSnapshotsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_snapshots_api_v_2_17', 'FileSystemSnapshotsApi', '2.18'), 'FileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_systems_api_v_2_18', 'FileSystemsApi', '2.18'), 'FleetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.fleets_api_v_2_17', 'FleetsApi', '2.18'), - 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_16', 'HardwareApi', '2.18'), - 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_14', 'HardwareConnectorsApi', '2.18'), - 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_14', 'KMIPApi', '2.18'), - 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_14', 'KeytabsApi', '2.18'), + 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_17', 'HardwareApi', '2.18'), + 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_17', 'HardwareConnectorsApi', '2.18'), + 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_17', 'KMIPApi', '2.18'), + 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_17', 'KeytabsApi', '2.18'), 'LegalHoldsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.legal_holds_api_v_2_17', 'LegalHoldsApi', '2.18'), 'LifecycleRulesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.lifecycle_rules_api_v_2_17', 'LifecycleRulesApi', '2.18'), - 'LinkAggregationGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.link_aggregation_groups_api_v_2_14', 'LinkAggregationGroupsApi', '2.18'), - 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_14', 'LogsApi', '2.18'), - 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_16', 'MaintenanceWindowsApi', '2.18'), + 'LinkAggregationGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.link_aggregation_groups_api_v_2_17', 'LinkAggregationGroupsApi', '2.18'), + 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_17', 'LogsApi', '2.18'), + 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_17', 'MaintenanceWindowsApi', '2.18'), 'NetworkInterfacesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.network_interfaces_api_v_2_18', 'NetworkInterfacesApi', '2.18'), 'NodeGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.node_groups_api_v_2_18', 'NodeGroupsApi', '2.18'), 'NodesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.nodes_api_v_2_18', 'NodesApi', '2.18'), @@ -66,36 +66,36 @@ def load(self): 'PoliciesAllApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_all_api_v_2_17', 'PoliciesAllApi', '2.18'), 'PoliciesAuditForFileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_audit_for_file_systems_api_v_2_18', 'PoliciesAuditForFileSystemsApi', '2.18'), 'PoliciesNFSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_nfs_api_v_2_17', 'PoliciesNFSApi', '2.18'), - 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_14', 'PoliciesNetworkAccessApi', '2.18'), + 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_17', 'PoliciesNetworkAccessApi', '2.18'), 'PoliciesObjectStoreAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_object_store_access_api_v_2_17', 'PoliciesObjectStoreAccessApi', '2.18'), - 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_16', 'PoliciesPasswordApi', '2.18'), + 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_17', 'PoliciesPasswordApi', '2.18'), 'PoliciesQoSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_qo_s_api_v_2_17', 'PoliciesQoSApi', '2.18'), 'PoliciesSMBClientApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_client_api_v_2_17', 'PoliciesSMBClientApi', '2.18'), 'PoliciesSMBShareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_share_api_v_2_17', 'PoliciesSMBShareApi', '2.18'), - 'PoliciesSSHCertificateAuthorityApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_ssh_certificate_authority_api_v_2_14', 'PoliciesSSHCertificateAuthorityApi', '2.18'), + 'PoliciesSSHCertificateAuthorityApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_ssh_certificate_authority_api_v_2_17', 'PoliciesSSHCertificateAuthorityApi', '2.18'), 'PoliciesSnapshotApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_snapshot_api_v_2_17', 'PoliciesSnapshotApi', '2.18'), 'PoliciesStorageClassTieringApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_storage_class_tiering_api_v_2_18', 'PoliciesStorageClassTieringApi', '2.18'), 'PoliciesTLSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_tls_api_v_2_17', 'PoliciesTLSApi', '2.18'), 'PoliciesWORMDataApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_worm_data_api_v_2_17', 'PoliciesWORMDataApi', '2.18'), - 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_14', 'PublicKeysApi', '2.18'), + 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_17', 'PublicKeysApi', '2.18'), 'QuotasApi': __LazyApiLoader('pypureclient.flashblade._common.apis.quotas_api_v_2_17', 'QuotasApi', '2.18'), - 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_14', 'RDLApi', '2.18'), + 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_17', 'RDLApi', '2.18'), 'RemoteArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.remote_arrays_api_v_2_17', 'RemoteArraysApi', '2.18'), - 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_14', 'RolesApi', '2.18'), - 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_16', 'SAML2SSOApi', '2.18'), - 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_14', 'SMTPApi', '2.18'), - 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_14', 'SNMPAgentsApi', '2.18'), - 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_14', 'SNMPManagersApi', '2.18'), + 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_17', 'RolesApi', '2.18'), + 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_17', 'SAML2SSOApi', '2.18'), + 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_17', 'SMTPApi', '2.18'), + 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_17', 'SNMPAgentsApi', '2.18'), + 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_17', 'SNMPManagersApi', '2.18'), 'ServersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.servers_api_v_2_17', 'ServersApi', '2.18'), - 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_14', 'SessionsApi', '2.18'), - 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_16', 'SoftwareApi', '2.18'), - 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_14', 'SubnetsApi', '2.18'), - 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_14', 'SupportApi', '2.18'), - 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_16', 'SupportDiagnosticsApi', '2.18'), + 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_17', 'SessionsApi', '2.18'), + 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_17', 'SoftwareApi', '2.18'), + 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_17', 'SubnetsApi', '2.18'), + 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_17', 'SupportApi', '2.18'), + 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_17', 'SupportDiagnosticsApi', '2.18'), 'SyslogApi': __LazyApiLoader('pypureclient.flashblade._common.apis.syslog_api_v_2_17', 'SyslogApi', '2.18'), 'TargetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.targets_api_v_2_17', 'TargetsApi', '2.18'), 'UsageApi': __LazyApiLoader('pypureclient.flashblade._common.apis.usage_api_v_2_17', 'UsageApi', '2.18'), - 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_14', 'VerificationKeysApi', '2.18'), + 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_17', 'VerificationKeysApi', '2.18'), } __all__ = list(__class_apis_dict.keys()) diff --git a/pypureclient/flashblade/FB_2_19/api/__init__.py b/pypureclient/flashblade/FB_2_19/api/__init__.py index 7b95146c1e..aaad0fbbd8 100644 --- a/pypureclient/flashblade/FB_2_19/api/__init__.py +++ b/pypureclient/flashblade/FB_2_19/api/__init__.py @@ -21,38 +21,38 @@ def load(self): return cls __class_apis_dict = { - 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_14', 'APIClientsApi', '2.19'), - 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_14', 'ActiveDirectoryApi', '2.19'), - 'AdministratorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.administrators_api_v_2_15', 'AdministratorsApi', '2.19'), - 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_14', 'AlertWatchersApi', '2.19'), - 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_14', 'AlertsApi', '2.19'), + 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_17', 'APIClientsApi', '2.19'), + 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_17', 'ActiveDirectoryApi', '2.19'), + 'AdministratorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.administrators_api_v_2_17', 'AdministratorsApi', '2.19'), + 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_17', 'AlertWatchersApi', '2.19'), + 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_17', 'AlertsApi', '2.19'), 'ArrayConnectionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.array_connections_api_v_2_17', 'ArrayConnectionsApi', '2.19'), 'ArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.arrays_api_v_2_18', 'ArraysApi', '2.19'), 'AuditsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audits_api_v_2_14', 'AuditsApi', '2.19'), - 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_14', 'AuthorizationApi', '2.19'), - 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_14', 'BladesApi', '2.19'), + 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_17', 'AuthorizationApi', '2.19'), + 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_17', 'BladesApi', '2.19'), 'BucketReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.bucket_replica_links_api_v_2_17', 'BucketReplicaLinksApi', '2.19'), 'BucketsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.buckets_api_v_2_19', 'BucketsApi', '2.19'), - 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_14', 'CertificateGroupsApi', '2.19'), - 'CertificatesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificates_api_v_2_14', 'CertificatesApi', '2.19'), + 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_17', 'CertificateGroupsApi', '2.19'), + 'CertificatesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificates_api_v_2_17', 'CertificatesApi', '2.19'), 'ClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.clients_api_v_2_18', 'ClientsApi', '2.19'), - 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_16', 'DNSApi', '2.19'), + 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_17', 'DNSApi', '2.19'), 'DirectoryServicesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.directory_services_api_v_2_19', 'DirectoryServicesApi', '2.19'), - 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_14', 'DrivesApi', '2.19'), + 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_17', 'DrivesApi', '2.19'), 'FileSystemExportsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_exports_api_v_2_17', 'FileSystemExportsApi', '2.19'), 'FileSystemReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_replica_links_api_v_2_17', 'FileSystemReplicaLinksApi', '2.19'), 'FileSystemSnapshotsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_snapshots_api_v_2_17', 'FileSystemSnapshotsApi', '2.19'), 'FileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_systems_api_v_2_18', 'FileSystemsApi', '2.19'), 'FleetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.fleets_api_v_2_17', 'FleetsApi', '2.19'), - 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_16', 'HardwareApi', '2.19'), - 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_14', 'HardwareConnectorsApi', '2.19'), - 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_14', 'KMIPApi', '2.19'), - 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_14', 'KeytabsApi', '2.19'), + 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_17', 'HardwareApi', '2.19'), + 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_17', 'HardwareConnectorsApi', '2.19'), + 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_17', 'KMIPApi', '2.19'), + 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_17', 'KeytabsApi', '2.19'), 'LegalHoldsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.legal_holds_api_v_2_17', 'LegalHoldsApi', '2.19'), 'LifecycleRulesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.lifecycle_rules_api_v_2_17', 'LifecycleRulesApi', '2.19'), 'LinkAggregationGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.link_aggregation_groups_api_v_2_19', 'LinkAggregationGroupsApi', '2.19'), - 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_14', 'LogsApi', '2.19'), - 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_16', 'MaintenanceWindowsApi', '2.19'), + 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_17', 'LogsApi', '2.19'), + 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_17', 'MaintenanceWindowsApi', '2.19'), 'NetworkInterfacesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.network_interfaces_api_v_2_18', 'NetworkInterfacesApi', '2.19'), 'NodeGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.node_groups_api_v_2_18', 'NodeGroupsApi', '2.19'), 'NodesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.nodes_api_v_2_18', 'NodesApi', '2.19'), @@ -67,38 +67,38 @@ def load(self): 'PoliciesAuditForFileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_audit_for_file_systems_api_v_2_18', 'PoliciesAuditForFileSystemsApi', '2.19'), 'PoliciesManagementAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_management_access_api_v_2_19', 'PoliciesManagementAccessApi', '2.19'), 'PoliciesNFSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_nfs_api_v_2_17', 'PoliciesNFSApi', '2.19'), - 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_14', 'PoliciesNetworkAccessApi', '2.19'), + 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_17', 'PoliciesNetworkAccessApi', '2.19'), 'PoliciesObjectStoreAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_object_store_access_api_v_2_17', 'PoliciesObjectStoreAccessApi', '2.19'), - 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_16', 'PoliciesPasswordApi', '2.19'), + 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_17', 'PoliciesPasswordApi', '2.19'), 'PoliciesQoSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_qo_s_api_v_2_19', 'PoliciesQoSApi', '2.19'), 'PoliciesSMBClientApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_client_api_v_2_17', 'PoliciesSMBClientApi', '2.19'), 'PoliciesSMBShareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_share_api_v_2_17', 'PoliciesSMBShareApi', '2.19'), - 'PoliciesSSHCertificateAuthorityApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_ssh_certificate_authority_api_v_2_14', 'PoliciesSSHCertificateAuthorityApi', '2.19'), + 'PoliciesSSHCertificateAuthorityApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_ssh_certificate_authority_api_v_2_17', 'PoliciesSSHCertificateAuthorityApi', '2.19'), 'PoliciesSnapshotApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_snapshot_api_v_2_17', 'PoliciesSnapshotApi', '2.19'), 'PoliciesStorageClassTieringApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_storage_class_tiering_api_v_2_18', 'PoliciesStorageClassTieringApi', '2.19'), 'PoliciesTLSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_tls_api_v_2_17', 'PoliciesTLSApi', '2.19'), 'PoliciesWORMDataApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_worm_data_api_v_2_17', 'PoliciesWORMDataApi', '2.19'), - 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_14', 'PublicKeysApi', '2.19'), + 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_17', 'PublicKeysApi', '2.19'), 'QuotasApi': __LazyApiLoader('pypureclient.flashblade._common.apis.quotas_api_v_2_17', 'QuotasApi', '2.19'), - 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_14', 'RDLApi', '2.19'), + 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_17', 'RDLApi', '2.19'), 'RealmsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.realms_api_v_2_19', 'RealmsApi', '2.19'), 'RemoteArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.remote_arrays_api_v_2_17', 'RemoteArraysApi', '2.19'), 'ResourceAccessesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.resource_accesses_api_v_2_19', 'ResourceAccessesApi', '2.19'), - 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_14', 'RolesApi', '2.19'), - 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_16', 'SAML2SSOApi', '2.19'), - 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_14', 'SMTPApi', '2.19'), - 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_14', 'SNMPAgentsApi', '2.19'), - 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_14', 'SNMPManagersApi', '2.19'), + 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_17', 'RolesApi', '2.19'), + 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_17', 'SAML2SSOApi', '2.19'), + 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_17', 'SMTPApi', '2.19'), + 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_17', 'SNMPAgentsApi', '2.19'), + 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_17', 'SNMPManagersApi', '2.19'), 'ServersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.servers_api_v_2_17', 'ServersApi', '2.19'), - 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_14', 'SessionsApi', '2.19'), - 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_16', 'SoftwareApi', '2.19'), - 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_14', 'SubnetsApi', '2.19'), - 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_14', 'SupportApi', '2.19'), - 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_16', 'SupportDiagnosticsApi', '2.19'), + 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_17', 'SessionsApi', '2.19'), + 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_17', 'SoftwareApi', '2.19'), + 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_17', 'SubnetsApi', '2.19'), + 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_17', 'SupportApi', '2.19'), + 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_17', 'SupportDiagnosticsApi', '2.19'), 'SyslogApi': __LazyApiLoader('pypureclient.flashblade._common.apis.syslog_api_v_2_17', 'SyslogApi', '2.19'), 'TargetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.targets_api_v_2_17', 'TargetsApi', '2.19'), 'UsageApi': __LazyApiLoader('pypureclient.flashblade._common.apis.usage_api_v_2_17', 'UsageApi', '2.19'), - 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_14', 'VerificationKeysApi', '2.19'), + 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_17', 'VerificationKeysApi', '2.19'), } __all__ = list(__class_apis_dict.keys()) diff --git a/pypureclient/flashblade/FB_2_20/api/__init__.py b/pypureclient/flashblade/FB_2_20/api/__init__.py index 4de82fd9d0..97e9c9e5f4 100644 --- a/pypureclient/flashblade/FB_2_20/api/__init__.py +++ b/pypureclient/flashblade/FB_2_20/api/__init__.py @@ -21,40 +21,40 @@ def load(self): return cls __class_apis_dict = { - 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_14', 'APIClientsApi', '2.20'), - 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_14', 'ActiveDirectoryApi', '2.20'), - 'AdministratorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.administrators_api_v_2_15', 'AdministratorsApi', '2.20'), - 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_14', 'AlertWatchersApi', '2.20'), - 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_14', 'AlertsApi', '2.20'), + 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_17', 'APIClientsApi', '2.20'), + 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_17', 'ActiveDirectoryApi', '2.20'), + 'AdministratorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.administrators_api_v_2_17', 'AdministratorsApi', '2.20'), + 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_17', 'AlertWatchersApi', '2.20'), + 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_17', 'AlertsApi', '2.20'), 'ArrayConnectionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.array_connections_api_v_2_17', 'ArrayConnectionsApi', '2.20'), 'ArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.arrays_api_v_2_18', 'ArraysApi', '2.20'), 'AuditLogTargetForFileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audit_log_target_for_file_systems_api_v_2_20', 'AuditLogTargetForFileSystemsApi', '2.20'), 'AuditLogTargetForObjectStoreApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audit_log_target_for_object_store_api_v_2_20', 'AuditLogTargetForObjectStoreApi', '2.20'), 'AuditsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audits_api_v_2_14', 'AuditsApi', '2.20'), - 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_14', 'AuthorizationApi', '2.20'), - 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_14', 'BladesApi', '2.20'), + 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_17', 'AuthorizationApi', '2.20'), + 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_17', 'BladesApi', '2.20'), 'BucketReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.bucket_replica_links_api_v_2_17', 'BucketReplicaLinksApi', '2.20'), 'BucketsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.buckets_api_v_2_20', 'BucketsApi', '2.20'), - 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_14', 'CertificateGroupsApi', '2.20'), + 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_17', 'CertificateGroupsApi', '2.20'), 'CertificatesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificates_api_v_2_20', 'CertificatesApi', '2.20'), 'ClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.clients_api_v_2_18', 'ClientsApi', '2.20'), - 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_16', 'DNSApi', '2.20'), + 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_17', 'DNSApi', '2.20'), 'DirectoryServicesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.directory_services_api_v_2_19', 'DirectoryServicesApi', '2.20'), - 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_14', 'DrivesApi', '2.20'), + 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_17', 'DrivesApi', '2.20'), 'FileSystemExportsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_exports_api_v_2_17', 'FileSystemExportsApi', '2.20'), 'FileSystemReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_replica_links_api_v_2_17', 'FileSystemReplicaLinksApi', '2.20'), 'FileSystemSnapshotsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_snapshots_api_v_2_17', 'FileSystemSnapshotsApi', '2.20'), 'FileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_systems_api_v_2_18', 'FileSystemsApi', '2.20'), 'FleetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.fleets_api_v_2_17', 'FleetsApi', '2.20'), - 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_16', 'HardwareApi', '2.20'), - 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_14', 'HardwareConnectorsApi', '2.20'), - 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_14', 'KMIPApi', '2.20'), - 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_14', 'KeytabsApi', '2.20'), + 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_17', 'HardwareApi', '2.20'), + 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_17', 'HardwareConnectorsApi', '2.20'), + 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_17', 'KMIPApi', '2.20'), + 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_17', 'KeytabsApi', '2.20'), 'LegalHoldsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.legal_holds_api_v_2_17', 'LegalHoldsApi', '2.20'), 'LifecycleRulesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.lifecycle_rules_api_v_2_17', 'LifecycleRulesApi', '2.20'), 'LinkAggregationGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.link_aggregation_groups_api_v_2_19', 'LinkAggregationGroupsApi', '2.20'), - 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_14', 'LogsApi', '2.20'), - 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_16', 'MaintenanceWindowsApi', '2.20'), + 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_17', 'LogsApi', '2.20'), + 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_17', 'MaintenanceWindowsApi', '2.20'), 'NetworkInterfacesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.network_interfaces_api_v_2_20', 'NetworkInterfacesApi', '2.20'), 'NodeGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.node_groups_api_v_2_18', 'NodeGroupsApi', '2.20'), 'NodesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.nodes_api_v_2_18', 'NodesApi', '2.20'), @@ -71,39 +71,39 @@ def load(self): 'PoliciesAuditForObjectStoreApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_audit_for_object_store_api_v_2_20', 'PoliciesAuditForObjectStoreApi', '2.20'), 'PoliciesManagementAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_management_access_api_v_2_19', 'PoliciesManagementAccessApi', '2.20'), 'PoliciesNFSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_nfs_api_v_2_17', 'PoliciesNFSApi', '2.20'), - 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_14', 'PoliciesNetworkAccessApi', '2.20'), + 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_17', 'PoliciesNetworkAccessApi', '2.20'), 'PoliciesObjectStoreAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_object_store_access_api_v_2_17', 'PoliciesObjectStoreAccessApi', '2.20'), - 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_16', 'PoliciesPasswordApi', '2.20'), + 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_17', 'PoliciesPasswordApi', '2.20'), 'PoliciesQoSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_qo_s_api_v_2_20', 'PoliciesQoSApi', '2.20'), 'PoliciesS3ExportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_s3_export_api_v_2_20', 'PoliciesS3ExportApi', '2.20'), 'PoliciesSMBClientApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_client_api_v_2_17', 'PoliciesSMBClientApi', '2.20'), 'PoliciesSMBShareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_share_api_v_2_17', 'PoliciesSMBShareApi', '2.20'), - 'PoliciesSSHCertificateAuthorityApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_ssh_certificate_authority_api_v_2_14', 'PoliciesSSHCertificateAuthorityApi', '2.20'), + 'PoliciesSSHCertificateAuthorityApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_ssh_certificate_authority_api_v_2_17', 'PoliciesSSHCertificateAuthorityApi', '2.20'), 'PoliciesSnapshotApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_snapshot_api_v_2_17', 'PoliciesSnapshotApi', '2.20'), 'PoliciesStorageClassTieringApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_storage_class_tiering_api_v_2_18', 'PoliciesStorageClassTieringApi', '2.20'), 'PoliciesTLSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_tls_api_v_2_17', 'PoliciesTLSApi', '2.20'), 'PoliciesWORMDataApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_worm_data_api_v_2_17', 'PoliciesWORMDataApi', '2.20'), - 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_14', 'PublicKeysApi', '2.20'), + 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_17', 'PublicKeysApi', '2.20'), 'QuotasApi': __LazyApiLoader('pypureclient.flashblade._common.apis.quotas_api_v_2_17', 'QuotasApi', '2.20'), - 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_14', 'RDLApi', '2.20'), + 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_17', 'RDLApi', '2.20'), 'RealmsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.realms_api_v_2_20', 'RealmsApi', '2.20'), 'RemoteArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.remote_arrays_api_v_2_17', 'RemoteArraysApi', '2.20'), 'ResourceAccessesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.resource_accesses_api_v_2_19', 'ResourceAccessesApi', '2.20'), - 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_14', 'RolesApi', '2.20'), - 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_16', 'SAML2SSOApi', '2.20'), - 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_14', 'SMTPApi', '2.20'), - 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_14', 'SNMPAgentsApi', '2.20'), - 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_14', 'SNMPManagersApi', '2.20'), + 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_17', 'RolesApi', '2.20'), + 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_17', 'SAML2SSOApi', '2.20'), + 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_17', 'SMTPApi', '2.20'), + 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_17', 'SNMPAgentsApi', '2.20'), + 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_17', 'SNMPManagersApi', '2.20'), 'ServersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.servers_api_v_2_17', 'ServersApi', '2.20'), - 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_14', 'SessionsApi', '2.20'), - 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_16', 'SoftwareApi', '2.20'), - 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_14', 'SubnetsApi', '2.20'), - 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_14', 'SupportApi', '2.20'), - 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_16', 'SupportDiagnosticsApi', '2.20'), + 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_17', 'SessionsApi', '2.20'), + 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_17', 'SoftwareApi', '2.20'), + 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_17', 'SubnetsApi', '2.20'), + 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_17', 'SupportApi', '2.20'), + 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_17', 'SupportDiagnosticsApi', '2.20'), 'SyslogApi': __LazyApiLoader('pypureclient.flashblade._common.apis.syslog_api_v_2_17', 'SyslogApi', '2.20'), 'TargetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.targets_api_v_2_17', 'TargetsApi', '2.20'), 'UsageApi': __LazyApiLoader('pypureclient.flashblade._common.apis.usage_api_v_2_17', 'UsageApi', '2.20'), - 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_14', 'VerificationKeysApi', '2.20'), + 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_17', 'VerificationKeysApi', '2.20'), } __all__ = list(__class_apis_dict.keys()) diff --git a/pypureclient/flashblade/FB_2_21/api/__init__.py b/pypureclient/flashblade/FB_2_21/api/__init__.py index f381952c01..93ce893db6 100644 --- a/pypureclient/flashblade/FB_2_21/api/__init__.py +++ b/pypureclient/flashblade/FB_2_21/api/__init__.py @@ -21,40 +21,40 @@ def load(self): return cls __class_apis_dict = { - 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_14', 'APIClientsApi', '2.21'), - 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_14', 'ActiveDirectoryApi', '2.21'), - 'AdministratorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.administrators_api_v_2_15', 'AdministratorsApi', '2.21'), - 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_14', 'AlertWatchersApi', '2.21'), - 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_14', 'AlertsApi', '2.21'), + 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_17', 'APIClientsApi', '2.21'), + 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_17', 'ActiveDirectoryApi', '2.21'), + 'AdministratorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.administrators_api_v_2_17', 'AdministratorsApi', '2.21'), + 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_17', 'AlertWatchersApi', '2.21'), + 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_17', 'AlertsApi', '2.21'), 'ArrayConnectionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.array_connections_api_v_2_17', 'ArrayConnectionsApi', '2.21'), 'ArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.arrays_api_v_2_18', 'ArraysApi', '2.21'), 'AuditLogTargetForFileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audit_log_target_for_file_systems_api_v_2_20', 'AuditLogTargetForFileSystemsApi', '2.21'), 'AuditLogTargetForObjectStoreApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audit_log_target_for_object_store_api_v_2_20', 'AuditLogTargetForObjectStoreApi', '2.21'), 'AuditsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audits_api_v_2_14', 'AuditsApi', '2.21'), - 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_14', 'AuthorizationApi', '2.21'), - 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_14', 'BladesApi', '2.21'), + 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_17', 'AuthorizationApi', '2.21'), + 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_17', 'BladesApi', '2.21'), 'BucketReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.bucket_replica_links_api_v_2_17', 'BucketReplicaLinksApi', '2.21'), 'BucketsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.buckets_api_v_2_20', 'BucketsApi', '2.21'), - 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_14', 'CertificateGroupsApi', '2.21'), + 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_17', 'CertificateGroupsApi', '2.21'), 'CertificatesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificates_api_v_2_20', 'CertificatesApi', '2.21'), 'ClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.clients_api_v_2_18', 'ClientsApi', '2.21'), - 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_16', 'DNSApi', '2.21'), + 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_17', 'DNSApi', '2.21'), 'DirectoryServicesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.directory_services_api_v_2_19', 'DirectoryServicesApi', '2.21'), - 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_14', 'DrivesApi', '2.21'), + 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_17', 'DrivesApi', '2.21'), 'FileSystemExportsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_exports_api_v_2_17', 'FileSystemExportsApi', '2.21'), 'FileSystemReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_replica_links_api_v_2_17', 'FileSystemReplicaLinksApi', '2.21'), 'FileSystemSnapshotsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_snapshots_api_v_2_17', 'FileSystemSnapshotsApi', '2.21'), 'FileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_systems_api_v_2_21', 'FileSystemsApi', '2.21'), 'FleetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.fleets_api_v_2_17', 'FleetsApi', '2.21'), - 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_16', 'HardwareApi', '2.21'), - 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_14', 'HardwareConnectorsApi', '2.21'), - 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_14', 'KMIPApi', '2.21'), - 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_14', 'KeytabsApi', '2.21'), + 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_17', 'HardwareApi', '2.21'), + 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_17', 'HardwareConnectorsApi', '2.21'), + 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_17', 'KMIPApi', '2.21'), + 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_17', 'KeytabsApi', '2.21'), 'LegalHoldsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.legal_holds_api_v_2_17', 'LegalHoldsApi', '2.21'), 'LifecycleRulesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.lifecycle_rules_api_v_2_17', 'LifecycleRulesApi', '2.21'), 'LinkAggregationGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.link_aggregation_groups_api_v_2_19', 'LinkAggregationGroupsApi', '2.21'), - 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_14', 'LogsApi', '2.21'), - 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_16', 'MaintenanceWindowsApi', '2.21'), + 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_17', 'LogsApi', '2.21'), + 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_17', 'MaintenanceWindowsApi', '2.21'), 'NetworkInterfacesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.network_interfaces_api_v_2_20', 'NetworkInterfacesApi', '2.21'), 'NodeGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.node_groups_api_v_2_18', 'NodeGroupsApi', '2.21'), 'NodesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.nodes_api_v_2_18', 'NodesApi', '2.21'), @@ -72,39 +72,39 @@ def load(self): 'PoliciesDataEvictionApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_data_eviction_api_v_2_21', 'PoliciesDataEvictionApi', '2.21'), 'PoliciesManagementAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_management_access_api_v_2_19', 'PoliciesManagementAccessApi', '2.21'), 'PoliciesNFSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_nfs_api_v_2_17', 'PoliciesNFSApi', '2.21'), - 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_14', 'PoliciesNetworkAccessApi', '2.21'), + 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_17', 'PoliciesNetworkAccessApi', '2.21'), 'PoliciesObjectStoreAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_object_store_access_api_v_2_17', 'PoliciesObjectStoreAccessApi', '2.21'), - 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_16', 'PoliciesPasswordApi', '2.21'), + 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_17', 'PoliciesPasswordApi', '2.21'), 'PoliciesQoSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_qo_s_api_v_2_21', 'PoliciesQoSApi', '2.21'), 'PoliciesS3ExportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_s3_export_api_v_2_20', 'PoliciesS3ExportApi', '2.21'), 'PoliciesSMBClientApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_client_api_v_2_17', 'PoliciesSMBClientApi', '2.21'), 'PoliciesSMBShareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_share_api_v_2_17', 'PoliciesSMBShareApi', '2.21'), - 'PoliciesSSHCertificateAuthorityApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_ssh_certificate_authority_api_v_2_14', 'PoliciesSSHCertificateAuthorityApi', '2.21'), + 'PoliciesSSHCertificateAuthorityApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_ssh_certificate_authority_api_v_2_17', 'PoliciesSSHCertificateAuthorityApi', '2.21'), 'PoliciesSnapshotApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_snapshot_api_v_2_17', 'PoliciesSnapshotApi', '2.21'), 'PoliciesStorageClassTieringApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_storage_class_tiering_api_v_2_18', 'PoliciesStorageClassTieringApi', '2.21'), 'PoliciesTLSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_tls_api_v_2_17', 'PoliciesTLSApi', '2.21'), 'PoliciesWORMDataApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_worm_data_api_v_2_17', 'PoliciesWORMDataApi', '2.21'), - 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_14', 'PublicKeysApi', '2.21'), + 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_17', 'PublicKeysApi', '2.21'), 'QuotasApi': __LazyApiLoader('pypureclient.flashblade._common.apis.quotas_api_v_2_17', 'QuotasApi', '2.21'), - 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_14', 'RDLApi', '2.21'), + 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_17', 'RDLApi', '2.21'), 'RealmsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.realms_api_v_2_20', 'RealmsApi', '2.21'), 'RemoteArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.remote_arrays_api_v_2_17', 'RemoteArraysApi', '2.21'), 'ResourceAccessesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.resource_accesses_api_v_2_19', 'ResourceAccessesApi', '2.21'), - 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_14', 'RolesApi', '2.21'), - 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_16', 'SAML2SSOApi', '2.21'), - 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_14', 'SMTPApi', '2.21'), - 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_14', 'SNMPAgentsApi', '2.21'), - 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_14', 'SNMPManagersApi', '2.21'), + 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_17', 'RolesApi', '2.21'), + 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_17', 'SAML2SSOApi', '2.21'), + 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_17', 'SMTPApi', '2.21'), + 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_17', 'SNMPAgentsApi', '2.21'), + 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_17', 'SNMPManagersApi', '2.21'), 'ServersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.servers_api_v_2_17', 'ServersApi', '2.21'), - 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_14', 'SessionsApi', '2.21'), - 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_16', 'SoftwareApi', '2.21'), - 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_14', 'SubnetsApi', '2.21'), - 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_14', 'SupportApi', '2.21'), - 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_16', 'SupportDiagnosticsApi', '2.21'), + 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_17', 'SessionsApi', '2.21'), + 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_17', 'SoftwareApi', '2.21'), + 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_17', 'SubnetsApi', '2.21'), + 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_17', 'SupportApi', '2.21'), + 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_17', 'SupportDiagnosticsApi', '2.21'), 'SyslogApi': __LazyApiLoader('pypureclient.flashblade._common.apis.syslog_api_v_2_17', 'SyslogApi', '2.21'), 'TargetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.targets_api_v_2_17', 'TargetsApi', '2.21'), 'UsageApi': __LazyApiLoader('pypureclient.flashblade._common.apis.usage_api_v_2_17', 'UsageApi', '2.21'), - 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_14', 'VerificationKeysApi', '2.21'), + 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_17', 'VerificationKeysApi', '2.21'), } __all__ = list(__class_apis_dict.keys()) diff --git a/pypureclient/flashblade/FB_2_22/api/__init__.py b/pypureclient/flashblade/FB_2_22/api/__init__.py index a25ae876ab..f3cf125805 100644 --- a/pypureclient/flashblade/FB_2_22/api/__init__.py +++ b/pypureclient/flashblade/FB_2_22/api/__init__.py @@ -21,40 +21,40 @@ def load(self): return cls __class_apis_dict = { - 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_14', 'APIClientsApi', '2.22'), - 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_14', 'ActiveDirectoryApi', '2.22'), + 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_17', 'APIClientsApi', '2.22'), + 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_17', 'ActiveDirectoryApi', '2.22'), 'AdministratorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.administrators_api_v_2_22', 'AdministratorsApi', '2.22'), - 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_14', 'AlertWatchersApi', '2.22'), - 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_14', 'AlertsApi', '2.22'), + 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_17', 'AlertWatchersApi', '2.22'), + 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_17', 'AlertsApi', '2.22'), 'ArrayConnectionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.array_connections_api_v_2_22', 'ArrayConnectionsApi', '2.22'), 'ArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.arrays_api_v_2_22', 'ArraysApi', '2.22'), 'AuditLogTargetForFileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audit_log_target_for_file_systems_api_v_2_20', 'AuditLogTargetForFileSystemsApi', '2.22'), 'AuditLogTargetForObjectStoreApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audit_log_target_for_object_store_api_v_2_22', 'AuditLogTargetForObjectStoreApi', '2.22'), 'AuditsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audits_api_v_2_14', 'AuditsApi', '2.22'), - 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_14', 'AuthorizationApi', '2.22'), - 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_14', 'BladesApi', '2.22'), + 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_17', 'AuthorizationApi', '2.22'), + 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_17', 'BladesApi', '2.22'), 'BucketReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.bucket_replica_links_api_v_2_22', 'BucketReplicaLinksApi', '2.22'), 'BucketsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.buckets_api_v_2_22', 'BucketsApi', '2.22'), - 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_14', 'CertificateGroupsApi', '2.22'), + 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_17', 'CertificateGroupsApi', '2.22'), 'CertificatesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificates_api_v_2_20', 'CertificatesApi', '2.22'), 'ClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.clients_api_v_2_22', 'ClientsApi', '2.22'), - 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_16', 'DNSApi', '2.22'), + 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_17', 'DNSApi', '2.22'), 'DirectoryServicesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.directory_services_api_v_2_19', 'DirectoryServicesApi', '2.22'), - 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_14', 'DrivesApi', '2.22'), + 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_17', 'DrivesApi', '2.22'), 'FileSystemExportsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_exports_api_v_2_22', 'FileSystemExportsApi', '2.22'), 'FileSystemReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_replica_links_api_v_2_22', 'FileSystemReplicaLinksApi', '2.22'), 'FileSystemSnapshotsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_snapshots_api_v_2_22', 'FileSystemSnapshotsApi', '2.22'), 'FileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_systems_api_v_2_22', 'FileSystemsApi', '2.22'), 'FleetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.fleets_api_v_2_17', 'FleetsApi', '2.22'), - 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_16', 'HardwareApi', '2.22'), - 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_14', 'HardwareConnectorsApi', '2.22'), - 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_14', 'KMIPApi', '2.22'), - 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_14', 'KeytabsApi', '2.22'), + 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_17', 'HardwareApi', '2.22'), + 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_17', 'HardwareConnectorsApi', '2.22'), + 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_17', 'KMIPApi', '2.22'), + 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_17', 'KeytabsApi', '2.22'), 'LegalHoldsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.legal_holds_api_v_2_17', 'LegalHoldsApi', '2.22'), 'LifecycleRulesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.lifecycle_rules_api_v_2_22', 'LifecycleRulesApi', '2.22'), 'LinkAggregationGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.link_aggregation_groups_api_v_2_19', 'LinkAggregationGroupsApi', '2.22'), - 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_14', 'LogsApi', '2.22'), - 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_16', 'MaintenanceWindowsApi', '2.22'), + 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_17', 'LogsApi', '2.22'), + 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_17', 'MaintenanceWindowsApi', '2.22'), 'NetworkInterfacesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.network_interfaces_api_v_2_20', 'NetworkInterfacesApi', '2.22'), 'NodeGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.node_groups_api_v_2_18', 'NodeGroupsApi', '2.22'), 'NodesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.nodes_api_v_2_18', 'NodesApi', '2.22'), @@ -73,39 +73,39 @@ def load(self): 'PoliciesManagementAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_management_access_api_v_2_19', 'PoliciesManagementAccessApi', '2.22'), 'PoliciesManagementAuthenticationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_management_authentication_api_v_2_22', 'PoliciesManagementAuthenticationApi', '2.22'), 'PoliciesNFSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_nfs_api_v_2_22', 'PoliciesNFSApi', '2.22'), - 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_14', 'PoliciesNetworkAccessApi', '2.22'), + 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_17', 'PoliciesNetworkAccessApi', '2.22'), 'PoliciesObjectStoreAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_object_store_access_api_v_2_22', 'PoliciesObjectStoreAccessApi', '2.22'), - 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_16', 'PoliciesPasswordApi', '2.22'), + 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_17', 'PoliciesPasswordApi', '2.22'), 'PoliciesQoSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_qo_s_api_v_2_21', 'PoliciesQoSApi', '2.22'), 'PoliciesS3ExportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_s3_export_api_v_2_22', 'PoliciesS3ExportApi', '2.22'), 'PoliciesSMBClientApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_client_api_v_2_22', 'PoliciesSMBClientApi', '2.22'), 'PoliciesSMBShareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_share_api_v_2_22', 'PoliciesSMBShareApi', '2.22'), - 'PoliciesSSHCertificateAuthorityApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_ssh_certificate_authority_api_v_2_14', 'PoliciesSSHCertificateAuthorityApi', '2.22'), + 'PoliciesSSHCertificateAuthorityApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_ssh_certificate_authority_api_v_2_17', 'PoliciesSSHCertificateAuthorityApi', '2.22'), 'PoliciesSnapshotApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_snapshot_api_v_2_22', 'PoliciesSnapshotApi', '2.22'), 'PoliciesStorageClassTieringApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_storage_class_tiering_api_v_2_22', 'PoliciesStorageClassTieringApi', '2.22'), 'PoliciesTLSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_tls_api_v_2_17', 'PoliciesTLSApi', '2.22'), 'PoliciesWORMDataApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_worm_data_api_v_2_22', 'PoliciesWORMDataApi', '2.22'), - 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_14', 'PublicKeysApi', '2.22'), + 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_17', 'PublicKeysApi', '2.22'), 'QuotasApi': __LazyApiLoader('pypureclient.flashblade._common.apis.quotas_api_v_2_22', 'QuotasApi', '2.22'), - 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_14', 'RDLApi', '2.22'), + 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_17', 'RDLApi', '2.22'), 'RealmsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.realms_api_v_2_22', 'RealmsApi', '2.22'), 'RemoteArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.remote_arrays_api_v_2_17', 'RemoteArraysApi', '2.22'), 'ResourceAccessesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.resource_accesses_api_v_2_19', 'ResourceAccessesApi', '2.22'), - 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_14', 'RolesApi', '2.22'), - 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_16', 'SAML2SSOApi', '2.22'), - 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_14', 'SMTPApi', '2.22'), - 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_14', 'SNMPAgentsApi', '2.22'), - 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_14', 'SNMPManagersApi', '2.22'), + 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_17', 'RolesApi', '2.22'), + 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_17', 'SAML2SSOApi', '2.22'), + 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_17', 'SMTPApi', '2.22'), + 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_17', 'SNMPAgentsApi', '2.22'), + 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_17', 'SNMPManagersApi', '2.22'), 'ServersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.servers_api_v_2_22', 'ServersApi', '2.22'), - 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_14', 'SessionsApi', '2.22'), - 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_16', 'SoftwareApi', '2.22'), - 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_14', 'SubnetsApi', '2.22'), - 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_14', 'SupportApi', '2.22'), - 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_16', 'SupportDiagnosticsApi', '2.22'), + 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_17', 'SessionsApi', '2.22'), + 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_17', 'SoftwareApi', '2.22'), + 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_17', 'SubnetsApi', '2.22'), + 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_17', 'SupportApi', '2.22'), + 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_17', 'SupportDiagnosticsApi', '2.22'), 'SyslogApi': __LazyApiLoader('pypureclient.flashblade._common.apis.syslog_api_v_2_22', 'SyslogApi', '2.22'), 'TargetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.targets_api_v_2_22', 'TargetsApi', '2.22'), 'UsageApi': __LazyApiLoader('pypureclient.flashblade._common.apis.usage_api_v_2_22', 'UsageApi', '2.22'), - 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_14', 'VerificationKeysApi', '2.22'), + 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_17', 'VerificationKeysApi', '2.22'), } __all__ = list(__class_apis_dict.keys()) diff --git a/pypureclient/flashblade/FB_2_23/api/__init__.py b/pypureclient/flashblade/FB_2_23/api/__init__.py index ff51d7aa94..da183d41a7 100644 --- a/pypureclient/flashblade/FB_2_23/api/__init__.py +++ b/pypureclient/flashblade/FB_2_23/api/__init__.py @@ -21,40 +21,40 @@ def load(self): return cls __class_apis_dict = { - 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_14', 'APIClientsApi', '2.23'), + 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_17', 'APIClientsApi', '2.23'), 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_23', 'ActiveDirectoryApi', '2.23'), 'AdministratorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.administrators_api_v_2_22', 'AdministratorsApi', '2.23'), - 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_14', 'AlertWatchersApi', '2.23'), - 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_14', 'AlertsApi', '2.23'), + 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_17', 'AlertWatchersApi', '2.23'), + 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_17', 'AlertsApi', '2.23'), 'ArrayConnectionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.array_connections_api_v_2_22', 'ArrayConnectionsApi', '2.23'), 'ArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.arrays_api_v_2_22', 'ArraysApi', '2.23'), 'AuditLogTargetForFileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audit_log_target_for_file_systems_api_v_2_20', 'AuditLogTargetForFileSystemsApi', '2.23'), 'AuditLogTargetForObjectStoreApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audit_log_target_for_object_store_api_v_2_22', 'AuditLogTargetForObjectStoreApi', '2.23'), 'AuditsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audits_api_v_2_14', 'AuditsApi', '2.23'), - 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_14', 'AuthorizationApi', '2.23'), - 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_14', 'BladesApi', '2.23'), + 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_17', 'AuthorizationApi', '2.23'), + 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_17', 'BladesApi', '2.23'), 'BucketReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.bucket_replica_links_api_v_2_22', 'BucketReplicaLinksApi', '2.23'), 'BucketsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.buckets_api_v_2_22', 'BucketsApi', '2.23'), - 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_14', 'CertificateGroupsApi', '2.23'), + 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_17', 'CertificateGroupsApi', '2.23'), 'CertificatesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificates_api_v_2_20', 'CertificatesApi', '2.23'), 'ClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.clients_api_v_2_22', 'ClientsApi', '2.23'), - 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_16', 'DNSApi', '2.23'), + 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_17', 'DNSApi', '2.23'), 'DirectoryServicesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.directory_services_api_v_2_23', 'DirectoryServicesApi', '2.23'), - 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_14', 'DrivesApi', '2.23'), + 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_17', 'DrivesApi', '2.23'), 'FileSystemExportsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_exports_api_v_2_23', 'FileSystemExportsApi', '2.23'), 'FileSystemReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_replica_links_api_v_2_22', 'FileSystemReplicaLinksApi', '2.23'), 'FileSystemSnapshotsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_snapshots_api_v_2_22', 'FileSystemSnapshotsApi', '2.23'), 'FileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_systems_api_v_2_23', 'FileSystemsApi', '2.23'), 'FleetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.fleets_api_v_2_17', 'FleetsApi', '2.23'), - 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_16', 'HardwareApi', '2.23'), - 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_14', 'HardwareConnectorsApi', '2.23'), - 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_14', 'KMIPApi', '2.23'), - 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_14', 'KeytabsApi', '2.23'), + 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_17', 'HardwareApi', '2.23'), + 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_17', 'HardwareConnectorsApi', '2.23'), + 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_17', 'KMIPApi', '2.23'), + 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_17', 'KeytabsApi', '2.23'), 'LegalHoldsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.legal_holds_api_v_2_17', 'LegalHoldsApi', '2.23'), 'LifecycleRulesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.lifecycle_rules_api_v_2_22', 'LifecycleRulesApi', '2.23'), 'LinkAggregationGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.link_aggregation_groups_api_v_2_19', 'LinkAggregationGroupsApi', '2.23'), - 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_14', 'LogsApi', '2.23'), - 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_16', 'MaintenanceWindowsApi', '2.23'), + 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_17', 'LogsApi', '2.23'), + 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_17', 'MaintenanceWindowsApi', '2.23'), 'NetworkInterfacesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.network_interfaces_api_v_2_20', 'NetworkInterfacesApi', '2.23'), 'NodeGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.node_groups_api_v_2_18', 'NodeGroupsApi', '2.23'), 'NodesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.nodes_api_v_2_23', 'NodesApi', '2.23'), @@ -73,41 +73,41 @@ def load(self): 'PoliciesManagementAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_management_access_api_v_2_19', 'PoliciesManagementAccessApi', '2.23'), 'PoliciesManagementAuthenticationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_management_authentication_api_v_2_22', 'PoliciesManagementAuthenticationApi', '2.23'), 'PoliciesNFSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_nfs_api_v_2_23', 'PoliciesNFSApi', '2.23'), - 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_14', 'PoliciesNetworkAccessApi', '2.23'), + 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_17', 'PoliciesNetworkAccessApi', '2.23'), 'PoliciesObjectStoreAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_object_store_access_api_v_2_22', 'PoliciesObjectStoreAccessApi', '2.23'), - 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_16', 'PoliciesPasswordApi', '2.23'), + 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_17', 'PoliciesPasswordApi', '2.23'), 'PoliciesQoSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_qo_s_api_v_2_23', 'PoliciesQoSApi', '2.23'), 'PoliciesS3ExportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_s3_export_api_v_2_22', 'PoliciesS3ExportApi', '2.23'), 'PoliciesSMBClientApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_client_api_v_2_23', 'PoliciesSMBClientApi', '2.23'), 'PoliciesSMBShareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_share_api_v_2_23', 'PoliciesSMBShareApi', '2.23'), - 'PoliciesSSHCertificateAuthorityApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_ssh_certificate_authority_api_v_2_14', 'PoliciesSSHCertificateAuthorityApi', '2.23'), + 'PoliciesSSHCertificateAuthorityApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_ssh_certificate_authority_api_v_2_17', 'PoliciesSSHCertificateAuthorityApi', '2.23'), 'PoliciesSnapshotApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_snapshot_api_v_2_23', 'PoliciesSnapshotApi', '2.23'), 'PoliciesStorageClassTieringApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_storage_class_tiering_api_v_2_22', 'PoliciesStorageClassTieringApi', '2.23'), 'PoliciesTLSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_tls_api_v_2_17', 'PoliciesTLSApi', '2.23'), 'PoliciesWORMDataApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_worm_data_api_v_2_22', 'PoliciesWORMDataApi', '2.23'), 'PresetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.presets_api_v_2_23', 'PresetsApi', '2.23'), - 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_14', 'PublicKeysApi', '2.23'), + 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_17', 'PublicKeysApi', '2.23'), 'QuotasApi': __LazyApiLoader('pypureclient.flashblade._common.apis.quotas_api_v_2_22', 'QuotasApi', '2.23'), - 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_14', 'RDLApi', '2.23'), + 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_17', 'RDLApi', '2.23'), 'RealmsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.realms_api_v_2_22', 'RealmsApi', '2.23'), 'RemoteArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.remote_arrays_api_v_2_17', 'RemoteArraysApi', '2.23'), 'ResiliencyGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.resiliency_groups_api_v_2_23', 'ResiliencyGroupsApi', '2.23'), 'ResourceAccessesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.resource_accesses_api_v_2_19', 'ResourceAccessesApi', '2.23'), - 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_14', 'RolesApi', '2.23'), - 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_16', 'SAML2SSOApi', '2.23'), - 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_14', 'SMTPApi', '2.23'), - 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_14', 'SNMPAgentsApi', '2.23'), - 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_14', 'SNMPManagersApi', '2.23'), + 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_17', 'RolesApi', '2.23'), + 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_17', 'SAML2SSOApi', '2.23'), + 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_17', 'SMTPApi', '2.23'), + 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_17', 'SNMPAgentsApi', '2.23'), + 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_17', 'SNMPManagersApi', '2.23'), 'ServersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.servers_api_v_2_22', 'ServersApi', '2.23'), - 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_14', 'SessionsApi', '2.23'), - 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_16', 'SoftwareApi', '2.23'), - 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_14', 'SubnetsApi', '2.23'), - 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_14', 'SupportApi', '2.23'), - 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_16', 'SupportDiagnosticsApi', '2.23'), + 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_17', 'SessionsApi', '2.23'), + 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_17', 'SoftwareApi', '2.23'), + 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_17', 'SubnetsApi', '2.23'), + 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_17', 'SupportApi', '2.23'), + 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_17', 'SupportDiagnosticsApi', '2.23'), 'SyslogApi': __LazyApiLoader('pypureclient.flashblade._common.apis.syslog_api_v_2_22', 'SyslogApi', '2.23'), 'TargetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.targets_api_v_2_22', 'TargetsApi', '2.23'), 'UsageApi': __LazyApiLoader('pypureclient.flashblade._common.apis.usage_api_v_2_22', 'UsageApi', '2.23'), - 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_14', 'VerificationKeysApi', '2.23'), + 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_17', 'VerificationKeysApi', '2.23'), 'WorkloadsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.workloads_api_v_2_23', 'WorkloadsApi', '2.23'), } diff --git a/pypureclient/flashblade/FB_2_24/api/__init__.py b/pypureclient/flashblade/FB_2_24/api/__init__.py index bb6a9e6ead..9f3256d83e 100644 --- a/pypureclient/flashblade/FB_2_24/api/__init__.py +++ b/pypureclient/flashblade/FB_2_24/api/__init__.py @@ -21,40 +21,40 @@ def load(self): return cls __class_apis_dict = { - 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_14', 'APIClientsApi', '2.24'), + 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_17', 'APIClientsApi', '2.24'), 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_23', 'ActiveDirectoryApi', '2.24'), 'AdministratorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.administrators_api_v_2_24', 'AdministratorsApi', '2.24'), - 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_14', 'AlertWatchersApi', '2.24'), - 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_14', 'AlertsApi', '2.24'), + 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_17', 'AlertWatchersApi', '2.24'), + 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_17', 'AlertsApi', '2.24'), 'ArrayConnectionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.array_connections_api_v_2_22', 'ArrayConnectionsApi', '2.24'), 'ArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.arrays_api_v_2_24', 'ArraysApi', '2.24'), 'AuditLogTargetForFileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audit_log_target_for_file_systems_api_v_2_20', 'AuditLogTargetForFileSystemsApi', '2.24'), 'AuditLogTargetForObjectStoreApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audit_log_target_for_object_store_api_v_2_22', 'AuditLogTargetForObjectStoreApi', '2.24'), 'AuditsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audits_api_v_2_14', 'AuditsApi', '2.24'), - 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_14', 'AuthorizationApi', '2.24'), - 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_14', 'BladesApi', '2.24'), + 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_17', 'AuthorizationApi', '2.24'), + 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_17', 'BladesApi', '2.24'), 'BucketReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.bucket_replica_links_api_v_2_22', 'BucketReplicaLinksApi', '2.24'), 'BucketsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.buckets_api_v_2_22', 'BucketsApi', '2.24'), - 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_14', 'CertificateGroupsApi', '2.24'), + 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_17', 'CertificateGroupsApi', '2.24'), 'CertificatesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificates_api_v_2_20', 'CertificatesApi', '2.24'), 'ClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.clients_api_v_2_22', 'ClientsApi', '2.24'), - 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_16', 'DNSApi', '2.24'), + 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_17', 'DNSApi', '2.24'), 'DirectoryServicesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.directory_services_api_v_2_24', 'DirectoryServicesApi', '2.24'), - 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_14', 'DrivesApi', '2.24'), + 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_17', 'DrivesApi', '2.24'), 'FileSystemExportsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_exports_api_v_2_23', 'FileSystemExportsApi', '2.24'), 'FileSystemReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_replica_links_api_v_2_22', 'FileSystemReplicaLinksApi', '2.24'), 'FileSystemSnapshotsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_snapshots_api_v_2_22', 'FileSystemSnapshotsApi', '2.24'), 'FileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_systems_api_v_2_23', 'FileSystemsApi', '2.24'), 'FleetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.fleets_api_v_2_17', 'FleetsApi', '2.24'), - 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_16', 'HardwareApi', '2.24'), - 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_14', 'HardwareConnectorsApi', '2.24'), - 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_14', 'KMIPApi', '2.24'), - 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_14', 'KeytabsApi', '2.24'), + 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_17', 'HardwareApi', '2.24'), + 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_17', 'HardwareConnectorsApi', '2.24'), + 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_17', 'KMIPApi', '2.24'), + 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_17', 'KeytabsApi', '2.24'), 'LegalHoldsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.legal_holds_api_v_2_17', 'LegalHoldsApi', '2.24'), 'LifecycleRulesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.lifecycle_rules_api_v_2_22', 'LifecycleRulesApi', '2.24'), 'LinkAggregationGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.link_aggregation_groups_api_v_2_19', 'LinkAggregationGroupsApi', '2.24'), - 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_14', 'LogsApi', '2.24'), - 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_16', 'MaintenanceWindowsApi', '2.24'), + 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_17', 'LogsApi', '2.24'), + 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_17', 'MaintenanceWindowsApi', '2.24'), 'NetworkInterfacesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.network_interfaces_api_v_2_20', 'NetworkInterfacesApi', '2.24'), 'NodeGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.node_groups_api_v_2_18', 'NodeGroupsApi', '2.24'), 'NodesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.nodes_api_v_2_23', 'NodesApi', '2.24'), @@ -73,9 +73,9 @@ def load(self): 'PoliciesManagementAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_management_access_api_v_2_24', 'PoliciesManagementAccessApi', '2.24'), 'PoliciesManagementAuthenticationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_management_authentication_api_v_2_22', 'PoliciesManagementAuthenticationApi', '2.24'), 'PoliciesNFSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_nfs_api_v_2_23', 'PoliciesNFSApi', '2.24'), - 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_14', 'PoliciesNetworkAccessApi', '2.24'), + 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_17', 'PoliciesNetworkAccessApi', '2.24'), 'PoliciesObjectStoreAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_object_store_access_api_v_2_22', 'PoliciesObjectStoreAccessApi', '2.24'), - 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_16', 'PoliciesPasswordApi', '2.24'), + 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_17', 'PoliciesPasswordApi', '2.24'), 'PoliciesQoSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_qo_s_api_v_2_23', 'PoliciesQoSApi', '2.24'), 'PoliciesS3ExportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_s3_export_api_v_2_22', 'PoliciesS3ExportApi', '2.24'), 'PoliciesSMBClientApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_client_api_v_2_23', 'PoliciesSMBClientApi', '2.24'), @@ -86,28 +86,28 @@ def load(self): 'PoliciesTLSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_tls_api_v_2_17', 'PoliciesTLSApi', '2.24'), 'PoliciesWORMDataApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_worm_data_api_v_2_22', 'PoliciesWORMDataApi', '2.24'), 'PresetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.presets_api_v_2_23', 'PresetsApi', '2.24'), - 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_14', 'PublicKeysApi', '2.24'), + 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_17', 'PublicKeysApi', '2.24'), 'QuotasApi': __LazyApiLoader('pypureclient.flashblade._common.apis.quotas_api_v_2_24', 'QuotasApi', '2.24'), - 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_14', 'RDLApi', '2.24'), + 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_17', 'RDLApi', '2.24'), 'RealmsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.realms_api_v_2_24', 'RealmsApi', '2.24'), 'RemoteArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.remote_arrays_api_v_2_17', 'RemoteArraysApi', '2.24'), 'ResiliencyGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.resiliency_groups_api_v_2_23', 'ResiliencyGroupsApi', '2.24'), 'ResourceAccessesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.resource_accesses_api_v_2_19', 'ResourceAccessesApi', '2.24'), - 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_14', 'RolesApi', '2.24'), - 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_16', 'SAML2SSOApi', '2.24'), - 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_14', 'SMTPApi', '2.24'), - 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_14', 'SNMPAgentsApi', '2.24'), - 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_14', 'SNMPManagersApi', '2.24'), + 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_17', 'RolesApi', '2.24'), + 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_17', 'SAML2SSOApi', '2.24'), + 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_17', 'SMTPApi', '2.24'), + 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_17', 'SNMPAgentsApi', '2.24'), + 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_17', 'SNMPManagersApi', '2.24'), 'ServersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.servers_api_v_2_24', 'ServersApi', '2.24'), - 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_14', 'SessionsApi', '2.24'), + 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_17', 'SessionsApi', '2.24'), 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_24', 'SoftwareApi', '2.24'), - 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_14', 'SubnetsApi', '2.24'), - 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_14', 'SupportApi', '2.24'), + 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_17', 'SubnetsApi', '2.24'), + 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_17', 'SupportApi', '2.24'), 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_24', 'SupportDiagnosticsApi', '2.24'), 'SyslogApi': __LazyApiLoader('pypureclient.flashblade._common.apis.syslog_api_v_2_22', 'SyslogApi', '2.24'), 'TargetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.targets_api_v_2_22', 'TargetsApi', '2.24'), 'UsageApi': __LazyApiLoader('pypureclient.flashblade._common.apis.usage_api_v_2_24', 'UsageApi', '2.24'), - 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_14', 'VerificationKeysApi', '2.24'), + 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_17', 'VerificationKeysApi', '2.24'), 'WorkloadsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.workloads_api_v_2_23', 'WorkloadsApi', '2.24'), } diff --git a/pypureclient/flashblade/FB_2_25/api/__init__.py b/pypureclient/flashblade/FB_2_25/api/__init__.py index f073d4b9cd..7beea9d54d 100644 --- a/pypureclient/flashblade/FB_2_25/api/__init__.py +++ b/pypureclient/flashblade/FB_2_25/api/__init__.py @@ -21,41 +21,41 @@ def load(self): return cls __class_apis_dict = { - 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_14', 'APIClientsApi', '2.25'), + 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_17', 'APIClientsApi', '2.25'), 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_23', 'ActiveDirectoryApi', '2.25'), 'AdministratorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.administrators_api_v_2_24', 'AdministratorsApi', '2.25'), - 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_14', 'AlertWatchersApi', '2.25'), - 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_14', 'AlertsApi', '2.25'), + 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_17', 'AlertWatchersApi', '2.25'), + 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_17', 'AlertsApi', '2.25'), 'ArrayConnectionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.array_connections_api_v_2_22', 'ArrayConnectionsApi', '2.25'), 'ArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.arrays_api_v_2_24', 'ArraysApi', '2.25'), 'AuditLogTargetForFileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audit_log_target_for_file_systems_api_v_2_20', 'AuditLogTargetForFileSystemsApi', '2.25'), 'AuditLogTargetForObjectStoreApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audit_log_target_for_object_store_api_v_2_22', 'AuditLogTargetForObjectStoreApi', '2.25'), 'AuditsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audits_api_v_2_14', 'AuditsApi', '2.25'), - 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_14', 'AuthorizationApi', '2.25'), - 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_14', 'BladesApi', '2.25'), + 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_17', 'AuthorizationApi', '2.25'), + 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_17', 'BladesApi', '2.25'), 'BucketReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.bucket_replica_links_api_v_2_22', 'BucketReplicaLinksApi', '2.25'), 'BucketsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.buckets_api_v_2_22', 'BucketsApi', '2.25'), - 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_14', 'CertificateGroupsApi', '2.25'), + 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_17', 'CertificateGroupsApi', '2.25'), 'CertificatesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificates_api_v_2_20', 'CertificatesApi', '2.25'), 'ClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.clients_api_v_2_22', 'ClientsApi', '2.25'), 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_25', 'DNSApi', '2.25'), 'DirectoryServicesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.directory_services_api_v_2_24', 'DirectoryServicesApi', '2.25'), - 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_14', 'DrivesApi', '2.25'), + 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_17', 'DrivesApi', '2.25'), 'FileSystemExportsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_exports_api_v_2_23', 'FileSystemExportsApi', '2.25'), 'FileSystemJunctionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_junctions_api_v_2_25', 'FileSystemJunctionsApi', '2.25'), 'FileSystemReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_replica_links_api_v_2_25', 'FileSystemReplicaLinksApi', '2.25'), 'FileSystemSnapshotsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_snapshots_api_v_2_22', 'FileSystemSnapshotsApi', '2.25'), 'FileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_systems_api_v_2_25', 'FileSystemsApi', '2.25'), 'FleetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.fleets_api_v_2_17', 'FleetsApi', '2.25'), - 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_16', 'HardwareApi', '2.25'), - 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_14', 'HardwareConnectorsApi', '2.25'), - 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_14', 'KMIPApi', '2.25'), - 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_14', 'KeytabsApi', '2.25'), + 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_17', 'HardwareApi', '2.25'), + 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_17', 'HardwareConnectorsApi', '2.25'), + 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_17', 'KMIPApi', '2.25'), + 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_17', 'KeytabsApi', '2.25'), 'LegalHoldsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.legal_holds_api_v_2_17', 'LegalHoldsApi', '2.25'), 'LifecycleRulesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.lifecycle_rules_api_v_2_22', 'LifecycleRulesApi', '2.25'), 'LinkAggregationGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.link_aggregation_groups_api_v_2_19', 'LinkAggregationGroupsApi', '2.25'), - 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_14', 'LogsApi', '2.25'), - 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_16', 'MaintenanceWindowsApi', '2.25'), + 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_17', 'LogsApi', '2.25'), + 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_17', 'MaintenanceWindowsApi', '2.25'), 'NetworkInterfacesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.network_interfaces_api_v_2_20', 'NetworkInterfacesApi', '2.25'), 'NodeGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.node_groups_api_v_2_18', 'NodeGroupsApi', '2.25'), 'NodesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.nodes_api_v_2_23', 'NodesApi', '2.25'), @@ -74,9 +74,9 @@ def load(self): 'PoliciesManagementAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_management_access_api_v_2_24', 'PoliciesManagementAccessApi', '2.25'), 'PoliciesManagementAuthenticationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_management_authentication_api_v_2_22', 'PoliciesManagementAuthenticationApi', '2.25'), 'PoliciesNFSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_nfs_api_v_2_23', 'PoliciesNFSApi', '2.25'), - 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_14', 'PoliciesNetworkAccessApi', '2.25'), + 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_17', 'PoliciesNetworkAccessApi', '2.25'), 'PoliciesObjectStoreAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_object_store_access_api_v_2_22', 'PoliciesObjectStoreAccessApi', '2.25'), - 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_16', 'PoliciesPasswordApi', '2.25'), + 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_17', 'PoliciesPasswordApi', '2.25'), 'PoliciesQoSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_qo_s_api_v_2_23', 'PoliciesQoSApi', '2.25'), 'PoliciesS3ExportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_s3_export_api_v_2_22', 'PoliciesS3ExportApi', '2.25'), 'PoliciesSMBClientApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_client_api_v_2_23', 'PoliciesSMBClientApi', '2.25'), @@ -88,31 +88,31 @@ def load(self): 'PoliciesUserAndGroupQuotaPolicyApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_user_and_group_quota_policy_api_v_2_25', 'PoliciesUserAndGroupQuotaPolicyApi', '2.25'), 'PoliciesWORMDataApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_worm_data_api_v_2_22', 'PoliciesWORMDataApi', '2.25'), 'PresetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.presets_api_v_2_23', 'PresetsApi', '2.25'), - 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_14', 'PublicKeysApi', '2.25'), + 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_17', 'PublicKeysApi', '2.25'), 'QuotasApi': __LazyApiLoader('pypureclient.flashblade._common.apis.quotas_api_v_2_24', 'QuotasApi', '2.25'), - 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_14', 'RDLApi', '2.25'), + 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_17', 'RDLApi', '2.25'), 'RealmConnectionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.realm_connections_api_v_2_25', 'RealmConnectionsApi', '2.25'), 'RealmsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.realms_api_v_2_24', 'RealmsApi', '2.25'), 'RemoteArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.remote_arrays_api_v_2_17', 'RemoteArraysApi', '2.25'), 'RemoteRealmsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.remote_realms_api_v_2_25', 'RemoteRealmsApi', '2.25'), 'ResiliencyGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.resiliency_groups_api_v_2_23', 'ResiliencyGroupsApi', '2.25'), 'ResourceAccessesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.resource_accesses_api_v_2_19', 'ResourceAccessesApi', '2.25'), - 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_14', 'RolesApi', '2.25'), - 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_16', 'SAML2SSOApi', '2.25'), - 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_14', 'SMTPApi', '2.25'), - 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_14', 'SNMPAgentsApi', '2.25'), - 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_14', 'SNMPManagersApi', '2.25'), + 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_17', 'RolesApi', '2.25'), + 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_17', 'SAML2SSOApi', '2.25'), + 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_17', 'SMTPApi', '2.25'), + 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_17', 'SNMPAgentsApi', '2.25'), + 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_17', 'SNMPManagersApi', '2.25'), 'ServersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.servers_api_v_2_24', 'ServersApi', '2.25'), - 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_14', 'SessionsApi', '2.25'), + 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_17', 'SessionsApi', '2.25'), 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_24', 'SoftwareApi', '2.25'), - 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_14', 'SubnetsApi', '2.25'), - 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_14', 'SupportApi', '2.25'), + 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_17', 'SubnetsApi', '2.25'), + 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_17', 'SupportApi', '2.25'), 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_24', 'SupportDiagnosticsApi', '2.25'), 'SyslogApi': __LazyApiLoader('pypureclient.flashblade._common.apis.syslog_api_v_2_22', 'SyslogApi', '2.25'), 'TargetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.targets_api_v_2_22', 'TargetsApi', '2.25'), 'UsageApi': __LazyApiLoader('pypureclient.flashblade._common.apis.usage_api_v_2_24', 'UsageApi', '2.25'), 'UserGroupQuotasApi': __LazyApiLoader('pypureclient.flashblade._common.apis.user_group_quotas_api_v_2_25', 'UserGroupQuotasApi', '2.25'), - 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_14', 'VerificationKeysApi', '2.25'), + 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_17', 'VerificationKeysApi', '2.25'), 'WorkloadsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.workloads_api_v_2_23', 'WorkloadsApi', '2.25'), } diff --git a/pypureclient/flashblade/FB_2_26/api/__init__.py b/pypureclient/flashblade/FB_2_26/api/__init__.py index e7e2a30e29..0b1e5060a5 100644 --- a/pypureclient/flashblade/FB_2_26/api/__init__.py +++ b/pypureclient/flashblade/FB_2_26/api/__init__.py @@ -21,41 +21,41 @@ def load(self): return cls __class_apis_dict = { - 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_14', 'APIClientsApi', '2.26'), + 'APIClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.api_clients_api_v_2_17', 'APIClientsApi', '2.26'), 'ActiveDirectoryApi': __LazyApiLoader('pypureclient.flashblade._common.apis.active_directory_api_v_2_23', 'ActiveDirectoryApi', '2.26'), 'AdministratorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.administrators_api_v_2_24', 'AdministratorsApi', '2.26'), - 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_14', 'AlertWatchersApi', '2.26'), - 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_14', 'AlertsApi', '2.26'), + 'AlertWatchersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alert_watchers_api_v_2_17', 'AlertWatchersApi', '2.26'), + 'AlertsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.alerts_api_v_2_17', 'AlertsApi', '2.26'), 'ArrayConnectionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.array_connections_api_v_2_22', 'ArrayConnectionsApi', '2.26'), 'ArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.arrays_api_v_2_24', 'ArraysApi', '2.26'), 'AuditLogTargetForFileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audit_log_target_for_file_systems_api_v_2_20', 'AuditLogTargetForFileSystemsApi', '2.26'), 'AuditLogTargetForObjectStoreApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audit_log_target_for_object_store_api_v_2_22', 'AuditLogTargetForObjectStoreApi', '2.26'), 'AuditsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.audits_api_v_2_14', 'AuditsApi', '2.26'), 'AuthorizationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.authorization_api_v_2_26', 'AuthorizationApi', '2.26'), - 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_14', 'BladesApi', '2.26'), + 'BladesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.blades_api_v_2_17', 'BladesApi', '2.26'), 'BucketReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.bucket_replica_links_api_v_2_22', 'BucketReplicaLinksApi', '2.26'), 'BucketsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.buckets_api_v_2_22', 'BucketsApi', '2.26'), - 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_14', 'CertificateGroupsApi', '2.26'), + 'CertificateGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificate_groups_api_v_2_17', 'CertificateGroupsApi', '2.26'), 'CertificatesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.certificates_api_v_2_20', 'CertificatesApi', '2.26'), 'ClientsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.clients_api_v_2_22', 'ClientsApi', '2.26'), 'DNSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.dns_api_v_2_25', 'DNSApi', '2.26'), 'DirectoryServicesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.directory_services_api_v_2_24', 'DirectoryServicesApi', '2.26'), - 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_14', 'DrivesApi', '2.26'), + 'DrivesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.drives_api_v_2_17', 'DrivesApi', '2.26'), 'FileSystemExportsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_exports_api_v_2_23', 'FileSystemExportsApi', '2.26'), 'FileSystemJunctionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_junctions_api_v_2_25', 'FileSystemJunctionsApi', '2.26'), 'FileSystemReplicaLinksApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_replica_links_api_v_2_25', 'FileSystemReplicaLinksApi', '2.26'), 'FileSystemSnapshotsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_system_snapshots_api_v_2_22', 'FileSystemSnapshotsApi', '2.26'), 'FileSystemsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.file_systems_api_v_2_25', 'FileSystemsApi', '2.26'), 'FleetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.fleets_api_v_2_17', 'FleetsApi', '2.26'), - 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_16', 'HardwareApi', '2.26'), - 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_14', 'HardwareConnectorsApi', '2.26'), - 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_14', 'KMIPApi', '2.26'), - 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_14', 'KeytabsApi', '2.26'), + 'HardwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_api_v_2_17', 'HardwareApi', '2.26'), + 'HardwareConnectorsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.hardware_connectors_api_v_2_17', 'HardwareConnectorsApi', '2.26'), + 'KMIPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.kmip_api_v_2_17', 'KMIPApi', '2.26'), + 'KeytabsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.keytabs_api_v_2_17', 'KeytabsApi', '2.26'), 'LegalHoldsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.legal_holds_api_v_2_17', 'LegalHoldsApi', '2.26'), 'LifecycleRulesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.lifecycle_rules_api_v_2_22', 'LifecycleRulesApi', '2.26'), 'LinkAggregationGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.link_aggregation_groups_api_v_2_19', 'LinkAggregationGroupsApi', '2.26'), - 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_14', 'LogsApi', '2.26'), - 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_16', 'MaintenanceWindowsApi', '2.26'), + 'LogsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.logs_api_v_2_17', 'LogsApi', '2.26'), + 'MaintenanceWindowsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.maintenance_windows_api_v_2_17', 'MaintenanceWindowsApi', '2.26'), 'NetworkInterfacesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.network_interfaces_api_v_2_20', 'NetworkInterfacesApi', '2.26'), 'NodeGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.node_groups_api_v_2_18', 'NodeGroupsApi', '2.26'), 'NodesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.nodes_api_v_2_23', 'NodesApi', '2.26'), @@ -74,9 +74,9 @@ def load(self): 'PoliciesManagementAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_management_access_api_v_2_26', 'PoliciesManagementAccessApi', '2.26'), 'PoliciesManagementAuthenticationApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_management_authentication_api_v_2_22', 'PoliciesManagementAuthenticationApi', '2.26'), 'PoliciesNFSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_nfs_api_v_2_23', 'PoliciesNFSApi', '2.26'), - 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_14', 'PoliciesNetworkAccessApi', '2.26'), + 'PoliciesNetworkAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_network_access_api_v_2_17', 'PoliciesNetworkAccessApi', '2.26'), 'PoliciesObjectStoreAccessApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_object_store_access_api_v_2_22', 'PoliciesObjectStoreAccessApi', '2.26'), - 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_16', 'PoliciesPasswordApi', '2.26'), + 'PoliciesPasswordApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_password_api_v_2_17', 'PoliciesPasswordApi', '2.26'), 'PoliciesQoSApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_qo_s_api_v_2_23', 'PoliciesQoSApi', '2.26'), 'PoliciesS3ExportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_s3_export_api_v_2_22', 'PoliciesS3ExportApi', '2.26'), 'PoliciesSMBClientApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_smb_client_api_v_2_23', 'PoliciesSMBClientApi', '2.26'), @@ -88,24 +88,24 @@ def load(self): 'PoliciesUserAndGroupQuotaPolicyApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_user_and_group_quota_policy_api_v_2_25', 'PoliciesUserAndGroupQuotaPolicyApi', '2.26'), 'PoliciesWORMDataApi': __LazyApiLoader('pypureclient.flashblade._common.apis.policies_worm_data_api_v_2_22', 'PoliciesWORMDataApi', '2.26'), 'PresetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.presets_api_v_2_23', 'PresetsApi', '2.26'), - 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_14', 'PublicKeysApi', '2.26'), + 'PublicKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.public_keys_api_v_2_17', 'PublicKeysApi', '2.26'), 'QuotasApi': __LazyApiLoader('pypureclient.flashblade._common.apis.quotas_api_v_2_24', 'QuotasApi', '2.26'), - 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_14', 'RDLApi', '2.26'), + 'RDLApi': __LazyApiLoader('pypureclient.flashblade._common.apis.rdl_api_v_2_17', 'RDLApi', '2.26'), 'RealmConnectionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.realm_connections_api_v_2_25', 'RealmConnectionsApi', '2.26'), 'RealmsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.realms_api_v_2_24', 'RealmsApi', '2.26'), 'RemoteArraysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.remote_arrays_api_v_2_26', 'RemoteArraysApi', '2.26'), 'RemoteRealmsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.remote_realms_api_v_2_25', 'RemoteRealmsApi', '2.26'), 'ResiliencyGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.resiliency_groups_api_v_2_23', 'ResiliencyGroupsApi', '2.26'), 'ResourceAccessesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.resource_accesses_api_v_2_19', 'ResourceAccessesApi', '2.26'), - 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_14', 'RolesApi', '2.26'), - 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_16', 'SAML2SSOApi', '2.26'), - 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_14', 'SMTPApi', '2.26'), - 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_14', 'SNMPAgentsApi', '2.26'), - 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_14', 'SNMPManagersApi', '2.26'), + 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_17', 'RolesApi', '2.26'), + 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_17', 'SAML2SSOApi', '2.26'), + 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_17', 'SMTPApi', '2.26'), + 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_17', 'SNMPAgentsApi', '2.26'), + 'SNMPManagersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_managers_api_v_2_17', 'SNMPManagersApi', '2.26'), 'ServersApi': __LazyApiLoader('pypureclient.flashblade._common.apis.servers_api_v_2_24', 'ServersApi', '2.26'), - 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_14', 'SessionsApi', '2.26'), + 'SessionsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.sessions_api_v_2_17', 'SessionsApi', '2.26'), 'SoftwareApi': __LazyApiLoader('pypureclient.flashblade._common.apis.software_api_v_2_24', 'SoftwareApi', '2.26'), - 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_14', 'SubnetsApi', '2.26'), + 'SubnetsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.subnets_api_v_2_17', 'SubnetsApi', '2.26'), 'SupportApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_api_v_2_26', 'SupportApi', '2.26'), 'SupportDiagnosticsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.support_diagnostics_api_v_2_24', 'SupportDiagnosticsApi', '2.26'), 'SyslogApi': __LazyApiLoader('pypureclient.flashblade._common.apis.syslog_api_v_2_22', 'SyslogApi', '2.26'), @@ -113,7 +113,7 @@ def load(self): 'TopologyGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.topology_groups_api_v_2_26', 'TopologyGroupsApi', '2.26'), 'UsageApi': __LazyApiLoader('pypureclient.flashblade._common.apis.usage_api_v_2_24', 'UsageApi', '2.26'), 'UserGroupQuotasApi': __LazyApiLoader('pypureclient.flashblade._common.apis.user_group_quotas_api_v_2_25', 'UserGroupQuotasApi', '2.26'), - 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_14', 'VerificationKeysApi', '2.26'), + 'VerificationKeysApi': __LazyApiLoader('pypureclient.flashblade._common.apis.verification_keys_api_v_2_17', 'VerificationKeysApi', '2.26'), 'WorkloadsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.workloads_api_v_2_23', 'WorkloadsApi', '2.26'), } diff --git a/pypureclient/flashblade/FB_2_27/api/__init__.py b/pypureclient/flashblade/FB_2_27/api/__init__.py index dd6dc92601..ca97e9e47d 100644 --- a/pypureclient/flashblade/FB_2_27/api/__init__.py +++ b/pypureclient/flashblade/FB_2_27/api/__init__.py @@ -97,7 +97,7 @@ def load(self): 'RemoteRealmsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.remote_realms_api_v_2_27', 'RemoteRealmsApi', '2.27'), 'ResiliencyGroupsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.resiliency_groups_api_v_2_27', 'ResiliencyGroupsApi', '2.27'), 'ResourceAccessesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.resource_accesses_api_v_2_27', 'ResourceAccessesApi', '2.27'), - 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_14', 'RolesApi', '2.27'), + 'RolesApi': __LazyApiLoader('pypureclient.flashblade._common.apis.roles_api_v_2_17', 'RolesApi', '2.27'), 'SAML2SSOApi': __LazyApiLoader('pypureclient.flashblade._common.apis.saml2_sso_api_v_2_27', 'SAML2SSOApi', '2.27'), 'SMTPApi': __LazyApiLoader('pypureclient.flashblade._common.apis.smtp_api_v_2_27', 'SMTPApi', '2.27'), 'SNMPAgentsApi': __LazyApiLoader('pypureclient.flashblade._common.apis.snmp_agents_api_v_2_27', 'SNMPAgentsApi', '2.27'), diff --git a/pypureclient/flashblade/_common/apis/active_directory_api_v_2_14.py b/pypureclient/flashblade/_common/apis/active_directory_api_v_2_14.py index 3ad5a24f19..9aad2d80af 100644 --- a/pypureclient/flashblade/_common/apis/active_directory_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/active_directory_api_v_2_14.py @@ -771,33 +771,3 @@ def active_directory_test_get_with_http_info( api216_active_directory_patch_with_http_info = active_directory_patch_with_http_info api216_active_directory_post_with_http_info = active_directory_post_with_http_info api216_active_directory_test_get_with_http_info = active_directory_test_get_with_http_info - api217_active_directory_delete_with_http_info = active_directory_delete_with_http_info - api217_active_directory_get_with_http_info = active_directory_get_with_http_info - api217_active_directory_patch_with_http_info = active_directory_patch_with_http_info - api217_active_directory_post_with_http_info = active_directory_post_with_http_info - api217_active_directory_test_get_with_http_info = active_directory_test_get_with_http_info - api218_active_directory_delete_with_http_info = active_directory_delete_with_http_info - api218_active_directory_get_with_http_info = active_directory_get_with_http_info - api218_active_directory_patch_with_http_info = active_directory_patch_with_http_info - api218_active_directory_post_with_http_info = active_directory_post_with_http_info - api218_active_directory_test_get_with_http_info = active_directory_test_get_with_http_info - api219_active_directory_delete_with_http_info = active_directory_delete_with_http_info - api219_active_directory_get_with_http_info = active_directory_get_with_http_info - api219_active_directory_patch_with_http_info = active_directory_patch_with_http_info - api219_active_directory_post_with_http_info = active_directory_post_with_http_info - api219_active_directory_test_get_with_http_info = active_directory_test_get_with_http_info - api220_active_directory_delete_with_http_info = active_directory_delete_with_http_info - api220_active_directory_get_with_http_info = active_directory_get_with_http_info - api220_active_directory_patch_with_http_info = active_directory_patch_with_http_info - api220_active_directory_post_with_http_info = active_directory_post_with_http_info - api220_active_directory_test_get_with_http_info = active_directory_test_get_with_http_info - api221_active_directory_delete_with_http_info = active_directory_delete_with_http_info - api221_active_directory_get_with_http_info = active_directory_get_with_http_info - api221_active_directory_patch_with_http_info = active_directory_patch_with_http_info - api221_active_directory_post_with_http_info = active_directory_post_with_http_info - api221_active_directory_test_get_with_http_info = active_directory_test_get_with_http_info - api222_active_directory_delete_with_http_info = active_directory_delete_with_http_info - api222_active_directory_get_with_http_info = active_directory_get_with_http_info - api222_active_directory_patch_with_http_info = active_directory_patch_with_http_info - api222_active_directory_post_with_http_info = active_directory_post_with_http_info - api222_active_directory_test_get_with_http_info = active_directory_test_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/active_directory_api_v_2_17.py b/pypureclient/flashblade/_common/apis/active_directory_api_v_2_17.py new file mode 100644 index 0000000000..a334bd24f8 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/active_directory_api_v_2_17.py @@ -0,0 +1,788 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.active_directory_get_response_v_2_16 import ActiveDirectoryGetResponse +from pypureclient.flashblade._common.models.active_directory_patch_v_2_12 import ActiveDirectoryPatch +from pypureclient.flashblade._common.models.active_directory_post_v_2_12 import ActiveDirectoryPost +from pypureclient.flashblade._common.models.active_directory_response_v_2_16 import ActiveDirectoryResponse +from pypureclient.flashblade._common.models.test_result_get_response_v_2_0 import TestResultGetResponse + +class ActiveDirectoryApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def active_directory_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + local_only: Annotated[Optional[StrictBool], Field(description="If specified as `true`, only delete the Active Directory configuration on the local array, without deleting the computer account created in the Active Directory domain. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE active-directory + + Delete an Active Directory account. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param local_only: If specified as `true`, only delete the Active Directory configuration on the local array, without deleting the computer account created in the Active Directory domain. If not specified, defaults to `false`. + :type local_only: bool + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'local_only', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_active_directory_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('local_only') is not None: # noqa: E501 + _query_params.append(('local_only', _params['local_only'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/active-directory', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def active_directory_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET active-directory + + List Active Directory accounts and their configuration. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ActiveDirectoryGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_active_directory_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "ActiveDirectoryGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/active-directory', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def active_directory_patch_with_http_info( + self, + active_directory: ActiveDirectoryPatch, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH active-directory + + Modify the configuration of an Active Directory account. + + :param active_directory: (required) + :type active_directory: ActiveDirectoryPatch + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ActiveDirectoryResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'active_directory', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_active_directory_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['active_directory'] is not None: + _body_params = _params['active_directory'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "ActiveDirectoryResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/active-directory', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def active_directory_post_with_http_info( + self, + active_directory: ActiveDirectoryPost, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + join_existing_account: Annotated[Optional[StrictBool], Field(description="If specified as `true`, the domain is searched for a pre-existing computer account to join to, and no new account will be created within the domain. The `user` specified when joining to a pre-existing account must have permissions to 'read attributes from' and 'reset the password of' the pre-existing account. `service_principal_names`, `encryption_types`, and `join_ou` will be read from the pre-existing account and cannot be specified when joining to an existing account. If not specified, defaults to `false`.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST active-directory + + Join an Active Directory domain and generate keytabs for the registered SPNs and supported encryption types. + + :param active_directory: (required) + :type active_directory: ActiveDirectoryPost + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param join_existing_account: If specified as `true`, the domain is searched for a pre-existing computer account to join to, and no new account will be created within the domain. The `user` specified when joining to a pre-existing account must have permissions to 'read attributes from' and 'reset the password of' the pre-existing account. `service_principal_names`, `encryption_types`, and `join_ou` will be read from the pre-existing account and cannot be specified when joining to an existing account. If not specified, defaults to `false`. + :type join_existing_account: bool + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ActiveDirectoryResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'active_directory', + 'x_request_id', + 'join_existing_account', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_active_directory_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('join_existing_account') is not None: # noqa: E501 + _query_params.append(('join_existing_account', _params['join_existing_account'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['active_directory'] is not None: + _body_params = _params['active_directory'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "ActiveDirectoryResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/active-directory', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def active_directory_test_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET active-directory/test + + Testing if the configuration of an Active Directory account is valid. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TestResultGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'filter', + 'ids', + 'limit', + 'names', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_active_directory_test_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "TestResultGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/active-directory/test', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_active_directory_delete_with_http_info = active_directory_delete_with_http_info + api217_active_directory_get_with_http_info = active_directory_get_with_http_info + api217_active_directory_patch_with_http_info = active_directory_patch_with_http_info + api217_active_directory_post_with_http_info = active_directory_post_with_http_info + api217_active_directory_test_get_with_http_info = active_directory_test_get_with_http_info + api218_active_directory_delete_with_http_info = active_directory_delete_with_http_info + api218_active_directory_get_with_http_info = active_directory_get_with_http_info + api218_active_directory_patch_with_http_info = active_directory_patch_with_http_info + api218_active_directory_post_with_http_info = active_directory_post_with_http_info + api218_active_directory_test_get_with_http_info = active_directory_test_get_with_http_info + api219_active_directory_delete_with_http_info = active_directory_delete_with_http_info + api219_active_directory_get_with_http_info = active_directory_get_with_http_info + api219_active_directory_patch_with_http_info = active_directory_patch_with_http_info + api219_active_directory_post_with_http_info = active_directory_post_with_http_info + api219_active_directory_test_get_with_http_info = active_directory_test_get_with_http_info + api220_active_directory_delete_with_http_info = active_directory_delete_with_http_info + api220_active_directory_get_with_http_info = active_directory_get_with_http_info + api220_active_directory_patch_with_http_info = active_directory_patch_with_http_info + api220_active_directory_post_with_http_info = active_directory_post_with_http_info + api220_active_directory_test_get_with_http_info = active_directory_test_get_with_http_info + api221_active_directory_delete_with_http_info = active_directory_delete_with_http_info + api221_active_directory_get_with_http_info = active_directory_get_with_http_info + api221_active_directory_patch_with_http_info = active_directory_patch_with_http_info + api221_active_directory_post_with_http_info = active_directory_post_with_http_info + api221_active_directory_test_get_with_http_info = active_directory_test_get_with_http_info + api222_active_directory_delete_with_http_info = active_directory_delete_with_http_info + api222_active_directory_get_with_http_info = active_directory_get_with_http_info + api222_active_directory_patch_with_http_info = active_directory_patch_with_http_info + api222_active_directory_post_with_http_info = active_directory_post_with_http_info + api222_active_directory_test_get_with_http_info = active_directory_test_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/administrators_api_v_2_15.py b/pypureclient/flashblade/_common/apis/administrators_api_v_2_15.py index 89e96df7c9..be1234a143 100644 --- a/pypureclient/flashblade/_common/apis/administrators_api_v_2_15.py +++ b/pypureclient/flashblade/_common/apis/administrators_api_v_2_15.py @@ -1597,58 +1597,3 @@ def admins_settings_patch_with_http_info( api216_admins_post_with_http_info = admins_post_with_http_info api216_admins_settings_get_with_http_info = admins_settings_get_with_http_info api216_admins_settings_patch_with_http_info = admins_settings_patch_with_http_info - api217_admins_api_tokens_delete_with_http_info = admins_api_tokens_delete_with_http_info - api217_admins_api_tokens_get_with_http_info = admins_api_tokens_get_with_http_info - api217_admins_api_tokens_post_with_http_info = admins_api_tokens_post_with_http_info - api217_admins_cache_delete_with_http_info = admins_cache_delete_with_http_info - api217_admins_cache_get_with_http_info = admins_cache_get_with_http_info - api217_admins_delete_with_http_info = admins_delete_with_http_info - api217_admins_get_with_http_info = admins_get_with_http_info - api217_admins_patch_with_http_info = admins_patch_with_http_info - api217_admins_post_with_http_info = admins_post_with_http_info - api217_admins_settings_get_with_http_info = admins_settings_get_with_http_info - api217_admins_settings_patch_with_http_info = admins_settings_patch_with_http_info - api218_admins_api_tokens_delete_with_http_info = admins_api_tokens_delete_with_http_info - api218_admins_api_tokens_get_with_http_info = admins_api_tokens_get_with_http_info - api218_admins_api_tokens_post_with_http_info = admins_api_tokens_post_with_http_info - api218_admins_cache_delete_with_http_info = admins_cache_delete_with_http_info - api218_admins_cache_get_with_http_info = admins_cache_get_with_http_info - api218_admins_delete_with_http_info = admins_delete_with_http_info - api218_admins_get_with_http_info = admins_get_with_http_info - api218_admins_patch_with_http_info = admins_patch_with_http_info - api218_admins_post_with_http_info = admins_post_with_http_info - api218_admins_settings_get_with_http_info = admins_settings_get_with_http_info - api218_admins_settings_patch_with_http_info = admins_settings_patch_with_http_info - api219_admins_api_tokens_delete_with_http_info = admins_api_tokens_delete_with_http_info - api219_admins_api_tokens_get_with_http_info = admins_api_tokens_get_with_http_info - api219_admins_api_tokens_post_with_http_info = admins_api_tokens_post_with_http_info - api219_admins_cache_delete_with_http_info = admins_cache_delete_with_http_info - api219_admins_cache_get_with_http_info = admins_cache_get_with_http_info - api219_admins_delete_with_http_info = admins_delete_with_http_info - api219_admins_get_with_http_info = admins_get_with_http_info - api219_admins_patch_with_http_info = admins_patch_with_http_info - api219_admins_post_with_http_info = admins_post_with_http_info - api219_admins_settings_get_with_http_info = admins_settings_get_with_http_info - api219_admins_settings_patch_with_http_info = admins_settings_patch_with_http_info - api220_admins_api_tokens_delete_with_http_info = admins_api_tokens_delete_with_http_info - api220_admins_api_tokens_get_with_http_info = admins_api_tokens_get_with_http_info - api220_admins_api_tokens_post_with_http_info = admins_api_tokens_post_with_http_info - api220_admins_cache_delete_with_http_info = admins_cache_delete_with_http_info - api220_admins_cache_get_with_http_info = admins_cache_get_with_http_info - api220_admins_delete_with_http_info = admins_delete_with_http_info - api220_admins_get_with_http_info = admins_get_with_http_info - api220_admins_patch_with_http_info = admins_patch_with_http_info - api220_admins_post_with_http_info = admins_post_with_http_info - api220_admins_settings_get_with_http_info = admins_settings_get_with_http_info - api220_admins_settings_patch_with_http_info = admins_settings_patch_with_http_info - api221_admins_api_tokens_delete_with_http_info = admins_api_tokens_delete_with_http_info - api221_admins_api_tokens_get_with_http_info = admins_api_tokens_get_with_http_info - api221_admins_api_tokens_post_with_http_info = admins_api_tokens_post_with_http_info - api221_admins_cache_delete_with_http_info = admins_cache_delete_with_http_info - api221_admins_cache_get_with_http_info = admins_cache_get_with_http_info - api221_admins_delete_with_http_info = admins_delete_with_http_info - api221_admins_get_with_http_info = admins_get_with_http_info - api221_admins_patch_with_http_info = admins_patch_with_http_info - api221_admins_post_with_http_info = admins_post_with_http_info - api221_admins_settings_get_with_http_info = admins_settings_get_with_http_info - api221_admins_settings_patch_with_http_info = admins_settings_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/administrators_api_v_2_17.py b/pypureclient/flashblade/_common/apis/administrators_api_v_2_17.py new file mode 100644 index 0000000000..49a9790ac0 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/administrators_api_v_2_17.py @@ -0,0 +1,1632 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictInt, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.admin_api_token_get_response_v_2_0 import AdminApiTokenGetResponse +from pypureclient.flashblade._common.models.admin_api_token_response_v_2_0 import AdminApiTokenResponse +from pypureclient.flashblade._common.models.admin_cache_get_response_v_2_0 import AdminCacheGetResponse +from pypureclient.flashblade._common.models.admin_get_response_v_2_3 import AdminGetResponse +from pypureclient.flashblade._common.models.admin_patch_v_2_15 import AdminPatch +from pypureclient.flashblade._common.models.admin_post_v_2_15 import AdminPost +from pypureclient.flashblade._common.models.admin_response_v_2_3 import AdminResponse +from pypureclient.flashblade._common.models.admin_setting_v_2_3 import AdminSetting +from pypureclient.flashblade._common.models.admin_settings_get_response_v_2_3 import AdminSettingsGetResponse +from pypureclient.flashblade._common.models.admin_settings_response_v_2_3 import AdminSettingsResponse + +class AdministratorsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def admins_api_tokens_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + admin_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of admin IDs. If after filtering, there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with the `admin_names` query parameter.")] = None, + admin_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of admin names. If there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with `admin_ids` query parameter.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE admins/api-tokens + + Deletes the API tokens of the specified administrators. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param admin_ids: A comma-separated list of admin IDs. If after filtering, there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with the `admin_names` query parameter. + :type admin_ids: List[str] + :param admin_names: A comma-separated list of admin names. If there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with `admin_ids` query parameter. + :type admin_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'admin_ids', + 'admin_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_admins_api_tokens_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('admin_ids') is not None: # noqa: E501 + _query_params.append(('admin_ids', _params['admin_ids'])) + _collection_formats['admin_ids'] = 'csv' + + if _params.get('admin_names') is not None: # noqa: E501 + _query_params.append(('admin_names', _params['admin_names'])) + _collection_formats['admin_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/admins/api-tokens', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def admins_api_tokens_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + admin_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of admin IDs. If after filtering, there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with the `admin_names` query parameter.")] = None, + admin_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of admin names. If there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with `admin_ids` query parameter.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + expose_api_token: Annotated[Optional[StrictBool], Field(description="If `true`, exposes the API token of the current user.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET admins/api-tokens + + Displays API tokens for the specified administrators. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param admin_ids: A comma-separated list of admin IDs. If after filtering, there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with the `admin_names` query parameter. + :type admin_ids: List[str] + :param admin_names: A comma-separated list of admin names. If there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with `admin_ids` query parameter. + :type admin_names: List[str] + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param expose_api_token: If `true`, exposes the API token of the current user. + :type expose_api_token: bool + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AdminApiTokenGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'admin_ids', + 'admin_names', + 'continuation_token', + 'expose_api_token', + 'filter', + 'limit', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_admins_api_tokens_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('admin_ids') is not None: # noqa: E501 + _query_params.append(('admin_ids', _params['admin_ids'])) + _collection_formats['admin_ids'] = 'csv' + + if _params.get('admin_names') is not None: # noqa: E501 + _query_params.append(('admin_names', _params['admin_names'])) + _collection_formats['admin_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('expose_api_token') is not None: # noqa: E501 + _query_params.append(('expose_api_token', _params['expose_api_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "AdminApiTokenGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/admins/api-tokens', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def admins_api_tokens_post_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + admin_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of admin IDs. If after filtering, there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with the `admin_names` query parameter.")] = None, + admin_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of admin names. If there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with `admin_ids` query parameter.")] = None, + timeout: Annotated[Optional[StrictInt], Field(description="The duration of API token validity, in milliseconds.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST admins/api-tokens + + Creates API tokens for the specified administrators. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param admin_ids: A comma-separated list of admin IDs. If after filtering, there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with the `admin_names` query parameter. + :type admin_ids: List[str] + :param admin_names: A comma-separated list of admin names. If there is not at least one admin resource that matches each of the elements, then an error is returned. This cannot be provided together with `admin_ids` query parameter. + :type admin_names: List[str] + :param timeout: The duration of API token validity, in milliseconds. + :type timeout: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AdminApiTokenResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'admin_ids', + 'admin_names', + 'timeout' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_admins_api_tokens_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('admin_ids') is not None: # noqa: E501 + _query_params.append(('admin_ids', _params['admin_ids'])) + _collection_formats['admin_ids'] = 'csv' + + if _params.get('admin_names') is not None: # noqa: E501 + _query_params.append(('admin_names', _params['admin_names'])) + _collection_formats['admin_names'] = 'csv' + + if _params.get('timeout') is not None: # noqa: E501 + _query_params.append(('timeout', _params['timeout'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "AdminApiTokenResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/admins/api-tokens', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def admins_cache_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE admins/cache + + Delete cached administrator role information by name or ID. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_admins_cache_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/admins/cache', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def admins_cache_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + refresh: Annotated[Optional[StrictBool], Field(description="Whether to refresh the user info from directory service. If not specified, defaults to `false`.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET admins/cache + + List cached administrator information used to determine role based access control privileges. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param refresh: Whether to refresh the user info from directory service. If not specified, defaults to `false`. + :type refresh: bool + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AdminCacheGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'refresh', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_admins_cache_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('refresh') is not None: # noqa: E501 + _query_params.append(('refresh', _params['refresh'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "AdminCacheGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/admins/cache', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def admins_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE admins + + Delete a local administrator.. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_admins_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/admins', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def admins_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + expose_api_token: Annotated[Optional[StrictBool], Field(description="If `true`, exposes the API token of the current user.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET admins + + List the administrator's attributes, including the API token and public key. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param expose_api_token: If `true`, exposes the API token of the current user. + :type expose_api_token: bool + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AdminGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'expose_api_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_admins_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('expose_api_token') is not None: # noqa: E501 + _query_params.append(('expose_api_token', _params['expose_api_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "AdminGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/admins', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def admins_patch_with_http_info( + self, + admin: AdminPatch, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH admins + + Modify the attributes of an administrator. + + :param admin: (required) + :type admin: AdminPatch + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AdminResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'admin', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_admins_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['admin'] is not None: + _body_params = _params['admin'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "AdminResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/admins', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def admins_post_with_http_info( + self, + admin: AdminPost, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST admins + + Create a new local administrator. + + :param admin: (required) + :type admin: AdminPost + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AdminResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'admin', + 'x_request_id', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_admins_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['admin'] is not None: + _body_params = _params['admin'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "AdminResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/admins', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def admins_settings_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List global admin settings + + Return global admin settings. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AdminSettingsGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'limit', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_admins_settings_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "AdminSettingsGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/admins/settings', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def admins_settings_patch_with_http_info( + self, + admin_setting: AdminSetting, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Update global admin settings + + Update properties for global admin settings. + + :param admin_setting: (required) + :type admin_setting: AdminSetting + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AdminSettingsResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'admin_setting', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_admins_settings_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['admin_setting'] is not None: + _body_params = _params['admin_setting'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "AdminSettingsResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/admins/settings', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_admins_api_tokens_delete_with_http_info = admins_api_tokens_delete_with_http_info + api217_admins_api_tokens_get_with_http_info = admins_api_tokens_get_with_http_info + api217_admins_api_tokens_post_with_http_info = admins_api_tokens_post_with_http_info + api217_admins_cache_delete_with_http_info = admins_cache_delete_with_http_info + api217_admins_cache_get_with_http_info = admins_cache_get_with_http_info + api217_admins_delete_with_http_info = admins_delete_with_http_info + api217_admins_get_with_http_info = admins_get_with_http_info + api217_admins_patch_with_http_info = admins_patch_with_http_info + api217_admins_post_with_http_info = admins_post_with_http_info + api217_admins_settings_get_with_http_info = admins_settings_get_with_http_info + api217_admins_settings_patch_with_http_info = admins_settings_patch_with_http_info + api218_admins_api_tokens_delete_with_http_info = admins_api_tokens_delete_with_http_info + api218_admins_api_tokens_get_with_http_info = admins_api_tokens_get_with_http_info + api218_admins_api_tokens_post_with_http_info = admins_api_tokens_post_with_http_info + api218_admins_cache_delete_with_http_info = admins_cache_delete_with_http_info + api218_admins_cache_get_with_http_info = admins_cache_get_with_http_info + api218_admins_delete_with_http_info = admins_delete_with_http_info + api218_admins_get_with_http_info = admins_get_with_http_info + api218_admins_patch_with_http_info = admins_patch_with_http_info + api218_admins_post_with_http_info = admins_post_with_http_info + api218_admins_settings_get_with_http_info = admins_settings_get_with_http_info + api218_admins_settings_patch_with_http_info = admins_settings_patch_with_http_info + api219_admins_api_tokens_delete_with_http_info = admins_api_tokens_delete_with_http_info + api219_admins_api_tokens_get_with_http_info = admins_api_tokens_get_with_http_info + api219_admins_api_tokens_post_with_http_info = admins_api_tokens_post_with_http_info + api219_admins_cache_delete_with_http_info = admins_cache_delete_with_http_info + api219_admins_cache_get_with_http_info = admins_cache_get_with_http_info + api219_admins_delete_with_http_info = admins_delete_with_http_info + api219_admins_get_with_http_info = admins_get_with_http_info + api219_admins_patch_with_http_info = admins_patch_with_http_info + api219_admins_post_with_http_info = admins_post_with_http_info + api219_admins_settings_get_with_http_info = admins_settings_get_with_http_info + api219_admins_settings_patch_with_http_info = admins_settings_patch_with_http_info + api220_admins_api_tokens_delete_with_http_info = admins_api_tokens_delete_with_http_info + api220_admins_api_tokens_get_with_http_info = admins_api_tokens_get_with_http_info + api220_admins_api_tokens_post_with_http_info = admins_api_tokens_post_with_http_info + api220_admins_cache_delete_with_http_info = admins_cache_delete_with_http_info + api220_admins_cache_get_with_http_info = admins_cache_get_with_http_info + api220_admins_delete_with_http_info = admins_delete_with_http_info + api220_admins_get_with_http_info = admins_get_with_http_info + api220_admins_patch_with_http_info = admins_patch_with_http_info + api220_admins_post_with_http_info = admins_post_with_http_info + api220_admins_settings_get_with_http_info = admins_settings_get_with_http_info + api220_admins_settings_patch_with_http_info = admins_settings_patch_with_http_info + api221_admins_api_tokens_delete_with_http_info = admins_api_tokens_delete_with_http_info + api221_admins_api_tokens_get_with_http_info = admins_api_tokens_get_with_http_info + api221_admins_api_tokens_post_with_http_info = admins_api_tokens_post_with_http_info + api221_admins_cache_delete_with_http_info = admins_cache_delete_with_http_info + api221_admins_cache_get_with_http_info = admins_cache_get_with_http_info + api221_admins_delete_with_http_info = admins_delete_with_http_info + api221_admins_get_with_http_info = admins_get_with_http_info + api221_admins_patch_with_http_info = admins_patch_with_http_info + api221_admins_post_with_http_info = admins_post_with_http_info + api221_admins_settings_get_with_http_info = admins_settings_get_with_http_info + api221_admins_settings_patch_with_http_info = admins_settings_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/alert_watchers_api_v_2_14.py b/pypureclient/flashblade/_common/apis/alert_watchers_api_v_2_14.py index fd1e8766b9..4082cef0fb 100644 --- a/pypureclient/flashblade/_common/apis/alert_watchers_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/alert_watchers_api_v_2_14.py @@ -750,53 +750,3 @@ def alert_watchers_test_get_with_http_info( api216_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info api216_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info api216_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info - api217_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info - api217_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info - api217_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info - api217_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info - api217_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info - api218_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info - api218_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info - api218_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info - api218_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info - api218_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info - api219_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info - api219_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info - api219_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info - api219_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info - api219_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info - api220_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info - api220_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info - api220_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info - api220_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info - api220_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info - api221_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info - api221_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info - api221_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info - api221_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info - api221_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info - api222_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info - api222_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info - api222_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info - api222_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info - api222_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info - api223_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info - api223_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info - api223_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info - api223_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info - api223_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info - api224_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info - api224_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info - api224_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info - api224_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info - api224_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info - api225_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info - api225_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info - api225_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info - api225_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info - api225_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info - api226_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info - api226_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info - api226_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info - api226_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info - api226_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/alert_watchers_api_v_2_17.py b/pypureclient/flashblade/_common/apis/alert_watchers_api_v_2_17.py new file mode 100644 index 0000000000..c0f1d18858 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/alert_watchers_api_v_2_17.py @@ -0,0 +1,787 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.alert_watcher_get_response_v_2_0 import AlertWatcherGetResponse +from pypureclient.flashblade._common.models.alert_watcher_post_v_2_0 import AlertWatcherPost +from pypureclient.flashblade._common.models.alert_watcher_response_v_2_0 import AlertWatcherResponse +from pypureclient.flashblade._common.models.alert_watcher_v_2_0 import AlertWatcher +from pypureclient.flashblade._common.models.test_result_response_v_2_0 import TestResultResponse + +class AlertWatchersApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def alert_watchers_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE alert-watchers + + Delete an alert watcher. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_alert_watchers_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/alert-watchers', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def alert_watchers_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET alert-watchers + + List alert watchers that are configured to receive alert messages. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AlertWatcherGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_alert_watchers_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "AlertWatcherGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/alert-watchers', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def alert_watchers_patch_with_http_info( + self, + alert_watcher: AlertWatcher, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH alert-watchers + + Modify an alert watcher’s configuration. Enable or disable an alert watcher privilege and select the level of alert notification of an alert watcher. Alert notification levels are `info`, `warning`, or `critical`. + + :param alert_watcher: (required) + :type alert_watcher: AlertWatcher + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AlertWatcherResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'alert_watcher', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_alert_watchers_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['alert_watcher'] is not None: + _body_params = _params['alert_watcher'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "AlertWatcherResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/alert-watchers', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def alert_watchers_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="A comma-separated list of resource names.")], + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + alert_watcher: Optional[AlertWatcherPost] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST alert-watchers + + Create an alert watcher to receive array alert messages. + + :param names: A comma-separated list of resource names. (required) + :type names: List[str] + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param alert_watcher: + :type alert_watcher: AlertWatcherPost + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AlertWatcherResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'x_request_id', + 'alert_watcher' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_alert_watchers_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['alert_watcher'] is not None: + _body_params = _params['alert_watcher'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "AlertWatcherResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/alert-watchers', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def alert_watchers_test_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET alert-watchers/test + + Test an alert watcher's contact information to verify alerts can be sent and received. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TestResultResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'filter', + 'ids', + 'names', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_alert_watchers_test_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "TestResultResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/alert-watchers/test', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info + api217_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info + api217_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info + api217_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info + api217_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info + api218_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info + api218_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info + api218_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info + api218_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info + api218_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info + api219_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info + api219_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info + api219_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info + api219_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info + api219_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info + api220_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info + api220_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info + api220_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info + api220_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info + api220_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info + api221_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info + api221_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info + api221_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info + api221_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info + api221_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info + api222_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info + api222_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info + api222_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info + api222_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info + api222_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info + api223_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info + api223_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info + api223_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info + api223_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info + api223_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info + api224_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info + api224_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info + api224_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info + api224_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info + api224_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info + api225_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info + api225_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info + api225_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info + api225_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info + api225_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info + api226_alert_watchers_delete_with_http_info = alert_watchers_delete_with_http_info + api226_alert_watchers_get_with_http_info = alert_watchers_get_with_http_info + api226_alert_watchers_patch_with_http_info = alert_watchers_patch_with_http_info + api226_alert_watchers_post_with_http_info = alert_watchers_post_with_http_info + api226_alert_watchers_test_get_with_http_info = alert_watchers_test_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/alerts_api_v_2_14.py b/pypureclient/flashblade/_common/apis/alerts_api_v_2_14.py index a25ef33ef8..f033767c92 100644 --- a/pypureclient/flashblade/_common/apis/alerts_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/alerts_api_v_2_14.py @@ -352,23 +352,3 @@ def alerts_patch_with_http_info( api215_alerts_patch_with_http_info = alerts_patch_with_http_info api216_alerts_get_with_http_info = alerts_get_with_http_info api216_alerts_patch_with_http_info = alerts_patch_with_http_info - api217_alerts_get_with_http_info = alerts_get_with_http_info - api217_alerts_patch_with_http_info = alerts_patch_with_http_info - api218_alerts_get_with_http_info = alerts_get_with_http_info - api218_alerts_patch_with_http_info = alerts_patch_with_http_info - api219_alerts_get_with_http_info = alerts_get_with_http_info - api219_alerts_patch_with_http_info = alerts_patch_with_http_info - api220_alerts_get_with_http_info = alerts_get_with_http_info - api220_alerts_patch_with_http_info = alerts_patch_with_http_info - api221_alerts_get_with_http_info = alerts_get_with_http_info - api221_alerts_patch_with_http_info = alerts_patch_with_http_info - api222_alerts_get_with_http_info = alerts_get_with_http_info - api222_alerts_patch_with_http_info = alerts_patch_with_http_info - api223_alerts_get_with_http_info = alerts_get_with_http_info - api223_alerts_patch_with_http_info = alerts_patch_with_http_info - api224_alerts_get_with_http_info = alerts_get_with_http_info - api224_alerts_patch_with_http_info = alerts_patch_with_http_info - api225_alerts_get_with_http_info = alerts_get_with_http_info - api225_alerts_patch_with_http_info = alerts_patch_with_http_info - api226_alerts_get_with_http_info = alerts_get_with_http_info - api226_alerts_patch_with_http_info = alerts_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/alerts_api_v_2_17.py b/pypureclient/flashblade/_common/apis/alerts_api_v_2_17.py new file mode 100644 index 0000000000..80c882c1ba --- /dev/null +++ b/pypureclient/flashblade/_common/apis/alerts_api_v_2_17.py @@ -0,0 +1,368 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.alert_get_response_v_2_0 import AlertGetResponse +from pypureclient.flashblade._common.models.alert_response_v_2_0 import AlertResponse +from pypureclient.flashblade._common.models.alert_v_2_0 import Alert + +class AlertsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def alerts_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET alerts + + Returns a list of alerts which have been generated by the array. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AlertGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_alerts_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "AlertGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/alerts', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def alerts_patch_with_http_info( + self, + alerts_settings: Alert, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH alerts + + Make changes to an alert. This is currently limited to the alert's `flagged` property. + + :param alerts_settings: (required) + :type alerts_settings: Alert + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(AlertResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'alerts_settings', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_alerts_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['alerts_settings'] is not None: + _body_params = _params['alerts_settings'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "AlertResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/alerts', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_alerts_get_with_http_info = alerts_get_with_http_info + api217_alerts_patch_with_http_info = alerts_patch_with_http_info + api218_alerts_get_with_http_info = alerts_get_with_http_info + api218_alerts_patch_with_http_info = alerts_patch_with_http_info + api219_alerts_get_with_http_info = alerts_get_with_http_info + api219_alerts_patch_with_http_info = alerts_patch_with_http_info + api220_alerts_get_with_http_info = alerts_get_with_http_info + api220_alerts_patch_with_http_info = alerts_patch_with_http_info + api221_alerts_get_with_http_info = alerts_get_with_http_info + api221_alerts_patch_with_http_info = alerts_patch_with_http_info + api222_alerts_get_with_http_info = alerts_get_with_http_info + api222_alerts_patch_with_http_info = alerts_patch_with_http_info + api223_alerts_get_with_http_info = alerts_get_with_http_info + api223_alerts_patch_with_http_info = alerts_patch_with_http_info + api224_alerts_get_with_http_info = alerts_get_with_http_info + api224_alerts_patch_with_http_info = alerts_patch_with_http_info + api225_alerts_get_with_http_info = alerts_get_with_http_info + api225_alerts_patch_with_http_info = alerts_patch_with_http_info + api226_alerts_get_with_http_info = alerts_get_with_http_info + api226_alerts_patch_with_http_info = alerts_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/api_clients_api_v_2_14.py b/pypureclient/flashblade/_common/apis/api_clients_api_v_2_14.py index 180c292337..e00e35fe97 100644 --- a/pypureclient/flashblade/_common/apis/api_clients_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/api_clients_api_v_2_14.py @@ -606,43 +606,3 @@ def api_clients_post_with_http_info( api216_api_clients_get_with_http_info = api_clients_get_with_http_info api216_api_clients_patch_with_http_info = api_clients_patch_with_http_info api216_api_clients_post_with_http_info = api_clients_post_with_http_info - api217_api_clients_delete_with_http_info = api_clients_delete_with_http_info - api217_api_clients_get_with_http_info = api_clients_get_with_http_info - api217_api_clients_patch_with_http_info = api_clients_patch_with_http_info - api217_api_clients_post_with_http_info = api_clients_post_with_http_info - api218_api_clients_delete_with_http_info = api_clients_delete_with_http_info - api218_api_clients_get_with_http_info = api_clients_get_with_http_info - api218_api_clients_patch_with_http_info = api_clients_patch_with_http_info - api218_api_clients_post_with_http_info = api_clients_post_with_http_info - api219_api_clients_delete_with_http_info = api_clients_delete_with_http_info - api219_api_clients_get_with_http_info = api_clients_get_with_http_info - api219_api_clients_patch_with_http_info = api_clients_patch_with_http_info - api219_api_clients_post_with_http_info = api_clients_post_with_http_info - api220_api_clients_delete_with_http_info = api_clients_delete_with_http_info - api220_api_clients_get_with_http_info = api_clients_get_with_http_info - api220_api_clients_patch_with_http_info = api_clients_patch_with_http_info - api220_api_clients_post_with_http_info = api_clients_post_with_http_info - api221_api_clients_delete_with_http_info = api_clients_delete_with_http_info - api221_api_clients_get_with_http_info = api_clients_get_with_http_info - api221_api_clients_patch_with_http_info = api_clients_patch_with_http_info - api221_api_clients_post_with_http_info = api_clients_post_with_http_info - api222_api_clients_delete_with_http_info = api_clients_delete_with_http_info - api222_api_clients_get_with_http_info = api_clients_get_with_http_info - api222_api_clients_patch_with_http_info = api_clients_patch_with_http_info - api222_api_clients_post_with_http_info = api_clients_post_with_http_info - api223_api_clients_delete_with_http_info = api_clients_delete_with_http_info - api223_api_clients_get_with_http_info = api_clients_get_with_http_info - api223_api_clients_patch_with_http_info = api_clients_patch_with_http_info - api223_api_clients_post_with_http_info = api_clients_post_with_http_info - api224_api_clients_delete_with_http_info = api_clients_delete_with_http_info - api224_api_clients_get_with_http_info = api_clients_get_with_http_info - api224_api_clients_patch_with_http_info = api_clients_patch_with_http_info - api224_api_clients_post_with_http_info = api_clients_post_with_http_info - api225_api_clients_delete_with_http_info = api_clients_delete_with_http_info - api225_api_clients_get_with_http_info = api_clients_get_with_http_info - api225_api_clients_patch_with_http_info = api_clients_patch_with_http_info - api225_api_clients_post_with_http_info = api_clients_post_with_http_info - api226_api_clients_delete_with_http_info = api_clients_delete_with_http_info - api226_api_clients_get_with_http_info = api_clients_get_with_http_info - api226_api_clients_patch_with_http_info = api_clients_patch_with_http_info - api226_api_clients_post_with_http_info = api_clients_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/api_clients_api_v_2_17.py b/pypureclient/flashblade/_common/apis/api_clients_api_v_2_17.py new file mode 100644 index 0000000000..bc383973f3 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/api_clients_api_v_2_17.py @@ -0,0 +1,636 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.api_client_v_2_0 import ApiClient +from pypureclient.flashblade._common.models.api_clients_post_v_2_0 import ApiClientsPost +from pypureclient.flashblade._common.models.api_clients_response_v_2_0 import ApiClientsResponse + +class APIClientsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def api_clients_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE api-clients + + Delete the API client. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_api_clients_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/api-clients', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def api_clients_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET api-clients + + List an API client and its configuration attributes. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ApiClientsResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_api_clients_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "ApiClientsResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/api-clients', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def api_clients_patch_with_http_info( + self, + api_clients: ApiClient, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH api-clients + + Modify an API client. Newly created API clients can be enabled by setting the `enabled` parameter to `true`. + + :param api_clients: (required) + :type api_clients: ApiClient + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ApiClientsResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'api_clients', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_api_clients_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['api_clients'] is not None: + _body_params = _params['api_clients'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "ApiClientsResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/api-clients', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def api_clients_post_with_http_info( + self, + api_client: ApiClientsPost, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST api-clients + + Create an API client to authorize Access Token or Bearer Tokens for use on the array. Required fields include `issuer`, `public_key`, and `access_token_ttl_in_ms`. After creating an API client, it can only be enabled by an authorized user. + + :param api_client: (required) + :type api_client: ApiClientsPost + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ApiClientsResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'api_client', + 'x_request_id', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_api_clients_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['api_client'] is not None: + _body_params = _params['api_client'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "ApiClientsResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/api-clients', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_api_clients_delete_with_http_info = api_clients_delete_with_http_info + api217_api_clients_get_with_http_info = api_clients_get_with_http_info + api217_api_clients_patch_with_http_info = api_clients_patch_with_http_info + api217_api_clients_post_with_http_info = api_clients_post_with_http_info + api218_api_clients_delete_with_http_info = api_clients_delete_with_http_info + api218_api_clients_get_with_http_info = api_clients_get_with_http_info + api218_api_clients_patch_with_http_info = api_clients_patch_with_http_info + api218_api_clients_post_with_http_info = api_clients_post_with_http_info + api219_api_clients_delete_with_http_info = api_clients_delete_with_http_info + api219_api_clients_get_with_http_info = api_clients_get_with_http_info + api219_api_clients_patch_with_http_info = api_clients_patch_with_http_info + api219_api_clients_post_with_http_info = api_clients_post_with_http_info + api220_api_clients_delete_with_http_info = api_clients_delete_with_http_info + api220_api_clients_get_with_http_info = api_clients_get_with_http_info + api220_api_clients_patch_with_http_info = api_clients_patch_with_http_info + api220_api_clients_post_with_http_info = api_clients_post_with_http_info + api221_api_clients_delete_with_http_info = api_clients_delete_with_http_info + api221_api_clients_get_with_http_info = api_clients_get_with_http_info + api221_api_clients_patch_with_http_info = api_clients_patch_with_http_info + api221_api_clients_post_with_http_info = api_clients_post_with_http_info + api222_api_clients_delete_with_http_info = api_clients_delete_with_http_info + api222_api_clients_get_with_http_info = api_clients_get_with_http_info + api222_api_clients_patch_with_http_info = api_clients_patch_with_http_info + api222_api_clients_post_with_http_info = api_clients_post_with_http_info + api223_api_clients_delete_with_http_info = api_clients_delete_with_http_info + api223_api_clients_get_with_http_info = api_clients_get_with_http_info + api223_api_clients_patch_with_http_info = api_clients_patch_with_http_info + api223_api_clients_post_with_http_info = api_clients_post_with_http_info + api224_api_clients_delete_with_http_info = api_clients_delete_with_http_info + api224_api_clients_get_with_http_info = api_clients_get_with_http_info + api224_api_clients_patch_with_http_info = api_clients_patch_with_http_info + api224_api_clients_post_with_http_info = api_clients_post_with_http_info + api225_api_clients_delete_with_http_info = api_clients_delete_with_http_info + api225_api_clients_get_with_http_info = api_clients_get_with_http_info + api225_api_clients_patch_with_http_info = api_clients_patch_with_http_info + api225_api_clients_post_with_http_info = api_clients_post_with_http_info + api226_api_clients_delete_with_http_info = api_clients_delete_with_http_info + api226_api_clients_get_with_http_info = api_clients_get_with_http_info + api226_api_clients_patch_with_http_info = api_clients_patch_with_http_info + api226_api_clients_post_with_http_info = api_clients_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/authorization_api_v_2_14.py b/pypureclient/flashblade/_common/apis/authorization_api_v_2_14.py index fa5a8745ba..ba461b3cc2 100644 --- a/pypureclient/flashblade/_common/apis/authorization_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/authorization_api_v_2_14.py @@ -630,48 +630,3 @@ def oauth210_token_post_with_http_info( api216_api_login_post_with_http_info = api_login_post_with_http_info api216_api_logout_post_with_http_info = api_logout_post_with_http_info api216_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info - api217_api_api_version_get_with_http_info = api_api_version_get_with_http_info - api217_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info - api217_api_login_post_with_http_info = api_login_post_with_http_info - api217_api_logout_post_with_http_info = api_logout_post_with_http_info - api217_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info - api218_api_api_version_get_with_http_info = api_api_version_get_with_http_info - api218_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info - api218_api_login_post_with_http_info = api_login_post_with_http_info - api218_api_logout_post_with_http_info = api_logout_post_with_http_info - api218_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info - api219_api_api_version_get_with_http_info = api_api_version_get_with_http_info - api219_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info - api219_api_login_post_with_http_info = api_login_post_with_http_info - api219_api_logout_post_with_http_info = api_logout_post_with_http_info - api219_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info - api220_api_api_version_get_with_http_info = api_api_version_get_with_http_info - api220_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info - api220_api_login_post_with_http_info = api_login_post_with_http_info - api220_api_logout_post_with_http_info = api_logout_post_with_http_info - api220_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info - api221_api_api_version_get_with_http_info = api_api_version_get_with_http_info - api221_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info - api221_api_login_post_with_http_info = api_login_post_with_http_info - api221_api_logout_post_with_http_info = api_logout_post_with_http_info - api221_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info - api222_api_api_version_get_with_http_info = api_api_version_get_with_http_info - api222_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info - api222_api_login_post_with_http_info = api_login_post_with_http_info - api222_api_logout_post_with_http_info = api_logout_post_with_http_info - api222_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info - api223_api_api_version_get_with_http_info = api_api_version_get_with_http_info - api223_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info - api223_api_login_post_with_http_info = api_login_post_with_http_info - api223_api_logout_post_with_http_info = api_logout_post_with_http_info - api223_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info - api224_api_api_version_get_with_http_info = api_api_version_get_with_http_info - api224_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info - api224_api_login_post_with_http_info = api_login_post_with_http_info - api224_api_logout_post_with_http_info = api_logout_post_with_http_info - api224_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info - api225_api_api_version_get_with_http_info = api_api_version_get_with_http_info - api225_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info - api225_api_login_post_with_http_info = api_login_post_with_http_info - api225_api_logout_post_with_http_info = api_logout_post_with_http_info - api225_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/authorization_api_v_2_17.py b/pypureclient/flashblade/_common/apis/authorization_api_v_2_17.py new file mode 100644 index 0000000000..fefcb621a5 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/authorization_api_v_2_17.py @@ -0,0 +1,662 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr +except ModuleNotFoundError: + from pydantic import Field, StrictStr + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.api_version_v_2_0 import ApiVersion +from pypureclient.flashblade._common.models.login_banner_get_response_v_2_0 import LoginBannerGetResponse +from pypureclient.flashblade._common.models.login_v_2_0 import Login +from pypureclient.flashblade._common.models.oauth210_token_post400_response_v_2_14 import Oauth210TokenPost400Response +from pypureclient.flashblade._common.models.oauth210_token_post401_response_v_2_14 import Oauth210TokenPost401Response +from pypureclient.flashblade._common.models.oauth_token_response_v_2_14 import OauthTokenResponse + +class AuthorizationApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def api_api_version_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET api_version + + Get available API versions. No authentication is required to access this endpoint. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ApiVersion, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api_api_version_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "ApiVersion", + } + + return self.api_client.call_api( + '/api/api_version', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def api_login_banner_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET login_banner + + Get the login banner for the array. No authentication is required to access this endpoint. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LoginBannerGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api_login_banner_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "LoginBannerGetResponse", + } + + return self.api_client.call_api( + '/api/login-banner', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def api_login_post_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST login + + Exchange an API token for a REST session token. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Login, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api_login_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['ApiToken'] # noqa: E501 + + _response_types_map = { + '200': "Login", + } + + return self.api_client.call_api( + '/api/login', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def api_logout_post_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST logout + + Invalidate a REST session token. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api_logout_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + '/api/logout', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def oauth210_token_post_with_http_info( + self, + grant_type: Annotated[StrictStr, Field(..., description="The method by which the access token will be obtained. The Pure Storage REST API supports the OAuth 2.0 \\\"token exchange\\\" grant type, which indicates that a token exchange is being performed. Set `grant_type` to `urn:ietf:params:oauth:grant-type:token-exchange`.")], + subject_token: Annotated[StrictStr, Field(..., description="An encoded security ID Token representing the identity of the party on behalf of whom the request is being made. The token must be issued by a trusted identity provider which must be either a registered application in Pure1 or an enabled API client on the array. The token must be a JSON Web Token and must contain the following claims: > | JWT claim | Location | API Client Field | Description | Required By | > |-|-|-|-|-| > | kid | Header | key_id | Key ID of the API client that issues the identity token. | FlashArray and FlashBlade only. | > | aud | Payload | id | Client ID of the API client that issues the identity token. | FlashArray and FlashBlade only. | > | sub | Payload | | Login name of the array user for whom the token should be issued. This must be a valid user in the system. | FlashArray and FlashBlade only. | > | iss | Payload | issuer | Application ID for the Pure1 or API client's trusted identity issuer on the array. | All products. | > | iat | Payload | | Timestamp of when the identity token was issued. Measured in milliseconds since the UNIX epoch. | All products. | > | exp | Payload | | Timestamp of when the identity token will expire. Measured in milliseconds since the UNIX epoch. | All products. | Each token must also be signed with the private key that is paired with the API client's public key.")], + subject_token_type: Annotated[StrictStr, Field(..., description="An identifier that indicates the type of security token specifed in the `subject_token` parameter. The Pure Storage REST API supports the JSON Web Token (JWT) as the means for requesting the access token. Set `subject_token_type` to `urn:ietf:params:oauth:token-type:jwt`.")], + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Get access token + + Exchanges an ID Token for an OAuth 2.0 access token. + + :param grant_type: The method by which the access token will be obtained. The Pure Storage REST API supports the OAuth 2.0 \\\"token exchange\\\" grant type, which indicates that a token exchange is being performed. Set `grant_type` to `urn:ietf:params:oauth:grant-type:token-exchange`. (required) + :type grant_type: str + :param subject_token: An encoded security ID Token representing the identity of the party on behalf of whom the request is being made. The token must be issued by a trusted identity provider which must be either a registered application in Pure1 or an enabled API client on the array. The token must be a JSON Web Token and must contain the following claims: > | JWT claim | Location | API Client Field | Description | Required By | > |-|-|-|-|-| > | kid | Header | key_id | Key ID of the API client that issues the identity token. | FlashArray and FlashBlade only. | > | aud | Payload | id | Client ID of the API client that issues the identity token. | FlashArray and FlashBlade only. | > | sub | Payload | | Login name of the array user for whom the token should be issued. This must be a valid user in the system. | FlashArray and FlashBlade only. | > | iss | Payload | issuer | Application ID for the Pure1 or API client's trusted identity issuer on the array. | All products. | > | iat | Payload | | Timestamp of when the identity token was issued. Measured in milliseconds since the UNIX epoch. | All products. | > | exp | Payload | | Timestamp of when the identity token will expire. Measured in milliseconds since the UNIX epoch. | All products. | Each token must also be signed with the private key that is paired with the API client's public key. (required) + :type subject_token: str + :param subject_token_type: An identifier that indicates the type of security token specifed in the `subject_token` parameter. The Pure Storage REST API supports the JSON Web Token (JWT) as the means for requesting the access token. Set `subject_token_type` to `urn:ietf:params:oauth:token-type:jwt`. (required) + :type subject_token_type: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(OauthTokenResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'grant_type', + 'subject_token', + 'subject_token_type', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method oauth210_token_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + if _params['grant_type'] is not None: + _form_params.append(('grant_type', _params['grant_type'])) + + if _params['subject_token'] is not None: + _form_params.append(('subject_token', _params['subject_token'])) + + if _params['subject_token_type'] is not None: + _form_params.append(('subject_token_type', _params['subject_token_type'])) + + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/x-www-form-urlencoded'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = [] # noqa: E501 + + _response_types_map = { + '200': "OauthTokenResponse", + '400': "Oauth210TokenPost400Response", + '401': "Oauth210TokenPost401Response", + } + + return self.api_client.call_api( + '/oauth2/1.0/token', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_api_api_version_get_with_http_info = api_api_version_get_with_http_info + api217_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info + api217_api_login_post_with_http_info = api_login_post_with_http_info + api217_api_logout_post_with_http_info = api_logout_post_with_http_info + api217_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info + api218_api_api_version_get_with_http_info = api_api_version_get_with_http_info + api218_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info + api218_api_login_post_with_http_info = api_login_post_with_http_info + api218_api_logout_post_with_http_info = api_logout_post_with_http_info + api218_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info + api219_api_api_version_get_with_http_info = api_api_version_get_with_http_info + api219_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info + api219_api_login_post_with_http_info = api_login_post_with_http_info + api219_api_logout_post_with_http_info = api_logout_post_with_http_info + api219_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info + api220_api_api_version_get_with_http_info = api_api_version_get_with_http_info + api220_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info + api220_api_login_post_with_http_info = api_login_post_with_http_info + api220_api_logout_post_with_http_info = api_logout_post_with_http_info + api220_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info + api221_api_api_version_get_with_http_info = api_api_version_get_with_http_info + api221_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info + api221_api_login_post_with_http_info = api_login_post_with_http_info + api221_api_logout_post_with_http_info = api_logout_post_with_http_info + api221_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info + api222_api_api_version_get_with_http_info = api_api_version_get_with_http_info + api222_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info + api222_api_login_post_with_http_info = api_login_post_with_http_info + api222_api_logout_post_with_http_info = api_logout_post_with_http_info + api222_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info + api223_api_api_version_get_with_http_info = api_api_version_get_with_http_info + api223_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info + api223_api_login_post_with_http_info = api_login_post_with_http_info + api223_api_logout_post_with_http_info = api_logout_post_with_http_info + api223_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info + api224_api_api_version_get_with_http_info = api_api_version_get_with_http_info + api224_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info + api224_api_login_post_with_http_info = api_login_post_with_http_info + api224_api_logout_post_with_http_info = api_logout_post_with_http_info + api224_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info + api225_api_api_version_get_with_http_info = api_api_version_get_with_http_info + api225_api_login_banner_get_with_http_info = api_login_banner_get_with_http_info + api225_api_login_post_with_http_info = api_login_post_with_http_info + api225_api_logout_post_with_http_info = api_logout_post_with_http_info + api225_oauth210_token_post_with_http_info = oauth210_token_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/blades_api_v_2_14.py b/pypureclient/flashblade/_common/apis/blades_api_v_2_14.py index a6f3bc18f7..1d5a5b5dbf 100644 --- a/pypureclient/flashblade/_common/apis/blades_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/blades_api_v_2_14.py @@ -216,13 +216,3 @@ def blades_get_with_http_info( api214_blades_get_with_http_info = blades_get_with_http_info api215_blades_get_with_http_info = blades_get_with_http_info api216_blades_get_with_http_info = blades_get_with_http_info - api217_blades_get_with_http_info = blades_get_with_http_info - api218_blades_get_with_http_info = blades_get_with_http_info - api219_blades_get_with_http_info = blades_get_with_http_info - api220_blades_get_with_http_info = blades_get_with_http_info - api221_blades_get_with_http_info = blades_get_with_http_info - api222_blades_get_with_http_info = blades_get_with_http_info - api223_blades_get_with_http_info = blades_get_with_http_info - api224_blades_get_with_http_info = blades_get_with_http_info - api225_blades_get_with_http_info = blades_get_with_http_info - api226_blades_get_with_http_info = blades_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/blades_api_v_2_17.py b/pypureclient/flashblade/_common/apis/blades_api_v_2_17.py new file mode 100644 index 0000000000..6a2fc90dde --- /dev/null +++ b/pypureclient/flashblade/_common/apis/blades_api_v_2_17.py @@ -0,0 +1,225 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.blade_get_response_v_2_0 import BladeGetResponse + +class BladesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def blades_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET blades + + List array blade information. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(BladeGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_blades_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "BladeGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/blades', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_blades_get_with_http_info = blades_get_with_http_info + api218_blades_get_with_http_info = blades_get_with_http_info + api219_blades_get_with_http_info = blades_get_with_http_info + api220_blades_get_with_http_info = blades_get_with_http_info + api221_blades_get_with_http_info = blades_get_with_http_info + api222_blades_get_with_http_info = blades_get_with_http_info + api223_blades_get_with_http_info = blades_get_with_http_info + api224_blades_get_with_http_info = blades_get_with_http_info + api225_blades_get_with_http_info = blades_get_with_http_info + api226_blades_get_with_http_info = blades_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/certificate_groups_api_v_2_14.py b/pypureclient/flashblade/_common/apis/certificate_groups_api_v_2_14.py index 3da70d7c46..366825f5e3 100644 --- a/pypureclient/flashblade/_common/apis/certificate_groups_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/certificate_groups_api_v_2_14.py @@ -1075,73 +1075,3 @@ def certificate_groups_uses_get_with_http_info( api216_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info api216_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info api216_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info - api217_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info - api217_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info - api217_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info - api217_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info - api217_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info - api217_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info - api217_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info - api218_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info - api218_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info - api218_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info - api218_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info - api218_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info - api218_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info - api218_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info - api219_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info - api219_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info - api219_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info - api219_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info - api219_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info - api219_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info - api219_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info - api220_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info - api220_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info - api220_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info - api220_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info - api220_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info - api220_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info - api220_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info - api221_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info - api221_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info - api221_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info - api221_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info - api221_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info - api221_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info - api221_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info - api222_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info - api222_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info - api222_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info - api222_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info - api222_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info - api222_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info - api222_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info - api223_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info - api223_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info - api223_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info - api223_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info - api223_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info - api223_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info - api223_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info - api224_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info - api224_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info - api224_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info - api224_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info - api224_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info - api224_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info - api224_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info - api225_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info - api225_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info - api225_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info - api225_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info - api225_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info - api225_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info - api225_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info - api226_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info - api226_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info - api226_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info - api226_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info - api226_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info - api226_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info - api226_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/certificate_groups_api_v_2_17.py b/pypureclient/flashblade/_common/apis/certificate_groups_api_v_2_17.py new file mode 100644 index 0000000000..ffc87f51fc --- /dev/null +++ b/pypureclient/flashblade/_common/apis/certificate_groups_api_v_2_17.py @@ -0,0 +1,1126 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.certificate_group_certificate_get_resp_v_2_0 import CertificateGroupCertificateGetResp +from pypureclient.flashblade._common.models.certificate_group_certificate_response_v_2_0 import CertificateGroupCertificateResponse +from pypureclient.flashblade._common.models.certificate_group_get_response_v_2_0 import CertificateGroupGetResponse +from pypureclient.flashblade._common.models.certificate_group_response_v_2_0 import CertificateGroupResponse +from pypureclient.flashblade._common.models.certificate_group_use_get_response_v_2_0 import CertificateGroupUseGetResponse + +class CertificateGroupsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def certificate_groups_certificates_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE certificate-groups/certificates + + Delete one or more certificate groups. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter. + :type certificate_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'certificate_group_ids', + 'certificate_group_names', + 'certificate_ids', + 'certificate_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_certificate_groups_certificates_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('certificate_group_ids') is not None: # noqa: E501 + _query_params.append(('certificate_group_ids', _params['certificate_group_ids'])) + _collection_formats['certificate_group_ids'] = 'csv' + + if _params.get('certificate_group_names') is not None: # noqa: E501 + _query_params.append(('certificate_group_names', _params['certificate_group_names'])) + _collection_formats['certificate_group_names'] = 'csv' + + if _params.get('certificate_ids') is not None: # noqa: E501 + _query_params.append(('certificate_ids', _params['certificate_ids'])) + _collection_formats['certificate_ids'] = 'csv' + + if _params.get('certificate_names') is not None: # noqa: E501 + _query_params.append(('certificate_names', _params['certificate_names'])) + _collection_formats['certificate_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/certificate-groups/certificates', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def certificate_groups_certificates_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET certificate-groups/certificates + + List membership associations between groups and certificates on the array. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter. + :type certificate_names: List[str] + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CertificateGroupCertificateGetResp, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'certificate_group_ids', + 'certificate_group_names', + 'certificate_ids', + 'certificate_names', + 'continuation_token', + 'filter', + 'limit', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_certificate_groups_certificates_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('certificate_group_ids') is not None: # noqa: E501 + _query_params.append(('certificate_group_ids', _params['certificate_group_ids'])) + _collection_formats['certificate_group_ids'] = 'csv' + + if _params.get('certificate_group_names') is not None: # noqa: E501 + _query_params.append(('certificate_group_names', _params['certificate_group_names'])) + _collection_formats['certificate_group_names'] = 'csv' + + if _params.get('certificate_ids') is not None: # noqa: E501 + _query_params.append(('certificate_ids', _params['certificate_ids'])) + _collection_formats['certificate_ids'] = 'csv' + + if _params.get('certificate_names') is not None: # noqa: E501 + _query_params.append(('certificate_names', _params['certificate_names'])) + _collection_formats['certificate_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "CertificateGroupCertificateGetResp", + } + + return self.api_client.call_api( + f'/api/{self.version}/certificate-groups/certificates', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def certificate_groups_certificates_post_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST certificate-groups/certificates + + Add one or more certificates to one or more certificate groups on the array. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter. + :type certificate_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CertificateGroupCertificateResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'certificate_group_ids', + 'certificate_group_names', + 'certificate_ids', + 'certificate_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_certificate_groups_certificates_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('certificate_group_ids') is not None: # noqa: E501 + _query_params.append(('certificate_group_ids', _params['certificate_group_ids'])) + _collection_formats['certificate_group_ids'] = 'csv' + + if _params.get('certificate_group_names') is not None: # noqa: E501 + _query_params.append(('certificate_group_names', _params['certificate_group_names'])) + _collection_formats['certificate_group_names'] = 'csv' + + if _params.get('certificate_ids') is not None: # noqa: E501 + _query_params.append(('certificate_ids', _params['certificate_ids'])) + _collection_formats['certificate_ids'] = 'csv' + + if _params.get('certificate_names') is not None: # noqa: E501 + _query_params.append(('certificate_names', _params['certificate_names'])) + _collection_formats['certificate_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "CertificateGroupCertificateResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/certificate-groups/certificates', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def certificate_groups_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE certificate-groups + + Delete one or more certificate groups from the array. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_certificate_groups_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/certificate-groups', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def certificate_groups_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET certificate-groups + + Display all array certificate groups. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CertificateGroupGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_certificate_groups_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "CertificateGroupGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/certificate-groups', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def certificate_groups_post_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST certificate-groups + + Create one or more certificate groups on the array. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CertificateGroupResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_certificate_groups_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "CertificateGroupResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/certificate-groups', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def certificate_groups_uses_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET certificate-groups/uses + + List how certificate groups are being used and by what. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CertificateGroupUseGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_certificate_groups_uses_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "CertificateGroupUseGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/certificate-groups/uses', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info + api217_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info + api217_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info + api217_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info + api217_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info + api217_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info + api217_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info + api218_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info + api218_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info + api218_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info + api218_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info + api218_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info + api218_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info + api218_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info + api219_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info + api219_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info + api219_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info + api219_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info + api219_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info + api219_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info + api219_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info + api220_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info + api220_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info + api220_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info + api220_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info + api220_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info + api220_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info + api220_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info + api221_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info + api221_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info + api221_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info + api221_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info + api221_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info + api221_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info + api221_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info + api222_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info + api222_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info + api222_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info + api222_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info + api222_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info + api222_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info + api222_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info + api223_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info + api223_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info + api223_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info + api223_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info + api223_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info + api223_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info + api223_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info + api224_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info + api224_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info + api224_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info + api224_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info + api224_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info + api224_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info + api224_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info + api225_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info + api225_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info + api225_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info + api225_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info + api225_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info + api225_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info + api225_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info + api226_certificate_groups_certificates_delete_with_http_info = certificate_groups_certificates_delete_with_http_info + api226_certificate_groups_certificates_get_with_http_info = certificate_groups_certificates_get_with_http_info + api226_certificate_groups_certificates_post_with_http_info = certificate_groups_certificates_post_with_http_info + api226_certificate_groups_delete_with_http_info = certificate_groups_delete_with_http_info + api226_certificate_groups_get_with_http_info = certificate_groups_get_with_http_info + api226_certificate_groups_post_with_http_info = certificate_groups_post_with_http_info + api226_certificate_groups_uses_get_with_http_info = certificate_groups_uses_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/certificates_api_v_2_14.py b/pypureclient/flashblade/_common/apis/certificates_api_v_2_14.py index 4da53a5df4..08d3decc5c 100644 --- a/pypureclient/flashblade/_common/apis/certificates_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/certificates_api_v_2_14.py @@ -1232,27 +1232,3 @@ def certificates_uses_get_with_http_info( api216_certificates_patch_with_http_info = certificates_patch_with_http_info api216_certificates_post_with_http_info = certificates_post_with_http_info api216_certificates_uses_get_with_http_info = certificates_uses_get_with_http_info - api217_certificates_certificate_groups_delete_with_http_info = certificates_certificate_groups_delete_with_http_info - api217_certificates_certificate_groups_get_with_http_info = certificates_certificate_groups_get_with_http_info - api217_certificates_certificate_groups_post_with_http_info = certificates_certificate_groups_post_with_http_info - api217_certificates_delete_with_http_info = certificates_delete_with_http_info - api217_certificates_get_with_http_info = certificates_get_with_http_info - api217_certificates_patch_with_http_info = certificates_patch_with_http_info - api217_certificates_post_with_http_info = certificates_post_with_http_info - api217_certificates_uses_get_with_http_info = certificates_uses_get_with_http_info - api218_certificates_certificate_groups_delete_with_http_info = certificates_certificate_groups_delete_with_http_info - api218_certificates_certificate_groups_get_with_http_info = certificates_certificate_groups_get_with_http_info - api218_certificates_certificate_groups_post_with_http_info = certificates_certificate_groups_post_with_http_info - api218_certificates_delete_with_http_info = certificates_delete_with_http_info - api218_certificates_get_with_http_info = certificates_get_with_http_info - api218_certificates_patch_with_http_info = certificates_patch_with_http_info - api218_certificates_post_with_http_info = certificates_post_with_http_info - api218_certificates_uses_get_with_http_info = certificates_uses_get_with_http_info - api219_certificates_certificate_groups_delete_with_http_info = certificates_certificate_groups_delete_with_http_info - api219_certificates_certificate_groups_get_with_http_info = certificates_certificate_groups_get_with_http_info - api219_certificates_certificate_groups_post_with_http_info = certificates_certificate_groups_post_with_http_info - api219_certificates_delete_with_http_info = certificates_delete_with_http_info - api219_certificates_get_with_http_info = certificates_get_with_http_info - api219_certificates_patch_with_http_info = certificates_patch_with_http_info - api219_certificates_post_with_http_info = certificates_post_with_http_info - api219_certificates_uses_get_with_http_info = certificates_uses_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/certificates_api_v_2_17.py b/pypureclient/flashblade/_common/apis/certificates_api_v_2_17.py new file mode 100644 index 0000000000..5799772128 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/certificates_api_v_2_17.py @@ -0,0 +1,1234 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.certificate_certificate_group_get_resp_v_2_0 import CertificateCertificateGroupGetResp +from pypureclient.flashblade._common.models.certificate_certificate_group_response_v_2_0 import CertificateCertificateGroupResponse +from pypureclient.flashblade._common.models.certificate_get_response_v_2_0 import CertificateGetResponse +from pypureclient.flashblade._common.models.certificate_patch_v_2_0 import CertificatePatch +from pypureclient.flashblade._common.models.certificate_post_v_2_15 import CertificatePost +from pypureclient.flashblade._common.models.certificate_response_v_2_0 import CertificateResponse +from pypureclient.flashblade._common.models.certificate_use_get_response_v_2_0 import CertificateUseGetResponse + +class CertificatesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def certificates_certificate_groups_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE certificates/certificate-groups + + Remove one or more certificates from one or more certificate groups. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter. + :type certificate_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'certificate_group_ids', + 'certificate_group_names', + 'certificate_ids', + 'certificate_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_certificates_certificate_groups_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('certificate_group_ids') is not None: # noqa: E501 + _query_params.append(('certificate_group_ids', _params['certificate_group_ids'])) + _collection_formats['certificate_group_ids'] = 'csv' + + if _params.get('certificate_group_names') is not None: # noqa: E501 + _query_params.append(('certificate_group_names', _params['certificate_group_names'])) + _collection_formats['certificate_group_names'] = 'csv' + + if _params.get('certificate_ids') is not None: # noqa: E501 + _query_params.append(('certificate_ids', _params['certificate_ids'])) + _collection_formats['certificate_ids'] = 'csv' + + if _params.get('certificate_names') is not None: # noqa: E501 + _query_params.append(('certificate_names', _params['certificate_names'])) + _collection_formats['certificate_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/certificates/certificate-groups', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def certificates_certificate_groups_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET certificates/certificate-groups + + List membership associations between groups and certificates. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter. + :type certificate_names: List[str] + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CertificateCertificateGroupGetResp, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'certificate_group_ids', + 'certificate_group_names', + 'certificate_ids', + 'certificate_names', + 'continuation_token', + 'filter', + 'limit', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_certificates_certificate_groups_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('certificate_group_ids') is not None: # noqa: E501 + _query_params.append(('certificate_group_ids', _params['certificate_group_ids'])) + _collection_formats['certificate_group_ids'] = 'csv' + + if _params.get('certificate_group_names') is not None: # noqa: E501 + _query_params.append(('certificate_group_names', _params['certificate_group_names'])) + _collection_formats['certificate_group_names'] = 'csv' + + if _params.get('certificate_ids') is not None: # noqa: E501 + _query_params.append(('certificate_ids', _params['certificate_ids'])) + _collection_formats['certificate_ids'] = 'csv' + + if _params.get('certificate_names') is not None: # noqa: E501 + _query_params.append(('certificate_names', _params['certificate_names'])) + _collection_formats['certificate_names'] = 'csv' + + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "CertificateCertificateGroupGetResp", + } + + return self.api_client.call_api( + f'/api/{self.version}/certificates/certificate-groups', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def certificates_certificate_groups_post_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + certificate_group_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter.")] = None, + certificate_group_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter.")] = None, + certificate_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter.")] = None, + certificate_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST certificates/certificate-groups + + Add one or more certificates to one or more certificate groups. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param certificate_group_ids: A comma-separated list of certificate group ids. If there is not at least one resource that matches each of the elements of `certificate_group_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_names` parameter. + :type certificate_group_ids: List[str] + :param certificate_group_names: A comma-separated list of certificate group names. If there is not at least one resource that matches each of the elements of `certificate_group_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_group_ids` parameter. + :type certificate_group_names: List[str] + :param certificate_ids: A comma-separated list of certificate ids. If there is not at least one resource that matches each of the elements of `certificate_ids`, then an error is returned. This cannot be provided in conjunction with the `certificate_names` parameter. + :type certificate_ids: List[str] + :param certificate_names: A comma-separated list of certificate names. If there is not at least one resource that matches each of the elements of `certificate_names`, then an error is returned. This cannot be provided in conjunction with the `certificate_ids` parameter. + :type certificate_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CertificateCertificateGroupResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'certificate_group_ids', + 'certificate_group_names', + 'certificate_ids', + 'certificate_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_certificates_certificate_groups_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('certificate_group_ids') is not None: # noqa: E501 + _query_params.append(('certificate_group_ids', _params['certificate_group_ids'])) + _collection_formats['certificate_group_ids'] = 'csv' + + if _params.get('certificate_group_names') is not None: # noqa: E501 + _query_params.append(('certificate_group_names', _params['certificate_group_names'])) + _collection_formats['certificate_group_names'] = 'csv' + + if _params.get('certificate_ids') is not None: # noqa: E501 + _query_params.append(('certificate_ids', _params['certificate_ids'])) + _collection_formats['certificate_ids'] = 'csv' + + if _params.get('certificate_names') is not None: # noqa: E501 + _query_params.append(('certificate_names', _params['certificate_names'])) + _collection_formats['certificate_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "CertificateCertificateGroupResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/certificates/certificate-groups', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def certificates_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE certificates + + Delete a CA certificate from the array. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_certificates_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/certificates', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def certificates_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET certificates + + List array certificates and their attributes. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CertificateGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_certificates_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "CertificateGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/certificates', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def certificates_patch_with_http_info( + self, + certificate: CertificatePatch, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH certificates + + Modify SSL certificate attributes such as passphrases and intermediate certificates. + + :param certificate: (required) + :type certificate: CertificatePatch + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CertificateResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'certificate', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_certificates_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['certificate'] is not None: + _body_params = _params['certificate'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "CertificateResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/certificates', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def certificates_post_with_http_info( + self, + certificate: CertificatePost, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST certificates + + Upload a CA certificate to the array. + + :param certificate: (required) + :type certificate: CertificatePost + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CertificateResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'certificate', + 'x_request_id', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_certificates_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['certificate'] is not None: + _body_params = _params['certificate'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "CertificateResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/certificates', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def certificates_uses_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET certificates/uses + + List how certificates are being used and by what. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(CertificateUseGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_certificates_uses_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "CertificateUseGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/certificates/uses', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_certificates_certificate_groups_delete_with_http_info = certificates_certificate_groups_delete_with_http_info + api217_certificates_certificate_groups_get_with_http_info = certificates_certificate_groups_get_with_http_info + api217_certificates_certificate_groups_post_with_http_info = certificates_certificate_groups_post_with_http_info + api217_certificates_delete_with_http_info = certificates_delete_with_http_info + api217_certificates_get_with_http_info = certificates_get_with_http_info + api217_certificates_patch_with_http_info = certificates_patch_with_http_info + api217_certificates_post_with_http_info = certificates_post_with_http_info + api217_certificates_uses_get_with_http_info = certificates_uses_get_with_http_info + api218_certificates_certificate_groups_delete_with_http_info = certificates_certificate_groups_delete_with_http_info + api218_certificates_certificate_groups_get_with_http_info = certificates_certificate_groups_get_with_http_info + api218_certificates_certificate_groups_post_with_http_info = certificates_certificate_groups_post_with_http_info + api218_certificates_delete_with_http_info = certificates_delete_with_http_info + api218_certificates_get_with_http_info = certificates_get_with_http_info + api218_certificates_patch_with_http_info = certificates_patch_with_http_info + api218_certificates_post_with_http_info = certificates_post_with_http_info + api218_certificates_uses_get_with_http_info = certificates_uses_get_with_http_info + api219_certificates_certificate_groups_delete_with_http_info = certificates_certificate_groups_delete_with_http_info + api219_certificates_certificate_groups_get_with_http_info = certificates_certificate_groups_get_with_http_info + api219_certificates_certificate_groups_post_with_http_info = certificates_certificate_groups_post_with_http_info + api219_certificates_delete_with_http_info = certificates_delete_with_http_info + api219_certificates_get_with_http_info = certificates_get_with_http_info + api219_certificates_patch_with_http_info = certificates_patch_with_http_info + api219_certificates_post_with_http_info = certificates_post_with_http_info + api219_certificates_uses_get_with_http_info = certificates_uses_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/clients_api_v_2_14.py b/pypureclient/flashblade/_common/apis/clients_api_v_2_14.py index a548b538d5..103ceafd3d 100644 --- a/pypureclient/flashblade/_common/apis/clients_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/clients_api_v_2_14.py @@ -194,4 +194,3 @@ def arrays_clients_performance_get_with_http_info( api214_arrays_clients_performance_get_with_http_info = arrays_clients_performance_get_with_http_info api215_arrays_clients_performance_get_with_http_info = arrays_clients_performance_get_with_http_info api216_arrays_clients_performance_get_with_http_info = arrays_clients_performance_get_with_http_info - api217_arrays_clients_performance_get_with_http_info = arrays_clients_performance_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/clients_api_v_2_17.py b/pypureclient/flashblade/_common/apis/clients_api_v_2_17.py new file mode 100644 index 0000000000..3314595e32 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/clients_api_v_2_17.py @@ -0,0 +1,194 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.client_performance_get_response_v_2_17 import ClientPerformanceGetResponse + +class ClientsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def arrays_clients_performance_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET clients-performance + + List NFS client I/O performance metrics. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(ClientPerformanceGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'filter', + 'limit', + 'names', + 'sort', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_arrays_clients_performance_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "ClientPerformanceGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/arrays/clients/performance', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_arrays_clients_performance_get_with_http_info = arrays_clients_performance_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/directory_services_api_v_2_14.py b/pypureclient/flashblade/_common/apis/directory_services_api_v_2_14.py index 1331b7f60b..b8f73f569b 100644 --- a/pypureclient/flashblade/_common/apis/directory_services_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/directory_services_api_v_2_14.py @@ -1252,19 +1252,3 @@ def directory_services_test_patch_with_http_info( api216_directory_services_roles_post_with_http_info = directory_services_roles_post_with_http_info api216_directory_services_test_get_with_http_info = directory_services_test_get_with_http_info api216_directory_services_test_patch_with_http_info = directory_services_test_patch_with_http_info - api217_directory_services_get_with_http_info = directory_services_get_with_http_info - api217_directory_services_patch_with_http_info = directory_services_patch_with_http_info - api217_directory_services_roles_delete_with_http_info = directory_services_roles_delete_with_http_info - api217_directory_services_roles_get_with_http_info = directory_services_roles_get_with_http_info - api217_directory_services_roles_patch_with_http_info = directory_services_roles_patch_with_http_info - api217_directory_services_roles_post_with_http_info = directory_services_roles_post_with_http_info - api217_directory_services_test_get_with_http_info = directory_services_test_get_with_http_info - api217_directory_services_test_patch_with_http_info = directory_services_test_patch_with_http_info - api218_directory_services_get_with_http_info = directory_services_get_with_http_info - api218_directory_services_patch_with_http_info = directory_services_patch_with_http_info - api218_directory_services_roles_delete_with_http_info = directory_services_roles_delete_with_http_info - api218_directory_services_roles_get_with_http_info = directory_services_roles_get_with_http_info - api218_directory_services_roles_patch_with_http_info = directory_services_roles_patch_with_http_info - api218_directory_services_roles_post_with_http_info = directory_services_roles_post_with_http_info - api218_directory_services_test_get_with_http_info = directory_services_test_get_with_http_info - api218_directory_services_test_patch_with_http_info = directory_services_test_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/directory_services_api_v_2_17.py b/pypureclient/flashblade/_common/apis/directory_services_api_v_2_17.py new file mode 100644 index 0000000000..0c9fc69b67 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/directory_services_api_v_2_17.py @@ -0,0 +1,1246 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.directory_service_get_response_v_2_17 import DirectoryServiceGetResponse +from pypureclient.flashblade._common.models.directory_service_response_v_2_17 import DirectoryServiceResponse +from pypureclient.flashblade._common.models.directory_service_role_v_2_14 import DirectoryServiceRole +from pypureclient.flashblade._common.models.directory_service_roles_get_response_v_2_14 import DirectoryServiceRolesGetResponse +from pypureclient.flashblade._common.models.directory_service_roles_response_v_2_14 import DirectoryServiceRolesResponse +from pypureclient.flashblade._common.models.directory_service_v_2_17 import DirectoryService +from pypureclient.flashblade._common.models.test_result_get_response_v_2_0 import TestResultGetResponse +from pypureclient.flashblade._common.models.test_result_response_v_2_0 import TestResultResponse + +class DirectoryServicesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def directory_services_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET directory-services + + List directory service configuration information. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryServiceGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_directory_services_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "DirectoryServiceGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_patch_with_http_info( + self, + directory_service: DirectoryService, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH directory-services + + Modifies and tests the directory service configuration. + + :param directory_service: (required) + :type directory_service: DirectoryService + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryServiceResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'directory_service', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_directory_services_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['directory_service'] is not None: + _body_params = _params['directory_service'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "DirectoryServiceResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_roles_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE directory-service/roles + + Delete an RBAC group configuration setting for manageability. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_directory_services_roles_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/roles', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_roles_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `names`, `role_names`, or `role_ids` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `names`, then an error is returned. This cannot be provided together with the `ids`, `role_names`, or `role_ids` query parameters.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + role_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of role_ids. If after filtering, there is not at least one resource that matches each of the elements of `role_ids`, then an error is returned. This cannot be provided together with the `ids`, `names` or `role_names` query parameters. This query parameter is deprecated for use with directory service roles. If this parameter is used to query or modify directory service roles, but more than 1 configuration exists with a given role id, an error will be returned in order to avoid ambiguous operation.")] = None, + role_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of role_names. If there is not at least one resource that matches each of the elements of `role_names`, then an error is returned. This cannot be provided together with the `ids`, `names`, or `role_ids` query parameters. This query parameter is deprecated for use with directory service roles. If this parameter is used to query or modify directory service roles, but more than 1 configuration exists with a given role name, an error will be returned in order to avoid ambiguous operation.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET directory-service/roles + + Return array's RBAC group configuration settings for manageability. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `names`, `role_names`, or `role_ids` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `names`, then an error is returned. This cannot be provided together with the `ids`, `role_names`, or `role_ids` query parameters. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param role_ids: A comma-separated list of role_ids. If after filtering, there is not at least one resource that matches each of the elements of `role_ids`, then an error is returned. This cannot be provided together with the `ids`, `names` or `role_names` query parameters. This query parameter is deprecated for use with directory service roles. If this parameter is used to query or modify directory service roles, but more than 1 configuration exists with a given role id, an error will be returned in order to avoid ambiguous operation. + :type role_ids: List[str] + :param role_names: A comma-separated list of role_names. If there is not at least one resource that matches each of the elements of `role_names`, then an error is returned. This cannot be provided together with the `ids`, `names`, or `role_ids` query parameters. This query parameter is deprecated for use with directory service roles. If this parameter is used to query or modify directory service roles, but more than 1 configuration exists with a given role name, an error will be returned in order to avoid ambiguous operation. + :type role_names: List[str] + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryServiceRolesGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'role_ids', + 'role_names', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_directory_services_roles_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('role_ids') is not None: # noqa: E501 + _query_params.append(('role_ids', _params['role_ids'])) + _collection_formats['role_ids'] = 'csv' + + if _params.get('role_names') is not None: # noqa: E501 + _query_params.append(('role_names', _params['role_names'])) + _collection_formats['role_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "DirectoryServiceRolesGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/roles', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_roles_patch_with_http_info( + self, + directory_service_roles: DirectoryServiceRole, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `names`, `role_names`, or `role_ids` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `names`, then an error is returned. This cannot be provided together with the `ids`, `role_names`, or `role_ids` query parameters.")] = None, + role_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of role_ids. If after filtering, there is not at least one resource that matches each of the elements of `role_ids`, then an error is returned. This cannot be provided together with the `ids`, `names` or `role_names` query parameters. This query parameter is deprecated for use with directory service roles. If this parameter is used to query or modify directory service roles, but more than 1 configuration exists with a given role id, an error will be returned in order to avoid ambiguous operation.")] = None, + role_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of role_names. If there is not at least one resource that matches each of the elements of `role_names`, then an error is returned. This cannot be provided together with the `ids`, `names`, or `role_ids` query parameters. This query parameter is deprecated for use with directory service roles. If this parameter is used to query or modify directory service roles, but more than 1 configuration exists with a given role name, an error will be returned in order to avoid ambiguous operation.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH directory-service/roles + + Update an RBAC group configuration setting for manageability. + + :param directory_service_roles: (required) + :type directory_service_roles: DirectoryServiceRole + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `names`, `role_names`, or `role_ids` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `names`, then an error is returned. This cannot be provided together with the `ids`, `role_names`, or `role_ids` query parameters. + :type names: List[str] + :param role_ids: A comma-separated list of role_ids. If after filtering, there is not at least one resource that matches each of the elements of `role_ids`, then an error is returned. This cannot be provided together with the `ids`, `names` or `role_names` query parameters. This query parameter is deprecated for use with directory service roles. If this parameter is used to query or modify directory service roles, but more than 1 configuration exists with a given role id, an error will be returned in order to avoid ambiguous operation. + :type role_ids: List[str] + :param role_names: A comma-separated list of role_names. If there is not at least one resource that matches each of the elements of `role_names`, then an error is returned. This cannot be provided together with the `ids`, `names`, or `role_ids` query parameters. This query parameter is deprecated for use with directory service roles. If this parameter is used to query or modify directory service roles, but more than 1 configuration exists with a given role name, an error will be returned in order to avoid ambiguous operation. + :type role_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryServiceRolesResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'directory_service_roles', + 'x_request_id', + 'ids', + 'names', + 'role_ids', + 'role_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_directory_services_roles_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('role_ids') is not None: # noqa: E501 + _query_params.append(('role_ids', _params['role_ids'])) + _collection_formats['role_ids'] = 'csv' + + if _params.get('role_names') is not None: # noqa: E501 + _query_params.append(('role_names', _params['role_names'])) + _collection_formats['role_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['directory_service_roles'] is not None: + _body_params = _params['directory_service_roles'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "DirectoryServiceRolesResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/roles', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_roles_post_with_http_info( + self, + directory_service_roles: DirectoryServiceRole, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST directory-service/roles + + Create an RBAC group configuration setting for manageability. + + :param directory_service_roles: (required) + :type directory_service_roles: DirectoryServiceRole + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DirectoryServiceRolesResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'directory_service_roles', + 'x_request_id', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_directory_services_roles_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['directory_service_roles'] is not None: + _body_params = _params['directory_service_roles'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "DirectoryServiceRolesResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/roles', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_test_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET directory-services/test + + Test the configured directory services on the array. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TestResultGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'filter', + 'ids', + 'limit', + 'names', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_directory_services_test_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "TestResultGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/test', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def directory_services_test_patch_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + directory_service: Annotated[Optional[DirectoryService], Field(description="An optional directory service configuration that, if provided, will be used to overwrite aspects of the existing directory service objects when performing tests.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH directory-service/test + + Test the configured directory services on the array. Optionally, provide modifications which will be used to perform the tests, but will not be applied to the current configuration. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param directory_service: An optional directory service configuration that, if provided, will be used to overwrite aspects of the existing directory service objects when performing tests. + :type directory_service: DirectoryService + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TestResultResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'filter', + 'ids', + 'names', + 'sort', + 'directory_service' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_directory_services_test_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['directory_service'] is not None: + _body_params = _params['directory_service'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "TestResultResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/directory-services/test', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_directory_services_get_with_http_info = directory_services_get_with_http_info + api217_directory_services_patch_with_http_info = directory_services_patch_with_http_info + api217_directory_services_roles_delete_with_http_info = directory_services_roles_delete_with_http_info + api217_directory_services_roles_get_with_http_info = directory_services_roles_get_with_http_info + api217_directory_services_roles_patch_with_http_info = directory_services_roles_patch_with_http_info + api217_directory_services_roles_post_with_http_info = directory_services_roles_post_with_http_info + api217_directory_services_test_get_with_http_info = directory_services_test_get_with_http_info + api217_directory_services_test_patch_with_http_info = directory_services_test_patch_with_http_info + api218_directory_services_get_with_http_info = directory_services_get_with_http_info + api218_directory_services_patch_with_http_info = directory_services_patch_with_http_info + api218_directory_services_roles_delete_with_http_info = directory_services_roles_delete_with_http_info + api218_directory_services_roles_get_with_http_info = directory_services_roles_get_with_http_info + api218_directory_services_roles_patch_with_http_info = directory_services_roles_patch_with_http_info + api218_directory_services_roles_post_with_http_info = directory_services_roles_post_with_http_info + api218_directory_services_test_get_with_http_info = directory_services_test_get_with_http_info + api218_directory_services_test_patch_with_http_info = directory_services_test_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/dns_api_v_2_16.py b/pypureclient/flashblade/_common/apis/dns_api_v_2_16.py index a4b6947dc5..d82571f05e 100644 --- a/pypureclient/flashblade/_common/apis/dns_api_v_2_16.py +++ b/pypureclient/flashblade/_common/apis/dns_api_v_2_16.py @@ -599,35 +599,3 @@ def dns_post_with_http_info( api216_dns_get_with_http_info = dns_get_with_http_info api216_dns_patch_with_http_info = dns_patch_with_http_info api216_dns_post_with_http_info = dns_post_with_http_info - api217_dns_delete_with_http_info = dns_delete_with_http_info - api217_dns_get_with_http_info = dns_get_with_http_info - api217_dns_patch_with_http_info = dns_patch_with_http_info - api217_dns_post_with_http_info = dns_post_with_http_info - api218_dns_delete_with_http_info = dns_delete_with_http_info - api218_dns_get_with_http_info = dns_get_with_http_info - api218_dns_patch_with_http_info = dns_patch_with_http_info - api218_dns_post_with_http_info = dns_post_with_http_info - api219_dns_delete_with_http_info = dns_delete_with_http_info - api219_dns_get_with_http_info = dns_get_with_http_info - api219_dns_patch_with_http_info = dns_patch_with_http_info - api219_dns_post_with_http_info = dns_post_with_http_info - api220_dns_delete_with_http_info = dns_delete_with_http_info - api220_dns_get_with_http_info = dns_get_with_http_info - api220_dns_patch_with_http_info = dns_patch_with_http_info - api220_dns_post_with_http_info = dns_post_with_http_info - api221_dns_delete_with_http_info = dns_delete_with_http_info - api221_dns_get_with_http_info = dns_get_with_http_info - api221_dns_patch_with_http_info = dns_patch_with_http_info - api221_dns_post_with_http_info = dns_post_with_http_info - api222_dns_delete_with_http_info = dns_delete_with_http_info - api222_dns_get_with_http_info = dns_get_with_http_info - api222_dns_patch_with_http_info = dns_patch_with_http_info - api222_dns_post_with_http_info = dns_post_with_http_info - api223_dns_delete_with_http_info = dns_delete_with_http_info - api223_dns_get_with_http_info = dns_get_with_http_info - api223_dns_patch_with_http_info = dns_patch_with_http_info - api223_dns_post_with_http_info = dns_post_with_http_info - api224_dns_delete_with_http_info = dns_delete_with_http_info - api224_dns_get_with_http_info = dns_get_with_http_info - api224_dns_patch_with_http_info = dns_patch_with_http_info - api224_dns_post_with_http_info = dns_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/dns_api_v_2_17.py b/pypureclient/flashblade/_common/apis/dns_api_v_2_17.py new file mode 100644 index 0000000000..46b6cc0200 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/dns_api_v_2_17.py @@ -0,0 +1,629 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.dns_get_response_v_2_16 import DnsGetResponse +from pypureclient.flashblade._common.models.dns_post_v_2_16 import DnsPost +from pypureclient.flashblade._common.models.dns_response_v_2_16 import DnsResponse +from pypureclient.flashblade._common.models.dns_v_2_16 import Dns + +class DNSApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def dns_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE dns + + Deletes a DNS configuration. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_dns_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/dns', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def dns_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET dns + + Displays the current DNS configurations and their parameters including domain suffix, the list of DNS name server IP addresses, and the list of services that DNS parameters apply to. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DnsGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_dns_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "DnsGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/dns', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def dns_patch_with_http_info( + self, + dns: Dns, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH dns + + Modify a DNS configuration. + + :param dns: (required) + :type dns: Dns + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DnsResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'dns', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_dns_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['dns'] is not None: + _body_params = _params['dns'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "DnsResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/dns', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def dns_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="A comma-separated list of resource names.")], + dns: DnsPost, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST dns + + Creates new DNS configuration with parameters including the domain suffix, the list of DNS name server IP addresses, and the list of services that DNS parameters apply to. + + :param names: A comma-separated list of resource names. (required) + :type names: List[str] + :param dns: (required) + :type dns: DnsPost + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DnsResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'dns', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_dns_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['dns'] is not None: + _body_params = _params['dns'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "DnsResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/dns', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_dns_delete_with_http_info = dns_delete_with_http_info + api217_dns_get_with_http_info = dns_get_with_http_info + api217_dns_patch_with_http_info = dns_patch_with_http_info + api217_dns_post_with_http_info = dns_post_with_http_info + api218_dns_delete_with_http_info = dns_delete_with_http_info + api218_dns_get_with_http_info = dns_get_with_http_info + api218_dns_patch_with_http_info = dns_patch_with_http_info + api218_dns_post_with_http_info = dns_post_with_http_info + api219_dns_delete_with_http_info = dns_delete_with_http_info + api219_dns_get_with_http_info = dns_get_with_http_info + api219_dns_patch_with_http_info = dns_patch_with_http_info + api219_dns_post_with_http_info = dns_post_with_http_info + api220_dns_delete_with_http_info = dns_delete_with_http_info + api220_dns_get_with_http_info = dns_get_with_http_info + api220_dns_patch_with_http_info = dns_patch_with_http_info + api220_dns_post_with_http_info = dns_post_with_http_info + api221_dns_delete_with_http_info = dns_delete_with_http_info + api221_dns_get_with_http_info = dns_get_with_http_info + api221_dns_patch_with_http_info = dns_patch_with_http_info + api221_dns_post_with_http_info = dns_post_with_http_info + api222_dns_delete_with_http_info = dns_delete_with_http_info + api222_dns_get_with_http_info = dns_get_with_http_info + api222_dns_patch_with_http_info = dns_patch_with_http_info + api222_dns_post_with_http_info = dns_post_with_http_info + api223_dns_delete_with_http_info = dns_delete_with_http_info + api223_dns_get_with_http_info = dns_get_with_http_info + api223_dns_patch_with_http_info = dns_patch_with_http_info + api223_dns_post_with_http_info = dns_post_with_http_info + api224_dns_delete_with_http_info = dns_delete_with_http_info + api224_dns_get_with_http_info = dns_get_with_http_info + api224_dns_patch_with_http_info = dns_patch_with_http_info + api224_dns_post_with_http_info = dns_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/drives_api_v_2_14.py b/pypureclient/flashblade/_common/apis/drives_api_v_2_14.py index a5124dc97d..7c13644a5a 100644 --- a/pypureclient/flashblade/_common/apis/drives_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/drives_api_v_2_14.py @@ -216,13 +216,3 @@ def drives_get_with_http_info( api214_drives_get_with_http_info = drives_get_with_http_info api215_drives_get_with_http_info = drives_get_with_http_info api216_drives_get_with_http_info = drives_get_with_http_info - api217_drives_get_with_http_info = drives_get_with_http_info - api218_drives_get_with_http_info = drives_get_with_http_info - api219_drives_get_with_http_info = drives_get_with_http_info - api220_drives_get_with_http_info = drives_get_with_http_info - api221_drives_get_with_http_info = drives_get_with_http_info - api222_drives_get_with_http_info = drives_get_with_http_info - api223_drives_get_with_http_info = drives_get_with_http_info - api224_drives_get_with_http_info = drives_get_with_http_info - api225_drives_get_with_http_info = drives_get_with_http_info - api226_drives_get_with_http_info = drives_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/drives_api_v_2_17.py b/pypureclient/flashblade/_common/apis/drives_api_v_2_17.py new file mode 100644 index 0000000000..8a1dea285b --- /dev/null +++ b/pypureclient/flashblade/_common/apis/drives_api_v_2_17.py @@ -0,0 +1,225 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.drive_get_response_v_2_9 import DriveGetResponse + +class DrivesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def drives_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET drives + + List array drive information. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(DriveGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_drives_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "DriveGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/drives', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_drives_get_with_http_info = drives_get_with_http_info + api218_drives_get_with_http_info = drives_get_with_http_info + api219_drives_get_with_http_info = drives_get_with_http_info + api220_drives_get_with_http_info = drives_get_with_http_info + api221_drives_get_with_http_info = drives_get_with_http_info + api222_drives_get_with_http_info = drives_get_with_http_info + api223_drives_get_with_http_info = drives_get_with_http_info + api224_drives_get_with_http_info = drives_get_with_http_info + api225_drives_get_with_http_info = drives_get_with_http_info + api226_drives_get_with_http_info = drives_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/hardware_api_v_2_16.py b/pypureclient/flashblade/_common/apis/hardware_api_v_2_16.py index b56fde4252..aace9a3c7e 100644 --- a/pypureclient/flashblade/_common/apis/hardware_api_v_2_16.py +++ b/pypureclient/flashblade/_common/apis/hardware_api_v_2_16.py @@ -348,23 +348,3 @@ def hardware_patch_with_http_info( # Method Aliases api216_hardware_get_with_http_info = hardware_get_with_http_info api216_hardware_patch_with_http_info = hardware_patch_with_http_info - api217_hardware_get_with_http_info = hardware_get_with_http_info - api217_hardware_patch_with_http_info = hardware_patch_with_http_info - api218_hardware_get_with_http_info = hardware_get_with_http_info - api218_hardware_patch_with_http_info = hardware_patch_with_http_info - api219_hardware_get_with_http_info = hardware_get_with_http_info - api219_hardware_patch_with_http_info = hardware_patch_with_http_info - api220_hardware_get_with_http_info = hardware_get_with_http_info - api220_hardware_patch_with_http_info = hardware_patch_with_http_info - api221_hardware_get_with_http_info = hardware_get_with_http_info - api221_hardware_patch_with_http_info = hardware_patch_with_http_info - api222_hardware_get_with_http_info = hardware_get_with_http_info - api222_hardware_patch_with_http_info = hardware_patch_with_http_info - api223_hardware_get_with_http_info = hardware_get_with_http_info - api223_hardware_patch_with_http_info = hardware_patch_with_http_info - api224_hardware_get_with_http_info = hardware_get_with_http_info - api224_hardware_patch_with_http_info = hardware_patch_with_http_info - api225_hardware_get_with_http_info = hardware_get_with_http_info - api225_hardware_patch_with_http_info = hardware_patch_with_http_info - api226_hardware_get_with_http_info = hardware_get_with_http_info - api226_hardware_patch_with_http_info = hardware_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/hardware_api_v_2_17.py b/pypureclient/flashblade/_common/apis/hardware_api_v_2_17.py new file mode 100644 index 0000000000..0e394dae0e --- /dev/null +++ b/pypureclient/flashblade/_common/apis/hardware_api_v_2_17.py @@ -0,0 +1,368 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.hardware_get_response_v_2_16 import HardwareGetResponse +from pypureclient.flashblade._common.models.hardware_response_v_2_16 import HardwareResponse +from pypureclient.flashblade._common.models.hardware_v_2_16 import Hardware + +class HardwareApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def hardware_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET hardware + + List hardware slots and bays and the status of installed components. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(HardwareGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_hardware_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "HardwareGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/hardware', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def hardware_patch_with_http_info( + self, + hardware: Hardware, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH hardware + + Controls the visual identification light of the specified hardware component. + + :param hardware: (required) + :type hardware: Hardware + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(HardwareResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'hardware', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_hardware_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['hardware'] is not None: + _body_params = _params['hardware'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "HardwareResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/hardware', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_hardware_get_with_http_info = hardware_get_with_http_info + api217_hardware_patch_with_http_info = hardware_patch_with_http_info + api218_hardware_get_with_http_info = hardware_get_with_http_info + api218_hardware_patch_with_http_info = hardware_patch_with_http_info + api219_hardware_get_with_http_info = hardware_get_with_http_info + api219_hardware_patch_with_http_info = hardware_patch_with_http_info + api220_hardware_get_with_http_info = hardware_get_with_http_info + api220_hardware_patch_with_http_info = hardware_patch_with_http_info + api221_hardware_get_with_http_info = hardware_get_with_http_info + api221_hardware_patch_with_http_info = hardware_patch_with_http_info + api222_hardware_get_with_http_info = hardware_get_with_http_info + api222_hardware_patch_with_http_info = hardware_patch_with_http_info + api223_hardware_get_with_http_info = hardware_get_with_http_info + api223_hardware_patch_with_http_info = hardware_patch_with_http_info + api224_hardware_get_with_http_info = hardware_get_with_http_info + api224_hardware_patch_with_http_info = hardware_patch_with_http_info + api225_hardware_get_with_http_info = hardware_get_with_http_info + api225_hardware_patch_with_http_info = hardware_patch_with_http_info + api226_hardware_get_with_http_info = hardware_get_with_http_info + api226_hardware_patch_with_http_info = hardware_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/hardware_connectors_api_v_2_14.py b/pypureclient/flashblade/_common/apis/hardware_connectors_api_v_2_14.py index a3e065b15d..ec29490882 100644 --- a/pypureclient/flashblade/_common/apis/hardware_connectors_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/hardware_connectors_api_v_2_14.py @@ -537,33 +537,3 @@ def hardware_connectors_performance_get_with_http_info( api216_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info api216_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info api216_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info - api217_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info - api217_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info - api217_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info - api218_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info - api218_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info - api218_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info - api219_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info - api219_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info - api219_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info - api220_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info - api220_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info - api220_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info - api221_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info - api221_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info - api221_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info - api222_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info - api222_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info - api222_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info - api223_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info - api223_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info - api223_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info - api224_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info - api224_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info - api224_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info - api225_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info - api225_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info - api225_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info - api226_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info - api226_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info - api226_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/hardware_connectors_api_v_2_17.py b/pypureclient/flashblade/_common/apis/hardware_connectors_api_v_2_17.py new file mode 100644 index 0000000000..a2aa3814f6 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/hardware_connectors_api_v_2_17.py @@ -0,0 +1,560 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.hardware_connector_get_response_v_2_15 import HardwareConnectorGetResponse +from pypureclient.flashblade._common.models.hardware_connector_performance_get_response_v_2_3 import HardwareConnectorPerformanceGetResponse +from pypureclient.flashblade._common.models.hardware_connector_response_v_2_15 import HardwareConnectorResponse +from pypureclient.flashblade._common.models.hardware_connector_v_2_15 import HardwareConnector + +class HardwareConnectorsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def hardware_connectors_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET hardware-connectors + + The endpoint is deprecated. Use the `/network-interfaces/connectors` endpoint instead. List array connection information. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(HardwareConnectorGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_hardware_connectors_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "HardwareConnectorGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/hardware-connectors', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def hardware_connectors_patch_with_http_info( + self, + hardware_connector: HardwareConnector, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH hardware-connectors + + The endpoint is deprecated. Use the `/network-interfaces/connectors` endpoint instead. Modify array connection information. + + :param hardware_connector: (required) + :type hardware_connector: HardwareConnector + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(HardwareConnectorResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'hardware_connector', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_hardware_connectors_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['hardware_connector'] is not None: + _body_params = _params['hardware_connector'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "HardwareConnectorResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/hardware-connectors', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def hardware_connectors_performance_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + end_time: Annotated[Optional[conint(strict=True, ge=0)], Field(description="When the time window ends (in milliseconds since epoch).")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + resolution: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The desired ms between samples. Available resolutions may depend on data type, `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, `7200000`, and `86400000` are possible values.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + start_time: Annotated[Optional[conint(strict=True, ge=0)], Field(description="When the time window starts (in milliseconds since epoch).")] = None, + total_only: Annotated[Optional[StrictBool], Field(description="Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET hardware-connectors/performance + + The endpoint is deprecated. Use the `/network-interfaces/connectors/performance` endpoint instead. Displays network statistics, historical bandwidth, and error reporting for all specified hardware connectors. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param end_time: When the time window ends (in milliseconds since epoch). + :type end_time: int + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param resolution: The desired ms between samples. Available resolutions may depend on data type, `start_time` and `end_time`. In general `1000`, `30000`, `300000`, `1800000`, `7200000`, and `86400000` are possible values. + :type resolution: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param start_time: When the time window starts (in milliseconds since epoch). + :type start_time: int + :param total_only: Only return the total record for the specified items. The total record will be the total of all items after filtering. The `items` list will be empty. + :type total_only: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(HardwareConnectorPerformanceGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'end_time', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'resolution', + 'sort', + 'start_time', + 'total_only' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_hardware_connectors_performance_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('end_time') is not None: # noqa: E501 + _query_params.append(('end_time', _params['end_time'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('resolution') is not None: # noqa: E501 + _query_params.append(('resolution', _params['resolution'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('start_time') is not None: # noqa: E501 + _query_params.append(('start_time', _params['start_time'])) + + if _params.get('total_only') is not None: # noqa: E501 + _query_params.append(('total_only', _params['total_only'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "HardwareConnectorPerformanceGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/hardware-connectors/performance', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info + api217_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info + api217_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info + api218_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info + api218_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info + api218_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info + api219_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info + api219_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info + api219_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info + api220_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info + api220_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info + api220_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info + api221_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info + api221_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info + api221_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info + api222_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info + api222_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info + api222_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info + api223_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info + api223_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info + api223_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info + api224_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info + api224_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info + api224_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info + api225_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info + api225_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info + api225_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info + api226_hardware_connectors_get_with_http_info = hardware_connectors_get_with_http_info + api226_hardware_connectors_patch_with_http_info = hardware_connectors_patch_with_http_info + api226_hardware_connectors_performance_get_with_http_info = hardware_connectors_performance_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/keytabs_api_v_2_14.py b/pypureclient/flashblade/_common/apis/keytabs_api_v_2_14.py index e3ed379e07..20e6c25fc0 100644 --- a/pypureclient/flashblade/_common/apis/keytabs_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/keytabs_api_v_2_14.py @@ -723,53 +723,3 @@ def keytabs_upload_post_with_http_info( api216_keytabs_get_with_http_info = keytabs_get_with_http_info api216_keytabs_post_with_http_info = keytabs_post_with_http_info api216_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info - api217_keytabs_delete_with_http_info = keytabs_delete_with_http_info - api217_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info - api217_keytabs_get_with_http_info = keytabs_get_with_http_info - api217_keytabs_post_with_http_info = keytabs_post_with_http_info - api217_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info - api218_keytabs_delete_with_http_info = keytabs_delete_with_http_info - api218_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info - api218_keytabs_get_with_http_info = keytabs_get_with_http_info - api218_keytabs_post_with_http_info = keytabs_post_with_http_info - api218_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info - api219_keytabs_delete_with_http_info = keytabs_delete_with_http_info - api219_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info - api219_keytabs_get_with_http_info = keytabs_get_with_http_info - api219_keytabs_post_with_http_info = keytabs_post_with_http_info - api219_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info - api220_keytabs_delete_with_http_info = keytabs_delete_with_http_info - api220_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info - api220_keytabs_get_with_http_info = keytabs_get_with_http_info - api220_keytabs_post_with_http_info = keytabs_post_with_http_info - api220_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info - api221_keytabs_delete_with_http_info = keytabs_delete_with_http_info - api221_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info - api221_keytabs_get_with_http_info = keytabs_get_with_http_info - api221_keytabs_post_with_http_info = keytabs_post_with_http_info - api221_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info - api222_keytabs_delete_with_http_info = keytabs_delete_with_http_info - api222_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info - api222_keytabs_get_with_http_info = keytabs_get_with_http_info - api222_keytabs_post_with_http_info = keytabs_post_with_http_info - api222_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info - api223_keytabs_delete_with_http_info = keytabs_delete_with_http_info - api223_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info - api223_keytabs_get_with_http_info = keytabs_get_with_http_info - api223_keytabs_post_with_http_info = keytabs_post_with_http_info - api223_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info - api224_keytabs_delete_with_http_info = keytabs_delete_with_http_info - api224_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info - api224_keytabs_get_with_http_info = keytabs_get_with_http_info - api224_keytabs_post_with_http_info = keytabs_post_with_http_info - api224_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info - api225_keytabs_delete_with_http_info = keytabs_delete_with_http_info - api225_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info - api225_keytabs_get_with_http_info = keytabs_get_with_http_info - api225_keytabs_post_with_http_info = keytabs_post_with_http_info - api225_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info - api226_keytabs_delete_with_http_info = keytabs_delete_with_http_info - api226_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info - api226_keytabs_get_with_http_info = keytabs_get_with_http_info - api226_keytabs_post_with_http_info = keytabs_post_with_http_info - api226_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/keytabs_api_v_2_17.py b/pypureclient/flashblade/_common/apis/keytabs_api_v_2_17.py new file mode 100644 index 0000000000..89f7f30c4d --- /dev/null +++ b/pypureclient/flashblade/_common/apis/keytabs_api_v_2_17.py @@ -0,0 +1,760 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional, Union + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.keytab_get_response_v_2_16 import KeytabGetResponse +from pypureclient.flashblade._common.models.keytab_post_v_2_0 import KeytabPost +from pypureclient.flashblade._common.models.keytab_response_v_2_16 import KeytabResponse + +class KeytabsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def keytabs_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE keytabs + + Delete a Kerberos keytab file. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_keytabs_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/keytabs', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def keytabs_download_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + keytab_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of keytab IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `keytab_names` query parameter.")] = None, + keytab_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of keytab names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `keytab_ids` query parameter.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET keytabs/download + + Download a Kerberos keytab file. The file can be downloaded in the native binary format or a base64 encoded format. If not specified, defaults to binary. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param keytab_ids: A comma-separated list of keytab IDs. If after filtering, there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with the `keytab_names` query parameter. + :type keytab_ids: List[str] + :param keytab_names: A comma-separated list of keytab names. If there is not at least one resource that matches each of the elements, then an error is returned. This cannot be provided together with `keytab_ids` query parameter. + :type keytab_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(bytearray, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'keytab_ids', + 'keytab_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_keytabs_download_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('keytab_ids') is not None: # noqa: E501 + _query_params.append(('keytab_ids', _params['keytab_ids'])) + _collection_formats['keytab_ids'] = 'csv' + + if _params.get('keytab_names') is not None: # noqa: E501 + _query_params.append(('keytab_names', _params['keytab_names'])) + _collection_formats['keytab_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/octet-stream', 'text/plain']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "bytearray", + } + + return self.api_client.call_api( + f'/api/{self.version}/keytabs/download', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def keytabs_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET keytabs + + List a Kerberos keytab file and its configuration information. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(KeytabGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_keytabs_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "KeytabGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/keytabs', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def keytabs_post_with_http_info( + self, + keytab: KeytabPost, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + name_prefixes: Annotated[Optional[StrictStr], Field(description="The prefix to use for the names of all Kerberos keytab objects that are being created.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST keytabs + + Import a Kerberos keytab file from a Key Distribution Center. + + :param keytab: (required) + :type keytab: KeytabPost + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param name_prefixes: The prefix to use for the names of all Kerberos keytab objects that are being created. + :type name_prefixes: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(KeytabResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'keytab', + 'x_request_id', + 'name_prefixes' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_keytabs_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('name_prefixes') is not None: # noqa: E501 + _query_params.append(('name_prefixes', _params['name_prefixes'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['keytab'] is not None: + _body_params = _params['keytab'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "KeytabResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/keytabs', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def keytabs_upload_post_with_http_info( + self, + keytab_file: Annotated[StrictStr, Field(..., description="The keytab file to upload.")], + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + name_prefixes: Annotated[Optional[StrictStr], Field(description="The prefix to use for the names of all Kerberos keytab objects that are being created.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST keytabs/upload + + Upload a Kerberos keytab file to the array. The file can be uploaded in the native binary format or a base64 encoded format. If not specified, defaults to binary. The procedure to upload a file may vary depending on the type of REST client. + + :param keytab_file: The keytab file to upload. (required) + :type keytab_file: str + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param name_prefixes: The prefix to use for the names of all Kerberos keytab objects that are being created. + :type name_prefixes: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(bytearray, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'keytab_file', + 'x_request_id', + 'name_prefixes' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_keytabs_upload_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('name_prefixes') is not None: # noqa: E501 + _query_params.append(('name_prefixes', _params['name_prefixes'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + if _params['keytab_file'] is not None: + _form_params.append(('keytab_file', _params['keytab_file'])) + + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/octet-stream', 'text/plain']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['multipart/form-data'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "bytearray", + } + + return self.api_client.call_api( + f'/api/{self.version}/keytabs/upload', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_keytabs_delete_with_http_info = keytabs_delete_with_http_info + api217_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info + api217_keytabs_get_with_http_info = keytabs_get_with_http_info + api217_keytabs_post_with_http_info = keytabs_post_with_http_info + api217_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info + api218_keytabs_delete_with_http_info = keytabs_delete_with_http_info + api218_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info + api218_keytabs_get_with_http_info = keytabs_get_with_http_info + api218_keytabs_post_with_http_info = keytabs_post_with_http_info + api218_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info + api219_keytabs_delete_with_http_info = keytabs_delete_with_http_info + api219_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info + api219_keytabs_get_with_http_info = keytabs_get_with_http_info + api219_keytabs_post_with_http_info = keytabs_post_with_http_info + api219_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info + api220_keytabs_delete_with_http_info = keytabs_delete_with_http_info + api220_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info + api220_keytabs_get_with_http_info = keytabs_get_with_http_info + api220_keytabs_post_with_http_info = keytabs_post_with_http_info + api220_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info + api221_keytabs_delete_with_http_info = keytabs_delete_with_http_info + api221_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info + api221_keytabs_get_with_http_info = keytabs_get_with_http_info + api221_keytabs_post_with_http_info = keytabs_post_with_http_info + api221_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info + api222_keytabs_delete_with_http_info = keytabs_delete_with_http_info + api222_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info + api222_keytabs_get_with_http_info = keytabs_get_with_http_info + api222_keytabs_post_with_http_info = keytabs_post_with_http_info + api222_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info + api223_keytabs_delete_with_http_info = keytabs_delete_with_http_info + api223_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info + api223_keytabs_get_with_http_info = keytabs_get_with_http_info + api223_keytabs_post_with_http_info = keytabs_post_with_http_info + api223_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info + api224_keytabs_delete_with_http_info = keytabs_delete_with_http_info + api224_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info + api224_keytabs_get_with_http_info = keytabs_get_with_http_info + api224_keytabs_post_with_http_info = keytabs_post_with_http_info + api224_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info + api225_keytabs_delete_with_http_info = keytabs_delete_with_http_info + api225_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info + api225_keytabs_get_with_http_info = keytabs_get_with_http_info + api225_keytabs_post_with_http_info = keytabs_post_with_http_info + api225_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info + api226_keytabs_delete_with_http_info = keytabs_delete_with_http_info + api226_keytabs_download_get_with_http_info = keytabs_download_get_with_http_info + api226_keytabs_get_with_http_info = keytabs_get_with_http_info + api226_keytabs_post_with_http_info = keytabs_post_with_http_info + api226_keytabs_upload_post_with_http_info = keytabs_upload_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/kmip_api_v_2_14.py b/pypureclient/flashblade/_common/apis/kmip_api_v_2_14.py index 828e6b8d86..683bfeaf81 100644 --- a/pypureclient/flashblade/_common/apis/kmip_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/kmip_api_v_2_14.py @@ -733,53 +733,3 @@ def kmip_test_get_with_http_info( api216_kmip_patch_with_http_info = kmip_patch_with_http_info api216_kmip_post_with_http_info = kmip_post_with_http_info api216_kmip_test_get_with_http_info = kmip_test_get_with_http_info - api217_kmip_delete_with_http_info = kmip_delete_with_http_info - api217_kmip_get_with_http_info = kmip_get_with_http_info - api217_kmip_patch_with_http_info = kmip_patch_with_http_info - api217_kmip_post_with_http_info = kmip_post_with_http_info - api217_kmip_test_get_with_http_info = kmip_test_get_with_http_info - api218_kmip_delete_with_http_info = kmip_delete_with_http_info - api218_kmip_get_with_http_info = kmip_get_with_http_info - api218_kmip_patch_with_http_info = kmip_patch_with_http_info - api218_kmip_post_with_http_info = kmip_post_with_http_info - api218_kmip_test_get_with_http_info = kmip_test_get_with_http_info - api219_kmip_delete_with_http_info = kmip_delete_with_http_info - api219_kmip_get_with_http_info = kmip_get_with_http_info - api219_kmip_patch_with_http_info = kmip_patch_with_http_info - api219_kmip_post_with_http_info = kmip_post_with_http_info - api219_kmip_test_get_with_http_info = kmip_test_get_with_http_info - api220_kmip_delete_with_http_info = kmip_delete_with_http_info - api220_kmip_get_with_http_info = kmip_get_with_http_info - api220_kmip_patch_with_http_info = kmip_patch_with_http_info - api220_kmip_post_with_http_info = kmip_post_with_http_info - api220_kmip_test_get_with_http_info = kmip_test_get_with_http_info - api221_kmip_delete_with_http_info = kmip_delete_with_http_info - api221_kmip_get_with_http_info = kmip_get_with_http_info - api221_kmip_patch_with_http_info = kmip_patch_with_http_info - api221_kmip_post_with_http_info = kmip_post_with_http_info - api221_kmip_test_get_with_http_info = kmip_test_get_with_http_info - api222_kmip_delete_with_http_info = kmip_delete_with_http_info - api222_kmip_get_with_http_info = kmip_get_with_http_info - api222_kmip_patch_with_http_info = kmip_patch_with_http_info - api222_kmip_post_with_http_info = kmip_post_with_http_info - api222_kmip_test_get_with_http_info = kmip_test_get_with_http_info - api223_kmip_delete_with_http_info = kmip_delete_with_http_info - api223_kmip_get_with_http_info = kmip_get_with_http_info - api223_kmip_patch_with_http_info = kmip_patch_with_http_info - api223_kmip_post_with_http_info = kmip_post_with_http_info - api223_kmip_test_get_with_http_info = kmip_test_get_with_http_info - api224_kmip_delete_with_http_info = kmip_delete_with_http_info - api224_kmip_get_with_http_info = kmip_get_with_http_info - api224_kmip_patch_with_http_info = kmip_patch_with_http_info - api224_kmip_post_with_http_info = kmip_post_with_http_info - api224_kmip_test_get_with_http_info = kmip_test_get_with_http_info - api225_kmip_delete_with_http_info = kmip_delete_with_http_info - api225_kmip_get_with_http_info = kmip_get_with_http_info - api225_kmip_patch_with_http_info = kmip_patch_with_http_info - api225_kmip_post_with_http_info = kmip_post_with_http_info - api225_kmip_test_get_with_http_info = kmip_test_get_with_http_info - api226_kmip_delete_with_http_info = kmip_delete_with_http_info - api226_kmip_get_with_http_info = kmip_get_with_http_info - api226_kmip_patch_with_http_info = kmip_patch_with_http_info - api226_kmip_post_with_http_info = kmip_post_with_http_info - api226_kmip_test_get_with_http_info = kmip_test_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/kmip_api_v_2_17.py b/pypureclient/flashblade/_common/apis/kmip_api_v_2_17.py new file mode 100644 index 0000000000..5d1fc95a24 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/kmip_api_v_2_17.py @@ -0,0 +1,770 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.kmip_server_response_v_2_1 import KmipServerResponse +from pypureclient.flashblade._common.models.kmip_server_v_2_1 import KmipServer +from pypureclient.flashblade._common.models.test_result_response_v_2_0 import TestResultResponse + +class KMIPApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def kmip_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete a KMIP server configuration + + Deletes a KMIP server configuration. A server can only be deleted when not in use by the array. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_kmip_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/kmip', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def kmip_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List KMIP server configurations + + Displays a list of KMIP server configurations. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(KmipServerResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_kmip_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "KmipServerResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/kmip', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def kmip_patch_with_http_info( + self, + kmip_server: KmipServer, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify a KMIP server configuration + + Modifies KMIP server properties - URI, certificate, certificate group. + + :param kmip_server: (required) + :type kmip_server: KmipServer + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(KmipServerResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'kmip_server', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_kmip_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['kmip_server'] is not None: + _body_params = _params['kmip_server'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "KmipServerResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/kmip', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def kmip_post_with_http_info( + self, + kmip_server: KmipServer, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a KMIP server configuration + + Creates a KMIP server configuration. + + :param kmip_server: (required) + :type kmip_server: KmipServer + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(KmipServerResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'kmip_server', + 'x_request_id', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_kmip_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['kmip_server'] is not None: + _body_params = _params['kmip_server'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "KmipServerResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/kmip', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def kmip_test_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Displays KMIP server test results + + Displays a detailed result of of KMIP server test. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TestResultResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_kmip_test_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "TestResultResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/kmip/test', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_kmip_delete_with_http_info = kmip_delete_with_http_info + api217_kmip_get_with_http_info = kmip_get_with_http_info + api217_kmip_patch_with_http_info = kmip_patch_with_http_info + api217_kmip_post_with_http_info = kmip_post_with_http_info + api217_kmip_test_get_with_http_info = kmip_test_get_with_http_info + api218_kmip_delete_with_http_info = kmip_delete_with_http_info + api218_kmip_get_with_http_info = kmip_get_with_http_info + api218_kmip_patch_with_http_info = kmip_patch_with_http_info + api218_kmip_post_with_http_info = kmip_post_with_http_info + api218_kmip_test_get_with_http_info = kmip_test_get_with_http_info + api219_kmip_delete_with_http_info = kmip_delete_with_http_info + api219_kmip_get_with_http_info = kmip_get_with_http_info + api219_kmip_patch_with_http_info = kmip_patch_with_http_info + api219_kmip_post_with_http_info = kmip_post_with_http_info + api219_kmip_test_get_with_http_info = kmip_test_get_with_http_info + api220_kmip_delete_with_http_info = kmip_delete_with_http_info + api220_kmip_get_with_http_info = kmip_get_with_http_info + api220_kmip_patch_with_http_info = kmip_patch_with_http_info + api220_kmip_post_with_http_info = kmip_post_with_http_info + api220_kmip_test_get_with_http_info = kmip_test_get_with_http_info + api221_kmip_delete_with_http_info = kmip_delete_with_http_info + api221_kmip_get_with_http_info = kmip_get_with_http_info + api221_kmip_patch_with_http_info = kmip_patch_with_http_info + api221_kmip_post_with_http_info = kmip_post_with_http_info + api221_kmip_test_get_with_http_info = kmip_test_get_with_http_info + api222_kmip_delete_with_http_info = kmip_delete_with_http_info + api222_kmip_get_with_http_info = kmip_get_with_http_info + api222_kmip_patch_with_http_info = kmip_patch_with_http_info + api222_kmip_post_with_http_info = kmip_post_with_http_info + api222_kmip_test_get_with_http_info = kmip_test_get_with_http_info + api223_kmip_delete_with_http_info = kmip_delete_with_http_info + api223_kmip_get_with_http_info = kmip_get_with_http_info + api223_kmip_patch_with_http_info = kmip_patch_with_http_info + api223_kmip_post_with_http_info = kmip_post_with_http_info + api223_kmip_test_get_with_http_info = kmip_test_get_with_http_info + api224_kmip_delete_with_http_info = kmip_delete_with_http_info + api224_kmip_get_with_http_info = kmip_get_with_http_info + api224_kmip_patch_with_http_info = kmip_patch_with_http_info + api224_kmip_post_with_http_info = kmip_post_with_http_info + api224_kmip_test_get_with_http_info = kmip_test_get_with_http_info + api225_kmip_delete_with_http_info = kmip_delete_with_http_info + api225_kmip_get_with_http_info = kmip_get_with_http_info + api225_kmip_patch_with_http_info = kmip_patch_with_http_info + api225_kmip_post_with_http_info = kmip_post_with_http_info + api225_kmip_test_get_with_http_info = kmip_test_get_with_http_info + api226_kmip_delete_with_http_info = kmip_delete_with_http_info + api226_kmip_get_with_http_info = kmip_get_with_http_info + api226_kmip_patch_with_http_info = kmip_patch_with_http_info + api226_kmip_post_with_http_info = kmip_post_with_http_info + api226_kmip_test_get_with_http_info = kmip_test_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/link_aggregation_groups_api_v_2_14.py b/pypureclient/flashblade/_common/apis/link_aggregation_groups_api_v_2_14.py index f036a316c8..bc2dd2836b 100644 --- a/pypureclient/flashblade/_common/apis/link_aggregation_groups_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/link_aggregation_groups_api_v_2_14.py @@ -607,11 +607,3 @@ def link_aggregation_groups_post_with_http_info( api216_link_aggregation_groups_get_with_http_info = link_aggregation_groups_get_with_http_info api216_link_aggregation_groups_patch_with_http_info = link_aggregation_groups_patch_with_http_info api216_link_aggregation_groups_post_with_http_info = link_aggregation_groups_post_with_http_info - api217_link_aggregation_groups_delete_with_http_info = link_aggregation_groups_delete_with_http_info - api217_link_aggregation_groups_get_with_http_info = link_aggregation_groups_get_with_http_info - api217_link_aggregation_groups_patch_with_http_info = link_aggregation_groups_patch_with_http_info - api217_link_aggregation_groups_post_with_http_info = link_aggregation_groups_post_with_http_info - api218_link_aggregation_groups_delete_with_http_info = link_aggregation_groups_delete_with_http_info - api218_link_aggregation_groups_get_with_http_info = link_aggregation_groups_get_with_http_info - api218_link_aggregation_groups_patch_with_http_info = link_aggregation_groups_patch_with_http_info - api218_link_aggregation_groups_post_with_http_info = link_aggregation_groups_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/link_aggregation_groups_api_v_2_17.py b/pypureclient/flashblade/_common/apis/link_aggregation_groups_api_v_2_17.py new file mode 100644 index 0000000000..3488adb2b5 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/link_aggregation_groups_api_v_2_17.py @@ -0,0 +1,605 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.link_aggregation_group_get_response_v_2_0 import LinkAggregationGroupGetResponse +from pypureclient.flashblade._common.models.link_aggregation_group_patch_v_2_0 import LinkAggregationGroupPatch +from pypureclient.flashblade._common.models.link_aggregation_group_response_v_2_0 import LinkAggregationGroupResponse +from pypureclient.flashblade._common.models.link_aggregation_group_v_2_0 import LinkAggregationGroup + +class LinkAggregationGroupsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def link_aggregation_groups_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE link-aggregation-groups + + Remove a link aggregation group to unbind the ports. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_link_aggregation_groups_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/link-aggregation-groups', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def link_aggregation_groups_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET link-aggregation-groups + + List the status and attributes of the Ethernet ports in the configured link aggregation groups. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LinkAggregationGroupGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_link_aggregation_groups_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "LinkAggregationGroupGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/link-aggregation-groups', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def link_aggregation_groups_patch_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + link_aggregation_group: Optional[LinkAggregationGroupPatch] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH link-aggregation-groups + + Modify link aggregation groups by adding and removing Ethernet ports. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param link_aggregation_group: + :type link_aggregation_group: LinkAggregationGroupPatch + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LinkAggregationGroupResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names', + 'link_aggregation_group' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_link_aggregation_groups_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['link_aggregation_group'] is not None: + _body_params = _params['link_aggregation_group'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "LinkAggregationGroupResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/link-aggregation-groups', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def link_aggregation_groups_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="A comma-separated list of resource names.")], + link_aggregation_group: LinkAggregationGroup, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST link-aggregation-groups + + Create a link aggregation group of Ethernet ports on the array. + + :param names: A comma-separated list of resource names. (required) + :type names: List[str] + :param link_aggregation_group: (required) + :type link_aggregation_group: LinkAggregationGroup + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LinkAggregationGroupResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'link_aggregation_group', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_link_aggregation_groups_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['link_aggregation_group'] is not None: + _body_params = _params['link_aggregation_group'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "LinkAggregationGroupResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/link-aggregation-groups', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_link_aggregation_groups_delete_with_http_info = link_aggregation_groups_delete_with_http_info + api217_link_aggregation_groups_get_with_http_info = link_aggregation_groups_get_with_http_info + api217_link_aggregation_groups_patch_with_http_info = link_aggregation_groups_patch_with_http_info + api217_link_aggregation_groups_post_with_http_info = link_aggregation_groups_post_with_http_info + api218_link_aggregation_groups_delete_with_http_info = link_aggregation_groups_delete_with_http_info + api218_link_aggregation_groups_get_with_http_info = link_aggregation_groups_get_with_http_info + api218_link_aggregation_groups_patch_with_http_info = link_aggregation_groups_patch_with_http_info + api218_link_aggregation_groups_post_with_http_info = link_aggregation_groups_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/logs_api_v_2_14.py b/pypureclient/flashblade/_common/apis/logs_api_v_2_14.py index 012d080ad7..3e010fb254 100644 --- a/pypureclient/flashblade/_common/apis/logs_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/logs_api_v_2_14.py @@ -580,43 +580,3 @@ def logs_get_with_http_info( api216_logs_async_get_with_http_info = logs_async_get_with_http_info api216_logs_async_patch_with_http_info = logs_async_patch_with_http_info api216_logs_get_with_http_info = logs_get_with_http_info - api217_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info - api217_logs_async_get_with_http_info = logs_async_get_with_http_info - api217_logs_async_patch_with_http_info = logs_async_patch_with_http_info - api217_logs_get_with_http_info = logs_get_with_http_info - api218_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info - api218_logs_async_get_with_http_info = logs_async_get_with_http_info - api218_logs_async_patch_with_http_info = logs_async_patch_with_http_info - api218_logs_get_with_http_info = logs_get_with_http_info - api219_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info - api219_logs_async_get_with_http_info = logs_async_get_with_http_info - api219_logs_async_patch_with_http_info = logs_async_patch_with_http_info - api219_logs_get_with_http_info = logs_get_with_http_info - api220_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info - api220_logs_async_get_with_http_info = logs_async_get_with_http_info - api220_logs_async_patch_with_http_info = logs_async_patch_with_http_info - api220_logs_get_with_http_info = logs_get_with_http_info - api221_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info - api221_logs_async_get_with_http_info = logs_async_get_with_http_info - api221_logs_async_patch_with_http_info = logs_async_patch_with_http_info - api221_logs_get_with_http_info = logs_get_with_http_info - api222_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info - api222_logs_async_get_with_http_info = logs_async_get_with_http_info - api222_logs_async_patch_with_http_info = logs_async_patch_with_http_info - api222_logs_get_with_http_info = logs_get_with_http_info - api223_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info - api223_logs_async_get_with_http_info = logs_async_get_with_http_info - api223_logs_async_patch_with_http_info = logs_async_patch_with_http_info - api223_logs_get_with_http_info = logs_get_with_http_info - api224_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info - api224_logs_async_get_with_http_info = logs_async_get_with_http_info - api224_logs_async_patch_with_http_info = logs_async_patch_with_http_info - api224_logs_get_with_http_info = logs_get_with_http_info - api225_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info - api225_logs_async_get_with_http_info = logs_async_get_with_http_info - api225_logs_async_patch_with_http_info = logs_async_patch_with_http_info - api225_logs_get_with_http_info = logs_get_with_http_info - api226_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info - api226_logs_async_get_with_http_info = logs_async_get_with_http_info - api226_logs_async_patch_with_http_info = logs_async_patch_with_http_info - api226_logs_get_with_http_info = logs_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/logs_api_v_2_17.py b/pypureclient/flashblade/_common/apis/logs_api_v_2_17.py new file mode 100644 index 0000000000..630c5e11f1 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/logs_api_v_2_17.py @@ -0,0 +1,610 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional, Union + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.logs_async_get_response_v_2_4 import LogsAsyncGetResponse +from pypureclient.flashblade._common.models.logs_async_response_v_2_4 import LogsAsyncResponse +from pypureclient.flashblade._common.models.logs_async_v_2_4 import LogsAsync + +class LogsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def logs_async_download_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET logs-async/download + + Download the files which contain a history of log events from the array to provide to Pure Technical Services for analysis. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(bytearray, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_logs_async_download_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/octet-stream', 'text/plain', 'application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "bytearray", + } + + return self.api_client.call_api( + f'/api/{self.version}/logs-async/download', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def logs_async_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET logs-async + + List the attributes and status of preparation for a history of log events from the array to provide to Pure Technical Services for analysis. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LogsAsyncGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_logs_async_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "LogsAsyncGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/logs-async', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def logs_async_patch_with_http_info( + self, + logs_async: LogsAsync, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH logs-async + + Start the preparation for a history of log events from the array to provide to Pure Technical Services for analysis. + + :param logs_async: (required) + :type logs_async: LogsAsync + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(LogsAsyncResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'logs_async', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_logs_async_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['logs_async'] is not None: + _body_params = _params['logs_async'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "LogsAsyncResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/logs-async', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def logs_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + end_time: Annotated[Optional[conint(strict=True, ge=0)], Field(description="When the time window ends (in milliseconds since epoch).")] = None, + start_time: Annotated[Optional[conint(strict=True, ge=0)], Field(description="When the time window starts (in milliseconds since epoch).")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET logs + + Download a history of log events from the array to provide to Pure Technical Services for analysis. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param end_time: When the time window ends (in milliseconds since epoch). + :type end_time: int + :param start_time: When the time window starts (in milliseconds since epoch). + :type start_time: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(bytearray, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'end_time', + 'start_time' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_logs_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('end_time') is not None: # noqa: E501 + _query_params.append(('end_time', _params['end_time'])) + + if _params.get('start_time') is not None: # noqa: E501 + _query_params.append(('start_time', _params['start_time'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/octet-stream', 'text/plain', 'application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "bytearray", + } + + return self.api_client.call_api( + f'/api/{self.version}/logs', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info + api217_logs_async_get_with_http_info = logs_async_get_with_http_info + api217_logs_async_patch_with_http_info = logs_async_patch_with_http_info + api217_logs_get_with_http_info = logs_get_with_http_info + api218_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info + api218_logs_async_get_with_http_info = logs_async_get_with_http_info + api218_logs_async_patch_with_http_info = logs_async_patch_with_http_info + api218_logs_get_with_http_info = logs_get_with_http_info + api219_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info + api219_logs_async_get_with_http_info = logs_async_get_with_http_info + api219_logs_async_patch_with_http_info = logs_async_patch_with_http_info + api219_logs_get_with_http_info = logs_get_with_http_info + api220_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info + api220_logs_async_get_with_http_info = logs_async_get_with_http_info + api220_logs_async_patch_with_http_info = logs_async_patch_with_http_info + api220_logs_get_with_http_info = logs_get_with_http_info + api221_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info + api221_logs_async_get_with_http_info = logs_async_get_with_http_info + api221_logs_async_patch_with_http_info = logs_async_patch_with_http_info + api221_logs_get_with_http_info = logs_get_with_http_info + api222_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info + api222_logs_async_get_with_http_info = logs_async_get_with_http_info + api222_logs_async_patch_with_http_info = logs_async_patch_with_http_info + api222_logs_get_with_http_info = logs_get_with_http_info + api223_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info + api223_logs_async_get_with_http_info = logs_async_get_with_http_info + api223_logs_async_patch_with_http_info = logs_async_patch_with_http_info + api223_logs_get_with_http_info = logs_get_with_http_info + api224_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info + api224_logs_async_get_with_http_info = logs_async_get_with_http_info + api224_logs_async_patch_with_http_info = logs_async_patch_with_http_info + api224_logs_get_with_http_info = logs_get_with_http_info + api225_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info + api225_logs_async_get_with_http_info = logs_async_get_with_http_info + api225_logs_async_patch_with_http_info = logs_async_patch_with_http_info + api225_logs_get_with_http_info = logs_get_with_http_info + api226_logs_async_download_get_with_http_info = logs_async_download_get_with_http_info + api226_logs_async_get_with_http_info = logs_async_get_with_http_info + api226_logs_async_patch_with_http_info = logs_async_patch_with_http_info + api226_logs_get_with_http_info = logs_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/maintenance_windows_api_v_2_16.py b/pypureclient/flashblade/_common/apis/maintenance_windows_api_v_2_16.py index f158b32e0b..933de31928 100644 --- a/pypureclient/flashblade/_common/apis/maintenance_windows_api_v_2_16.py +++ b/pypureclient/flashblade/_common/apis/maintenance_windows_api_v_2_16.py @@ -459,33 +459,3 @@ def maintenance_windows_post_with_http_info( api216_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info api216_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info api216_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info - api217_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info - api217_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info - api217_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info - api218_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info - api218_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info - api218_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info - api219_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info - api219_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info - api219_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info - api220_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info - api220_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info - api220_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info - api221_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info - api221_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info - api221_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info - api222_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info - api222_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info - api222_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info - api223_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info - api223_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info - api223_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info - api224_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info - api224_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info - api224_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info - api225_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info - api225_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info - api225_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info - api226_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info - api226_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info - api226_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/maintenance_windows_api_v_2_17.py b/pypureclient/flashblade/_common/apis/maintenance_windows_api_v_2_17.py new file mode 100644 index 0000000000..9655b31d0a --- /dev/null +++ b/pypureclient/flashblade/_common/apis/maintenance_windows_api_v_2_17.py @@ -0,0 +1,488 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.maintenance_window_post_v_2_16 import MaintenanceWindowPost +from pypureclient.flashblade._common.models.maintenance_windows_get_response_v_2_16 import MaintenanceWindowsGetResponse +from pypureclient.flashblade._common.models.maintenance_windows_response_v_2_16 import MaintenanceWindowsResponse + +class MaintenanceWindowsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def maintenance_windows_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete maintenance window + + Deletes an active maintenance window before its scheduled end (`expire`) time. The `names` parameter is required and must be set to `array`. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_maintenance_windows_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/maintenance-windows', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def maintenance_windows_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List maintenance window details + + Displays maintenance window details, including start time, end time, and maintenance type. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MaintenanceWindowsGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_maintenance_windows_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "MaintenanceWindowsGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/maintenance-windows', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def maintenance_windows_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="A comma-separated list of resource names.")], + maintenance_window: MaintenanceWindowPost, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a maintenance window + + Creates a maintenance window that suppresses alerts for a specified period of time. A maintenance window can be manually closed at any time. The `names` and `timeout` parameters are required. Set the `names` parameter to `array`. + + :param names: A comma-separated list of resource names. (required) + :type names: List[str] + :param maintenance_window: (required) + :type maintenance_window: MaintenanceWindowPost + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(MaintenanceWindowsResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'maintenance_window', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_maintenance_windows_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['maintenance_window'] is not None: + _body_params = _params['maintenance_window'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "MaintenanceWindowsResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/maintenance-windows', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info + api217_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info + api217_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info + api218_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info + api218_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info + api218_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info + api219_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info + api219_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info + api219_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info + api220_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info + api220_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info + api220_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info + api221_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info + api221_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info + api221_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info + api222_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info + api222_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info + api222_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info + api223_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info + api223_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info + api223_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info + api224_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info + api224_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info + api224_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info + api225_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info + api225_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info + api225_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info + api226_maintenance_windows_delete_with_http_info = maintenance_windows_delete_with_http_info + api226_maintenance_windows_get_with_http_info = maintenance_windows_get_with_http_info + api226_maintenance_windows_post_with_http_info = maintenance_windows_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/policies_network_access_api_v_2_14.py b/pypureclient/flashblade/_common/apis/policies_network_access_api_v_2_14.py index f0773cfc70..b16b899547 100644 --- a/pypureclient/flashblade/_common/apis/policies_network_access_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/policies_network_access_api_v_2_14.py @@ -1178,73 +1178,3 @@ def network_access_policies_rules_post_with_http_info( api216_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info api216_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info api216_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info - api217_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info - api217_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info - api217_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info - api217_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info - api217_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info - api217_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info - api217_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info - api218_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info - api218_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info - api218_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info - api218_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info - api218_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info - api218_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info - api218_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info - api219_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info - api219_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info - api219_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info - api219_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info - api219_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info - api219_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info - api219_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info - api220_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info - api220_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info - api220_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info - api220_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info - api220_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info - api220_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info - api220_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info - api221_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info - api221_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info - api221_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info - api221_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info - api221_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info - api221_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info - api221_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info - api222_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info - api222_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info - api222_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info - api222_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info - api222_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info - api222_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info - api222_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info - api223_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info - api223_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info - api223_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info - api223_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info - api223_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info - api223_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info - api223_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info - api224_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info - api224_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info - api224_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info - api224_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info - api224_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info - api224_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info - api224_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info - api225_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info - api225_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info - api225_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info - api225_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info - api225_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info - api225_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info - api225_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info - api226_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info - api226_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info - api226_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info - api226_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info - api226_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info - api226_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info - api226_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/policies_network_access_api_v_2_17.py b/pypureclient/flashblade/_common/apis/policies_network_access_api_v_2_17.py new file mode 100644 index 0000000000..5a7100e9a1 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/policies_network_access_api_v_2_17.py @@ -0,0 +1,1229 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.network_access_policy_get_response_v_2_16 import NetworkAccessPolicyGetResponse +from pypureclient.flashblade._common.models.network_access_policy_response_v_2_16 import NetworkAccessPolicyResponse +from pypureclient.flashblade._common.models.network_access_policy_rule_get_response_v_2_13 import NetworkAccessPolicyRuleGetResponse +from pypureclient.flashblade._common.models.network_access_policy_rule_post_v_2_13 import NetworkAccessPolicyRulePost +from pypureclient.flashblade._common.models.network_access_policy_rule_response_v_2_13 import NetworkAccessPolicyRuleResponse +from pypureclient.flashblade._common.models.network_access_policy_rule_v_2_13 import NetworkAccessPolicyRule +from pypureclient.flashblade._common.models.network_access_policy_v_2_16 import NetworkAccessPolicy +from pypureclient.flashblade._common.models.policy_member_get_response_v_2_0 import PolicyMemberGetResponse + +class PoliciesNetworkAccessApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def network_access_policies_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET network-access-policies + + Displays a list of network access policies. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NetworkAccessPolicyGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_network_access_policies_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "NetworkAccessPolicyGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/network-access-policies', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def network_access_policies_members_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member names.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET network-access-policies/members + + List network access policies mapped to different configurations on the array. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :type member_ids: List[str] + :param member_names: A comma-separated list of member names. + :type member_names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_network_access_policies_members_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/network-access-policies/members', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def network_access_policies_patch_with_http_info( + self, + policy: NetworkAccessPolicy, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH network-access-policies + + Modify an existing network access policy's attributes. + + :param policy: (required) + :type policy: NetworkAccessPolicy + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :type versions: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NetworkAccessPolicyResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'policy', + 'x_request_id', + 'ids', + 'names', + 'versions' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_network_access_policies_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('versions') is not None: # noqa: E501 + _query_params.append(('versions', _params['versions'])) + _collection_formats['versions'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['policy'] is not None: + _body_params = _params['policy'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "NetworkAccessPolicyResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/network-access-policies', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def network_access_policies_rules_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE network-access-policies/rules + + Delete one or more network access policy rules. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :type versions: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names', + 'versions' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_network_access_policies_rules_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('versions') is not None: # noqa: E501 + _query_params.append(('versions', _params['versions'])) + _collection_formats['versions'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/network-access-policies/rules', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def network_access_policies_rules_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET network-access-policies/rules + + Displays a list of network access policy rules. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NetworkAccessPolicyRuleGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_network_access_policies_rules_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "NetworkAccessPolicyRuleGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/network-access-policies/rules', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def network_access_policies_rules_patch_with_http_info( + self, + rule: NetworkAccessPolicyRule, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + before_rule_id: Annotated[Optional[StrictStr], Field(description="The id of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_name` query parameter.")] = None, + before_rule_name: Annotated[Optional[StrictStr], Field(description="The name of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_id` query parameter.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH network-access-policies/rules + + Modify an existing network access policy rule. + + :param rule: (required) + :type rule: NetworkAccessPolicyRule + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param before_rule_id: The id of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_name` query parameter. + :type before_rule_id: str + :param before_rule_name: The name of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_id` query parameter. + :type before_rule_name: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :type versions: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NetworkAccessPolicyRuleResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'rule', + 'x_request_id', + 'before_rule_id', + 'before_rule_name', + 'ids', + 'names', + 'versions' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_network_access_policies_rules_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('before_rule_id') is not None: # noqa: E501 + _query_params.append(('before_rule_id', _params['before_rule_id'])) + + if _params.get('before_rule_name') is not None: # noqa: E501 + _query_params.append(('before_rule_name', _params['before_rule_name'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('versions') is not None: # noqa: E501 + _query_params.append(('versions', _params['versions'])) + _collection_formats['versions'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['rule'] is not None: + _body_params = _params['rule'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "NetworkAccessPolicyRuleResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/network-access-policies/rules', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def network_access_policies_rules_post_with_http_info( + self, + rule: NetworkAccessPolicyRulePost, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + before_rule_id: Annotated[Optional[StrictStr], Field(description="The id of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_name` query parameter.")] = None, + before_rule_name: Annotated[Optional[StrictStr], Field(description="The name of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_id` query parameter.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST network-access-policies/rules + + Create a new network access policy rule. Either `policy_ids` or `policy_names` parameter is required. + + :param rule: (required) + :type rule: NetworkAccessPolicyRulePost + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param before_rule_id: The id of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_name` query parameter. + :type before_rule_id: str + :param before_rule_name: The name of the rule to insert or move a rule before. This cannot be provided together with the `before_rule_id` query parameter. + :type before_rule_name: str + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param versions: A comma-separated list of versions. This is an optional query param used for concurrency control. The ordering should match the names or ids query param. This will fail with a 412 Precondition failed if the resource was changed and the current version of the resource doesn't match the value in the query param. + :type versions: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(NetworkAccessPolicyRuleResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'rule', + 'x_request_id', + 'before_rule_id', + 'before_rule_name', + 'policy_ids', + 'policy_names', + 'versions' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_network_access_policies_rules_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('before_rule_id') is not None: # noqa: E501 + _query_params.append(('before_rule_id', _params['before_rule_id'])) + + if _params.get('before_rule_name') is not None: # noqa: E501 + _query_params.append(('before_rule_name', _params['before_rule_name'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('versions') is not None: # noqa: E501 + _query_params.append(('versions', _params['versions'])) + _collection_formats['versions'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['rule'] is not None: + _body_params = _params['rule'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "NetworkAccessPolicyRuleResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/network-access-policies/rules', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info + api217_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info + api217_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info + api217_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info + api217_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info + api217_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info + api217_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info + api218_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info + api218_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info + api218_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info + api218_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info + api218_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info + api218_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info + api218_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info + api219_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info + api219_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info + api219_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info + api219_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info + api219_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info + api219_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info + api219_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info + api220_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info + api220_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info + api220_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info + api220_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info + api220_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info + api220_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info + api220_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info + api221_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info + api221_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info + api221_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info + api221_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info + api221_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info + api221_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info + api221_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info + api222_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info + api222_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info + api222_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info + api222_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info + api222_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info + api222_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info + api222_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info + api223_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info + api223_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info + api223_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info + api223_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info + api223_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info + api223_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info + api223_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info + api224_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info + api224_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info + api224_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info + api224_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info + api224_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info + api224_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info + api224_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info + api225_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info + api225_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info + api225_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info + api225_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info + api225_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info + api225_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info + api225_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info + api226_network_access_policies_get_with_http_info = network_access_policies_get_with_http_info + api226_network_access_policies_members_get_with_http_info = network_access_policies_members_get_with_http_info + api226_network_access_policies_patch_with_http_info = network_access_policies_patch_with_http_info + api226_network_access_policies_rules_delete_with_http_info = network_access_policies_rules_delete_with_http_info + api226_network_access_policies_rules_get_with_http_info = network_access_policies_rules_get_with_http_info + api226_network_access_policies_rules_patch_with_http_info = network_access_policies_rules_patch_with_http_info + api226_network_access_policies_rules_post_with_http_info = network_access_policies_rules_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/policies_password_api_v_2_16.py b/pypureclient/flashblade/_common/apis/policies_password_api_v_2_16.py index b1b9e2c913..e69637d264 100644 --- a/pypureclient/flashblade/_common/apis/policies_password_api_v_2_16.py +++ b/pypureclient/flashblade/_common/apis/policies_password_api_v_2_16.py @@ -348,23 +348,3 @@ def password_policies_patch_with_http_info( # Method Aliases api216_password_policies_get_with_http_info = password_policies_get_with_http_info api216_password_policies_patch_with_http_info = password_policies_patch_with_http_info - api217_password_policies_get_with_http_info = password_policies_get_with_http_info - api217_password_policies_patch_with_http_info = password_policies_patch_with_http_info - api218_password_policies_get_with_http_info = password_policies_get_with_http_info - api218_password_policies_patch_with_http_info = password_policies_patch_with_http_info - api219_password_policies_get_with_http_info = password_policies_get_with_http_info - api219_password_policies_patch_with_http_info = password_policies_patch_with_http_info - api220_password_policies_get_with_http_info = password_policies_get_with_http_info - api220_password_policies_patch_with_http_info = password_policies_patch_with_http_info - api221_password_policies_get_with_http_info = password_policies_get_with_http_info - api221_password_policies_patch_with_http_info = password_policies_patch_with_http_info - api222_password_policies_get_with_http_info = password_policies_get_with_http_info - api222_password_policies_patch_with_http_info = password_policies_patch_with_http_info - api223_password_policies_get_with_http_info = password_policies_get_with_http_info - api223_password_policies_patch_with_http_info = password_policies_patch_with_http_info - api224_password_policies_get_with_http_info = password_policies_get_with_http_info - api224_password_policies_patch_with_http_info = password_policies_patch_with_http_info - api225_password_policies_get_with_http_info = password_policies_get_with_http_info - api225_password_policies_patch_with_http_info = password_policies_patch_with_http_info - api226_password_policies_get_with_http_info = password_policies_get_with_http_info - api226_password_policies_patch_with_http_info = password_policies_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/policies_password_api_v_2_17.py b/pypureclient/flashblade/_common/apis/policies_password_api_v_2_17.py new file mode 100644 index 0000000000..31c7cb26f8 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/policies_password_api_v_2_17.py @@ -0,0 +1,368 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.password_policies_get_response_v_2_16 import PasswordPoliciesGetResponse +from pypureclient.flashblade._common.models.password_policies_response_v_2_16 import PasswordPoliciesResponse +from pypureclient.flashblade._common.models.password_policy_v_2_16 import PasswordPolicy + +class PoliciesPasswordApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def password_policies_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List password policies + + Displays a list of password policies. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PasswordPoliciesGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_password_policies_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "PasswordPoliciesGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/password-policies', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def password_policies_patch_with_http_info( + self, + policy: PasswordPolicy, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify password policies + + Modifies one or more password policies. To enable a policy, set `enabled=true`. To disable a policy, set `enabled=false`. + + :param policy: (required) + :type policy: PasswordPolicy + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PasswordPoliciesResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'policy', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_password_policies_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['policy'] is not None: + _body_params = _params['policy'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "PasswordPoliciesResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/password-policies', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_password_policies_get_with_http_info = password_policies_get_with_http_info + api217_password_policies_patch_with_http_info = password_policies_patch_with_http_info + api218_password_policies_get_with_http_info = password_policies_get_with_http_info + api218_password_policies_patch_with_http_info = password_policies_patch_with_http_info + api219_password_policies_get_with_http_info = password_policies_get_with_http_info + api219_password_policies_patch_with_http_info = password_policies_patch_with_http_info + api220_password_policies_get_with_http_info = password_policies_get_with_http_info + api220_password_policies_patch_with_http_info = password_policies_patch_with_http_info + api221_password_policies_get_with_http_info = password_policies_get_with_http_info + api221_password_policies_patch_with_http_info = password_policies_patch_with_http_info + api222_password_policies_get_with_http_info = password_policies_get_with_http_info + api222_password_policies_patch_with_http_info = password_policies_patch_with_http_info + api223_password_policies_get_with_http_info = password_policies_get_with_http_info + api223_password_policies_patch_with_http_info = password_policies_patch_with_http_info + api224_password_policies_get_with_http_info = password_policies_get_with_http_info + api224_password_policies_patch_with_http_info = password_policies_patch_with_http_info + api225_password_policies_get_with_http_info = password_policies_get_with_http_info + api225_password_policies_patch_with_http_info = password_policies_patch_with_http_info + api226_password_policies_get_with_http_info = password_policies_get_with_http_info + api226_password_policies_patch_with_http_info = password_policies_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/policies_ssh_certificate_authority_api_v_2_14.py b/pypureclient/flashblade/_common/apis/policies_ssh_certificate_authority_api_v_2_14.py index 9d44337baf..d45bfaba61 100644 --- a/pypureclient/flashblade/_common/apis/policies_ssh_certificate_authority_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/policies_ssh_certificate_authority_api_v_2_14.py @@ -2624,122 +2624,3 @@ def ssh_certificate_authority_policies_post_with_http_info( api216_ssh_certificate_authority_policies_members_get_with_http_info = ssh_certificate_authority_policies_members_get_with_http_info api216_ssh_certificate_authority_policies_patch_with_http_info = ssh_certificate_authority_policies_patch_with_http_info api216_ssh_certificate_authority_policies_post_with_http_info = ssh_certificate_authority_policies_post_with_http_info - api217_admins_ssh_certificate_authority_policies_delete_with_http_info = admins_ssh_certificate_authority_policies_delete_with_http_info - api217_admins_ssh_certificate_authority_policies_get_with_http_info = admins_ssh_certificate_authority_policies_get_with_http_info - api217_admins_ssh_certificate_authority_policies_post_with_http_info = admins_ssh_certificate_authority_policies_post_with_http_info - api217_arrays_ssh_certificate_authority_policies_delete_with_http_info = arrays_ssh_certificate_authority_policies_delete_with_http_info - api217_arrays_ssh_certificate_authority_policies_get_with_http_info = arrays_ssh_certificate_authority_policies_get_with_http_info - api217_arrays_ssh_certificate_authority_policies_post_with_http_info = arrays_ssh_certificate_authority_policies_post_with_http_info - api217_ssh_certificate_authority_policies_admins_delete_with_http_info = ssh_certificate_authority_policies_admins_delete_with_http_info - api217_ssh_certificate_authority_policies_admins_get_with_http_info = ssh_certificate_authority_policies_admins_get_with_http_info - api217_ssh_certificate_authority_policies_admins_post_with_http_info = ssh_certificate_authority_policies_admins_post_with_http_info - api217_ssh_certificate_authority_policies_arrays_delete_with_http_info = ssh_certificate_authority_policies_arrays_delete_with_http_info - api217_ssh_certificate_authority_policies_arrays_get_with_http_info = ssh_certificate_authority_policies_arrays_get_with_http_info - api217_ssh_certificate_authority_policies_arrays_post_with_http_info = ssh_certificate_authority_policies_arrays_post_with_http_info - api217_ssh_certificate_authority_policies_delete_with_http_info = ssh_certificate_authority_policies_delete_with_http_info - api217_ssh_certificate_authority_policies_get_with_http_info = ssh_certificate_authority_policies_get_with_http_info - api217_ssh_certificate_authority_policies_members_get_with_http_info = ssh_certificate_authority_policies_members_get_with_http_info - api217_ssh_certificate_authority_policies_patch_with_http_info = ssh_certificate_authority_policies_patch_with_http_info - api217_ssh_certificate_authority_policies_post_with_http_info = ssh_certificate_authority_policies_post_with_http_info - api218_admins_ssh_certificate_authority_policies_delete_with_http_info = admins_ssh_certificate_authority_policies_delete_with_http_info - api218_admins_ssh_certificate_authority_policies_get_with_http_info = admins_ssh_certificate_authority_policies_get_with_http_info - api218_admins_ssh_certificate_authority_policies_post_with_http_info = admins_ssh_certificate_authority_policies_post_with_http_info - api218_arrays_ssh_certificate_authority_policies_delete_with_http_info = arrays_ssh_certificate_authority_policies_delete_with_http_info - api218_arrays_ssh_certificate_authority_policies_get_with_http_info = arrays_ssh_certificate_authority_policies_get_with_http_info - api218_arrays_ssh_certificate_authority_policies_post_with_http_info = arrays_ssh_certificate_authority_policies_post_with_http_info - api218_ssh_certificate_authority_policies_admins_delete_with_http_info = ssh_certificate_authority_policies_admins_delete_with_http_info - api218_ssh_certificate_authority_policies_admins_get_with_http_info = ssh_certificate_authority_policies_admins_get_with_http_info - api218_ssh_certificate_authority_policies_admins_post_with_http_info = ssh_certificate_authority_policies_admins_post_with_http_info - api218_ssh_certificate_authority_policies_arrays_delete_with_http_info = ssh_certificate_authority_policies_arrays_delete_with_http_info - api218_ssh_certificate_authority_policies_arrays_get_with_http_info = ssh_certificate_authority_policies_arrays_get_with_http_info - api218_ssh_certificate_authority_policies_arrays_post_with_http_info = ssh_certificate_authority_policies_arrays_post_with_http_info - api218_ssh_certificate_authority_policies_delete_with_http_info = ssh_certificate_authority_policies_delete_with_http_info - api218_ssh_certificate_authority_policies_get_with_http_info = ssh_certificate_authority_policies_get_with_http_info - api218_ssh_certificate_authority_policies_members_get_with_http_info = ssh_certificate_authority_policies_members_get_with_http_info - api218_ssh_certificate_authority_policies_patch_with_http_info = ssh_certificate_authority_policies_patch_with_http_info - api218_ssh_certificate_authority_policies_post_with_http_info = ssh_certificate_authority_policies_post_with_http_info - api219_admins_ssh_certificate_authority_policies_delete_with_http_info = admins_ssh_certificate_authority_policies_delete_with_http_info - api219_admins_ssh_certificate_authority_policies_get_with_http_info = admins_ssh_certificate_authority_policies_get_with_http_info - api219_admins_ssh_certificate_authority_policies_post_with_http_info = admins_ssh_certificate_authority_policies_post_with_http_info - api219_arrays_ssh_certificate_authority_policies_delete_with_http_info = arrays_ssh_certificate_authority_policies_delete_with_http_info - api219_arrays_ssh_certificate_authority_policies_get_with_http_info = arrays_ssh_certificate_authority_policies_get_with_http_info - api219_arrays_ssh_certificate_authority_policies_post_with_http_info = arrays_ssh_certificate_authority_policies_post_with_http_info - api219_ssh_certificate_authority_policies_admins_delete_with_http_info = ssh_certificate_authority_policies_admins_delete_with_http_info - api219_ssh_certificate_authority_policies_admins_get_with_http_info = ssh_certificate_authority_policies_admins_get_with_http_info - api219_ssh_certificate_authority_policies_admins_post_with_http_info = ssh_certificate_authority_policies_admins_post_with_http_info - api219_ssh_certificate_authority_policies_arrays_delete_with_http_info = ssh_certificate_authority_policies_arrays_delete_with_http_info - api219_ssh_certificate_authority_policies_arrays_get_with_http_info = ssh_certificate_authority_policies_arrays_get_with_http_info - api219_ssh_certificate_authority_policies_arrays_post_with_http_info = ssh_certificate_authority_policies_arrays_post_with_http_info - api219_ssh_certificate_authority_policies_delete_with_http_info = ssh_certificate_authority_policies_delete_with_http_info - api219_ssh_certificate_authority_policies_get_with_http_info = ssh_certificate_authority_policies_get_with_http_info - api219_ssh_certificate_authority_policies_members_get_with_http_info = ssh_certificate_authority_policies_members_get_with_http_info - api219_ssh_certificate_authority_policies_patch_with_http_info = ssh_certificate_authority_policies_patch_with_http_info - api219_ssh_certificate_authority_policies_post_with_http_info = ssh_certificate_authority_policies_post_with_http_info - api220_admins_ssh_certificate_authority_policies_delete_with_http_info = admins_ssh_certificate_authority_policies_delete_with_http_info - api220_admins_ssh_certificate_authority_policies_get_with_http_info = admins_ssh_certificate_authority_policies_get_with_http_info - api220_admins_ssh_certificate_authority_policies_post_with_http_info = admins_ssh_certificate_authority_policies_post_with_http_info - api220_arrays_ssh_certificate_authority_policies_delete_with_http_info = arrays_ssh_certificate_authority_policies_delete_with_http_info - api220_arrays_ssh_certificate_authority_policies_get_with_http_info = arrays_ssh_certificate_authority_policies_get_with_http_info - api220_arrays_ssh_certificate_authority_policies_post_with_http_info = arrays_ssh_certificate_authority_policies_post_with_http_info - api220_ssh_certificate_authority_policies_admins_delete_with_http_info = ssh_certificate_authority_policies_admins_delete_with_http_info - api220_ssh_certificate_authority_policies_admins_get_with_http_info = ssh_certificate_authority_policies_admins_get_with_http_info - api220_ssh_certificate_authority_policies_admins_post_with_http_info = ssh_certificate_authority_policies_admins_post_with_http_info - api220_ssh_certificate_authority_policies_arrays_delete_with_http_info = ssh_certificate_authority_policies_arrays_delete_with_http_info - api220_ssh_certificate_authority_policies_arrays_get_with_http_info = ssh_certificate_authority_policies_arrays_get_with_http_info - api220_ssh_certificate_authority_policies_arrays_post_with_http_info = ssh_certificate_authority_policies_arrays_post_with_http_info - api220_ssh_certificate_authority_policies_delete_with_http_info = ssh_certificate_authority_policies_delete_with_http_info - api220_ssh_certificate_authority_policies_get_with_http_info = ssh_certificate_authority_policies_get_with_http_info - api220_ssh_certificate_authority_policies_members_get_with_http_info = ssh_certificate_authority_policies_members_get_with_http_info - api220_ssh_certificate_authority_policies_patch_with_http_info = ssh_certificate_authority_policies_patch_with_http_info - api220_ssh_certificate_authority_policies_post_with_http_info = ssh_certificate_authority_policies_post_with_http_info - api221_admins_ssh_certificate_authority_policies_delete_with_http_info = admins_ssh_certificate_authority_policies_delete_with_http_info - api221_admins_ssh_certificate_authority_policies_get_with_http_info = admins_ssh_certificate_authority_policies_get_with_http_info - api221_admins_ssh_certificate_authority_policies_post_with_http_info = admins_ssh_certificate_authority_policies_post_with_http_info - api221_arrays_ssh_certificate_authority_policies_delete_with_http_info = arrays_ssh_certificate_authority_policies_delete_with_http_info - api221_arrays_ssh_certificate_authority_policies_get_with_http_info = arrays_ssh_certificate_authority_policies_get_with_http_info - api221_arrays_ssh_certificate_authority_policies_post_with_http_info = arrays_ssh_certificate_authority_policies_post_with_http_info - api221_ssh_certificate_authority_policies_admins_delete_with_http_info = ssh_certificate_authority_policies_admins_delete_with_http_info - api221_ssh_certificate_authority_policies_admins_get_with_http_info = ssh_certificate_authority_policies_admins_get_with_http_info - api221_ssh_certificate_authority_policies_admins_post_with_http_info = ssh_certificate_authority_policies_admins_post_with_http_info - api221_ssh_certificate_authority_policies_arrays_delete_with_http_info = ssh_certificate_authority_policies_arrays_delete_with_http_info - api221_ssh_certificate_authority_policies_arrays_get_with_http_info = ssh_certificate_authority_policies_arrays_get_with_http_info - api221_ssh_certificate_authority_policies_arrays_post_with_http_info = ssh_certificate_authority_policies_arrays_post_with_http_info - api221_ssh_certificate_authority_policies_delete_with_http_info = ssh_certificate_authority_policies_delete_with_http_info - api221_ssh_certificate_authority_policies_get_with_http_info = ssh_certificate_authority_policies_get_with_http_info - api221_ssh_certificate_authority_policies_members_get_with_http_info = ssh_certificate_authority_policies_members_get_with_http_info - api221_ssh_certificate_authority_policies_patch_with_http_info = ssh_certificate_authority_policies_patch_with_http_info - api221_ssh_certificate_authority_policies_post_with_http_info = ssh_certificate_authority_policies_post_with_http_info - api222_admins_ssh_certificate_authority_policies_delete_with_http_info = admins_ssh_certificate_authority_policies_delete_with_http_info - api222_admins_ssh_certificate_authority_policies_get_with_http_info = admins_ssh_certificate_authority_policies_get_with_http_info - api222_admins_ssh_certificate_authority_policies_post_with_http_info = admins_ssh_certificate_authority_policies_post_with_http_info - api222_arrays_ssh_certificate_authority_policies_delete_with_http_info = arrays_ssh_certificate_authority_policies_delete_with_http_info - api222_arrays_ssh_certificate_authority_policies_get_with_http_info = arrays_ssh_certificate_authority_policies_get_with_http_info - api222_arrays_ssh_certificate_authority_policies_post_with_http_info = arrays_ssh_certificate_authority_policies_post_with_http_info - api222_ssh_certificate_authority_policies_admins_delete_with_http_info = ssh_certificate_authority_policies_admins_delete_with_http_info - api222_ssh_certificate_authority_policies_admins_get_with_http_info = ssh_certificate_authority_policies_admins_get_with_http_info - api222_ssh_certificate_authority_policies_admins_post_with_http_info = ssh_certificate_authority_policies_admins_post_with_http_info - api222_ssh_certificate_authority_policies_arrays_delete_with_http_info = ssh_certificate_authority_policies_arrays_delete_with_http_info - api222_ssh_certificate_authority_policies_arrays_get_with_http_info = ssh_certificate_authority_policies_arrays_get_with_http_info - api222_ssh_certificate_authority_policies_arrays_post_with_http_info = ssh_certificate_authority_policies_arrays_post_with_http_info - api222_ssh_certificate_authority_policies_delete_with_http_info = ssh_certificate_authority_policies_delete_with_http_info - api222_ssh_certificate_authority_policies_get_with_http_info = ssh_certificate_authority_policies_get_with_http_info - api222_ssh_certificate_authority_policies_members_get_with_http_info = ssh_certificate_authority_policies_members_get_with_http_info - api222_ssh_certificate_authority_policies_patch_with_http_info = ssh_certificate_authority_policies_patch_with_http_info - api222_ssh_certificate_authority_policies_post_with_http_info = ssh_certificate_authority_policies_post_with_http_info - api223_admins_ssh_certificate_authority_policies_delete_with_http_info = admins_ssh_certificate_authority_policies_delete_with_http_info - api223_admins_ssh_certificate_authority_policies_get_with_http_info = admins_ssh_certificate_authority_policies_get_with_http_info - api223_admins_ssh_certificate_authority_policies_post_with_http_info = admins_ssh_certificate_authority_policies_post_with_http_info - api223_arrays_ssh_certificate_authority_policies_delete_with_http_info = arrays_ssh_certificate_authority_policies_delete_with_http_info - api223_arrays_ssh_certificate_authority_policies_get_with_http_info = arrays_ssh_certificate_authority_policies_get_with_http_info - api223_arrays_ssh_certificate_authority_policies_post_with_http_info = arrays_ssh_certificate_authority_policies_post_with_http_info - api223_ssh_certificate_authority_policies_admins_delete_with_http_info = ssh_certificate_authority_policies_admins_delete_with_http_info - api223_ssh_certificate_authority_policies_admins_get_with_http_info = ssh_certificate_authority_policies_admins_get_with_http_info - api223_ssh_certificate_authority_policies_admins_post_with_http_info = ssh_certificate_authority_policies_admins_post_with_http_info - api223_ssh_certificate_authority_policies_arrays_delete_with_http_info = ssh_certificate_authority_policies_arrays_delete_with_http_info - api223_ssh_certificate_authority_policies_arrays_get_with_http_info = ssh_certificate_authority_policies_arrays_get_with_http_info - api223_ssh_certificate_authority_policies_arrays_post_with_http_info = ssh_certificate_authority_policies_arrays_post_with_http_info - api223_ssh_certificate_authority_policies_delete_with_http_info = ssh_certificate_authority_policies_delete_with_http_info - api223_ssh_certificate_authority_policies_get_with_http_info = ssh_certificate_authority_policies_get_with_http_info - api223_ssh_certificate_authority_policies_members_get_with_http_info = ssh_certificate_authority_policies_members_get_with_http_info - api223_ssh_certificate_authority_policies_patch_with_http_info = ssh_certificate_authority_policies_patch_with_http_info - api223_ssh_certificate_authority_policies_post_with_http_info = ssh_certificate_authority_policies_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/policies_ssh_certificate_authority_api_v_2_17.py b/pypureclient/flashblade/_common/apis/policies_ssh_certificate_authority_api_v_2_17.py new file mode 100644 index 0000000000..9b4965c668 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/policies_ssh_certificate_authority_api_v_2_17.py @@ -0,0 +1,2694 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.policy_member_get_response_v_2_0 import PolicyMemberGetResponse +from pypureclient.flashblade._common.models.policy_member_response_v_2_0 import PolicyMemberResponse +from pypureclient.flashblade._common.models.ssh_certificate_authority_policy_get_response_v_2_16 import SshCertificateAuthorityPolicyGetResponse +from pypureclient.flashblade._common.models.ssh_certificate_authority_policy_post_v_2_16 import SshCertificateAuthorityPolicyPost +from pypureclient.flashblade._common.models.ssh_certificate_authority_policy_response_v_2_16 import SshCertificateAuthorityPolicyResponse +from pypureclient.flashblade._common.models.ssh_certificate_authority_policy_v_2_16 import SshCertificateAuthorityPolicy + +class PoliciesSSHCertificateAuthorityApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def admins_ssh_certificate_authority_policies_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member names.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE admins/ssh-certificate-authority-policies + + Remove a SSH Certificate Authority policy from a specific user. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :type member_ids: List[str] + :param member_names: A comma-separated list of member names. + :type member_names: List[str] + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_admins_ssh_certificate_authority_policies_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/admins/ssh-certificate-authority-policies', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def admins_ssh_certificate_authority_policies_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member names.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET admins/ssh-certificate-authority-policies + + List SSH Certificate Authority policies mapped to specific users. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :type member_ids: List[str] + :param member_names: A comma-separated list of member names. + :type member_names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_admins_ssh_certificate_authority_policies_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/admins/ssh-certificate-authority-policies', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def admins_ssh_certificate_authority_policies_post_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member names.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST admins/ssh-certificate-authority-policies + + Map a SSH Certificate Authority policy to a specific user. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :type member_ids: List[str] + :param member_names: A comma-separated list of member names. + :type member_names: List[str] + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_admins_ssh_certificate_authority_policies_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/admins/ssh-certificate-authority-policies', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def arrays_ssh_certificate_authority_policies_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member names.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE admins/settings/ssh-certificate-authority-policies + + Remove a SSH Certificate Authority policy from being a default for admins. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :type member_ids: List[str] + :param member_names: A comma-separated list of member names. + :type member_names: List[str] + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_arrays_ssh_certificate_authority_policies_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/arrays/ssh-certificate-authority-policies', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def arrays_ssh_certificate_authority_policies_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member names.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET admins/settings/ssh-certificate-authority-policies + + List SSH Certificate Authority policies mapped as defaults for admins. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :type member_ids: List[str] + :param member_names: A comma-separated list of member names. + :type member_names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_arrays_ssh_certificate_authority_policies_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/arrays/ssh-certificate-authority-policies', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def arrays_ssh_certificate_authority_policies_post_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member names.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST admins/settings/ssh-certificate-authority-policies + + Map a SSH Certificate Authority policy as a default for admins. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :type member_ids: List[str] + :param member_names: A comma-separated list of member names. + :type member_names: List[str] + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_arrays_ssh_certificate_authority_policies_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/arrays/ssh-certificate-authority-policies', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def ssh_certificate_authority_policies_admins_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member names.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE ssh-certificate-authority-policies/admins + + Remove a SSH Certificate Authority policy from a specific user. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :type member_ids: List[str] + :param member_names: A comma-separated list of member names. + :type member_names: List[str] + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_ssh_certificate_authority_policies_admins_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/ssh-certificate-authority-policies/admins', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def ssh_certificate_authority_policies_admins_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member names.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET ssh-certificate-authority-policies/admins + + List SSH Certificate Authority policies mapped to specific users. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :type member_ids: List[str] + :param member_names: A comma-separated list of member names. + :type member_names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_ssh_certificate_authority_policies_admins_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/ssh-certificate-authority-policies/admins', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def ssh_certificate_authority_policies_admins_post_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member names.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST ssh-certificate-authority-policies/admins + + Map a SSH Certificate Authority policy to a specific user. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :type member_ids: List[str] + :param member_names: A comma-separated list of member names. + :type member_names: List[str] + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_ssh_certificate_authority_policies_admins_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/ssh-certificate-authority-policies/admins', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def ssh_certificate_authority_policies_arrays_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member names.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE ssh-certificate-authority-policies/arrays + + Remove a SSH Certificate Authority policy from being a default for admins. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :type member_ids: List[str] + :param member_names: A comma-separated list of member names. + :type member_names: List[str] + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_ssh_certificate_authority_policies_arrays_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/ssh-certificate-authority-policies/arrays', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def ssh_certificate_authority_policies_arrays_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member names.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET ssh-certificate-authority-policies/arrays + + List SSH Certificate Authority policies mapped as defaults for admins. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :type member_ids: List[str] + :param member_names: A comma-separated list of member names. + :type member_names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_ssh_certificate_authority_policies_arrays_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/ssh-certificate-authority-policies/arrays', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def ssh_certificate_authority_policies_arrays_post_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member names.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST ssh-certificate-authority-policies/arrays + + Map a SSH Certificate Authority policy as a default for admins. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :type member_ids: List[str] + :param member_names: A comma-separated list of member names. + :type member_names: List[str] + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'member_ids', + 'member_names', + 'policy_ids', + 'policy_names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_ssh_certificate_authority_policies_arrays_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/ssh-certificate-authority-policies/arrays', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def ssh_certificate_authority_policies_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete SSH Certificate Authority configurations + + Deletes SSH Certificate Authority configurations. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_ssh_certificate_authority_policies_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/ssh-certificate-authority-policies', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def ssh_certificate_authority_policies_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List SSH Certificate Authority configurations + + List SSH Certificate Authority configurations + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SshCertificateAuthorityPolicyGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_ssh_certificate_authority_policies_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SshCertificateAuthorityPolicyGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/ssh-certificate-authority-policies', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def ssh_certificate_authority_policies_members_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + member_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter.")] = None, + member_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of member names.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + policy_ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter.")] = None, + policy_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of policy names.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET ssh-certificate-authority-policies/members + + List SSH Certificate Authority policies mapped to the admin default settings, or to one or more specific users. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param member_ids: A comma-separated list of member IDs. If after filtering, there is not at least one resource that matches each of the elements of `member_ids`, then an error is returned. This cannot be provided together with the `member_names` query parameter. + :type member_ids: List[str] + :param member_names: A comma-separated list of member names. + :type member_names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param policy_ids: A comma-separated list of policy IDs. If after filtering, there is not at least one resource that matches each of the elements of `policy_ids`, then an error is returned. This cannot be provided together with the `policy_names` query parameter. + :type policy_ids: List[str] + :param policy_names: A comma-separated list of policy names. + :type policy_names: List[str] + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PolicyMemberGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'limit', + 'member_ids', + 'member_names', + 'offset', + 'policy_ids', + 'policy_names', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_ssh_certificate_authority_policies_members_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('member_ids') is not None: # noqa: E501 + _query_params.append(('member_ids', _params['member_ids'])) + _collection_formats['member_ids'] = 'csv' + + if _params.get('member_names') is not None: # noqa: E501 + _query_params.append(('member_names', _params['member_names'])) + _collection_formats['member_names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('policy_ids') is not None: # noqa: E501 + _query_params.append(('policy_ids', _params['policy_ids'])) + _collection_formats['policy_ids'] = 'csv' + + if _params.get('policy_names') is not None: # noqa: E501 + _query_params.append(('policy_names', _params['policy_names'])) + _collection_formats['policy_names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "PolicyMemberGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/ssh-certificate-authority-policies/members', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def ssh_certificate_authority_policies_patch_with_http_info( + self, + policy: SshCertificateAuthorityPolicy, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify SSH Certificate Authority configurations + + Modifies one or more attributes of SSH Certificate Authority configurations. + + :param policy: (required) + :type policy: SshCertificateAuthorityPolicy + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SshCertificateAuthorityPolicyResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'policy', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_ssh_certificate_authority_policies_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['policy'] is not None: + _body_params = _params['policy'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SshCertificateAuthorityPolicyResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/ssh-certificate-authority-policies', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def ssh_certificate_authority_policies_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="A comma-separated list of resource names.")], + policy: SshCertificateAuthorityPolicyPost, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create SSH Certificate Authority configurations + + Creates SSH Certificate Authority configurations. + + :param names: A comma-separated list of resource names. (required) + :type names: List[str] + :param policy: (required) + :type policy: SshCertificateAuthorityPolicyPost + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SshCertificateAuthorityPolicyResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'policy', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_ssh_certificate_authority_policies_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['policy'] is not None: + _body_params = _params['policy'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SshCertificateAuthorityPolicyResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/ssh-certificate-authority-policies', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_admins_ssh_certificate_authority_policies_delete_with_http_info = admins_ssh_certificate_authority_policies_delete_with_http_info + api217_admins_ssh_certificate_authority_policies_get_with_http_info = admins_ssh_certificate_authority_policies_get_with_http_info + api217_admins_ssh_certificate_authority_policies_post_with_http_info = admins_ssh_certificate_authority_policies_post_with_http_info + api217_arrays_ssh_certificate_authority_policies_delete_with_http_info = arrays_ssh_certificate_authority_policies_delete_with_http_info + api217_arrays_ssh_certificate_authority_policies_get_with_http_info = arrays_ssh_certificate_authority_policies_get_with_http_info + api217_arrays_ssh_certificate_authority_policies_post_with_http_info = arrays_ssh_certificate_authority_policies_post_with_http_info + api217_ssh_certificate_authority_policies_admins_delete_with_http_info = ssh_certificate_authority_policies_admins_delete_with_http_info + api217_ssh_certificate_authority_policies_admins_get_with_http_info = ssh_certificate_authority_policies_admins_get_with_http_info + api217_ssh_certificate_authority_policies_admins_post_with_http_info = ssh_certificate_authority_policies_admins_post_with_http_info + api217_ssh_certificate_authority_policies_arrays_delete_with_http_info = ssh_certificate_authority_policies_arrays_delete_with_http_info + api217_ssh_certificate_authority_policies_arrays_get_with_http_info = ssh_certificate_authority_policies_arrays_get_with_http_info + api217_ssh_certificate_authority_policies_arrays_post_with_http_info = ssh_certificate_authority_policies_arrays_post_with_http_info + api217_ssh_certificate_authority_policies_delete_with_http_info = ssh_certificate_authority_policies_delete_with_http_info + api217_ssh_certificate_authority_policies_get_with_http_info = ssh_certificate_authority_policies_get_with_http_info + api217_ssh_certificate_authority_policies_members_get_with_http_info = ssh_certificate_authority_policies_members_get_with_http_info + api217_ssh_certificate_authority_policies_patch_with_http_info = ssh_certificate_authority_policies_patch_with_http_info + api217_ssh_certificate_authority_policies_post_with_http_info = ssh_certificate_authority_policies_post_with_http_info + api218_admins_ssh_certificate_authority_policies_delete_with_http_info = admins_ssh_certificate_authority_policies_delete_with_http_info + api218_admins_ssh_certificate_authority_policies_get_with_http_info = admins_ssh_certificate_authority_policies_get_with_http_info + api218_admins_ssh_certificate_authority_policies_post_with_http_info = admins_ssh_certificate_authority_policies_post_with_http_info + api218_arrays_ssh_certificate_authority_policies_delete_with_http_info = arrays_ssh_certificate_authority_policies_delete_with_http_info + api218_arrays_ssh_certificate_authority_policies_get_with_http_info = arrays_ssh_certificate_authority_policies_get_with_http_info + api218_arrays_ssh_certificate_authority_policies_post_with_http_info = arrays_ssh_certificate_authority_policies_post_with_http_info + api218_ssh_certificate_authority_policies_admins_delete_with_http_info = ssh_certificate_authority_policies_admins_delete_with_http_info + api218_ssh_certificate_authority_policies_admins_get_with_http_info = ssh_certificate_authority_policies_admins_get_with_http_info + api218_ssh_certificate_authority_policies_admins_post_with_http_info = ssh_certificate_authority_policies_admins_post_with_http_info + api218_ssh_certificate_authority_policies_arrays_delete_with_http_info = ssh_certificate_authority_policies_arrays_delete_with_http_info + api218_ssh_certificate_authority_policies_arrays_get_with_http_info = ssh_certificate_authority_policies_arrays_get_with_http_info + api218_ssh_certificate_authority_policies_arrays_post_with_http_info = ssh_certificate_authority_policies_arrays_post_with_http_info + api218_ssh_certificate_authority_policies_delete_with_http_info = ssh_certificate_authority_policies_delete_with_http_info + api218_ssh_certificate_authority_policies_get_with_http_info = ssh_certificate_authority_policies_get_with_http_info + api218_ssh_certificate_authority_policies_members_get_with_http_info = ssh_certificate_authority_policies_members_get_with_http_info + api218_ssh_certificate_authority_policies_patch_with_http_info = ssh_certificate_authority_policies_patch_with_http_info + api218_ssh_certificate_authority_policies_post_with_http_info = ssh_certificate_authority_policies_post_with_http_info + api219_admins_ssh_certificate_authority_policies_delete_with_http_info = admins_ssh_certificate_authority_policies_delete_with_http_info + api219_admins_ssh_certificate_authority_policies_get_with_http_info = admins_ssh_certificate_authority_policies_get_with_http_info + api219_admins_ssh_certificate_authority_policies_post_with_http_info = admins_ssh_certificate_authority_policies_post_with_http_info + api219_arrays_ssh_certificate_authority_policies_delete_with_http_info = arrays_ssh_certificate_authority_policies_delete_with_http_info + api219_arrays_ssh_certificate_authority_policies_get_with_http_info = arrays_ssh_certificate_authority_policies_get_with_http_info + api219_arrays_ssh_certificate_authority_policies_post_with_http_info = arrays_ssh_certificate_authority_policies_post_with_http_info + api219_ssh_certificate_authority_policies_admins_delete_with_http_info = ssh_certificate_authority_policies_admins_delete_with_http_info + api219_ssh_certificate_authority_policies_admins_get_with_http_info = ssh_certificate_authority_policies_admins_get_with_http_info + api219_ssh_certificate_authority_policies_admins_post_with_http_info = ssh_certificate_authority_policies_admins_post_with_http_info + api219_ssh_certificate_authority_policies_arrays_delete_with_http_info = ssh_certificate_authority_policies_arrays_delete_with_http_info + api219_ssh_certificate_authority_policies_arrays_get_with_http_info = ssh_certificate_authority_policies_arrays_get_with_http_info + api219_ssh_certificate_authority_policies_arrays_post_with_http_info = ssh_certificate_authority_policies_arrays_post_with_http_info + api219_ssh_certificate_authority_policies_delete_with_http_info = ssh_certificate_authority_policies_delete_with_http_info + api219_ssh_certificate_authority_policies_get_with_http_info = ssh_certificate_authority_policies_get_with_http_info + api219_ssh_certificate_authority_policies_members_get_with_http_info = ssh_certificate_authority_policies_members_get_with_http_info + api219_ssh_certificate_authority_policies_patch_with_http_info = ssh_certificate_authority_policies_patch_with_http_info + api219_ssh_certificate_authority_policies_post_with_http_info = ssh_certificate_authority_policies_post_with_http_info + api220_admins_ssh_certificate_authority_policies_delete_with_http_info = admins_ssh_certificate_authority_policies_delete_with_http_info + api220_admins_ssh_certificate_authority_policies_get_with_http_info = admins_ssh_certificate_authority_policies_get_with_http_info + api220_admins_ssh_certificate_authority_policies_post_with_http_info = admins_ssh_certificate_authority_policies_post_with_http_info + api220_arrays_ssh_certificate_authority_policies_delete_with_http_info = arrays_ssh_certificate_authority_policies_delete_with_http_info + api220_arrays_ssh_certificate_authority_policies_get_with_http_info = arrays_ssh_certificate_authority_policies_get_with_http_info + api220_arrays_ssh_certificate_authority_policies_post_with_http_info = arrays_ssh_certificate_authority_policies_post_with_http_info + api220_ssh_certificate_authority_policies_admins_delete_with_http_info = ssh_certificate_authority_policies_admins_delete_with_http_info + api220_ssh_certificate_authority_policies_admins_get_with_http_info = ssh_certificate_authority_policies_admins_get_with_http_info + api220_ssh_certificate_authority_policies_admins_post_with_http_info = ssh_certificate_authority_policies_admins_post_with_http_info + api220_ssh_certificate_authority_policies_arrays_delete_with_http_info = ssh_certificate_authority_policies_arrays_delete_with_http_info + api220_ssh_certificate_authority_policies_arrays_get_with_http_info = ssh_certificate_authority_policies_arrays_get_with_http_info + api220_ssh_certificate_authority_policies_arrays_post_with_http_info = ssh_certificate_authority_policies_arrays_post_with_http_info + api220_ssh_certificate_authority_policies_delete_with_http_info = ssh_certificate_authority_policies_delete_with_http_info + api220_ssh_certificate_authority_policies_get_with_http_info = ssh_certificate_authority_policies_get_with_http_info + api220_ssh_certificate_authority_policies_members_get_with_http_info = ssh_certificate_authority_policies_members_get_with_http_info + api220_ssh_certificate_authority_policies_patch_with_http_info = ssh_certificate_authority_policies_patch_with_http_info + api220_ssh_certificate_authority_policies_post_with_http_info = ssh_certificate_authority_policies_post_with_http_info + api221_admins_ssh_certificate_authority_policies_delete_with_http_info = admins_ssh_certificate_authority_policies_delete_with_http_info + api221_admins_ssh_certificate_authority_policies_get_with_http_info = admins_ssh_certificate_authority_policies_get_with_http_info + api221_admins_ssh_certificate_authority_policies_post_with_http_info = admins_ssh_certificate_authority_policies_post_with_http_info + api221_arrays_ssh_certificate_authority_policies_delete_with_http_info = arrays_ssh_certificate_authority_policies_delete_with_http_info + api221_arrays_ssh_certificate_authority_policies_get_with_http_info = arrays_ssh_certificate_authority_policies_get_with_http_info + api221_arrays_ssh_certificate_authority_policies_post_with_http_info = arrays_ssh_certificate_authority_policies_post_with_http_info + api221_ssh_certificate_authority_policies_admins_delete_with_http_info = ssh_certificate_authority_policies_admins_delete_with_http_info + api221_ssh_certificate_authority_policies_admins_get_with_http_info = ssh_certificate_authority_policies_admins_get_with_http_info + api221_ssh_certificate_authority_policies_admins_post_with_http_info = ssh_certificate_authority_policies_admins_post_with_http_info + api221_ssh_certificate_authority_policies_arrays_delete_with_http_info = ssh_certificate_authority_policies_arrays_delete_with_http_info + api221_ssh_certificate_authority_policies_arrays_get_with_http_info = ssh_certificate_authority_policies_arrays_get_with_http_info + api221_ssh_certificate_authority_policies_arrays_post_with_http_info = ssh_certificate_authority_policies_arrays_post_with_http_info + api221_ssh_certificate_authority_policies_delete_with_http_info = ssh_certificate_authority_policies_delete_with_http_info + api221_ssh_certificate_authority_policies_get_with_http_info = ssh_certificate_authority_policies_get_with_http_info + api221_ssh_certificate_authority_policies_members_get_with_http_info = ssh_certificate_authority_policies_members_get_with_http_info + api221_ssh_certificate_authority_policies_patch_with_http_info = ssh_certificate_authority_policies_patch_with_http_info + api221_ssh_certificate_authority_policies_post_with_http_info = ssh_certificate_authority_policies_post_with_http_info + api222_admins_ssh_certificate_authority_policies_delete_with_http_info = admins_ssh_certificate_authority_policies_delete_with_http_info + api222_admins_ssh_certificate_authority_policies_get_with_http_info = admins_ssh_certificate_authority_policies_get_with_http_info + api222_admins_ssh_certificate_authority_policies_post_with_http_info = admins_ssh_certificate_authority_policies_post_with_http_info + api222_arrays_ssh_certificate_authority_policies_delete_with_http_info = arrays_ssh_certificate_authority_policies_delete_with_http_info + api222_arrays_ssh_certificate_authority_policies_get_with_http_info = arrays_ssh_certificate_authority_policies_get_with_http_info + api222_arrays_ssh_certificate_authority_policies_post_with_http_info = arrays_ssh_certificate_authority_policies_post_with_http_info + api222_ssh_certificate_authority_policies_admins_delete_with_http_info = ssh_certificate_authority_policies_admins_delete_with_http_info + api222_ssh_certificate_authority_policies_admins_get_with_http_info = ssh_certificate_authority_policies_admins_get_with_http_info + api222_ssh_certificate_authority_policies_admins_post_with_http_info = ssh_certificate_authority_policies_admins_post_with_http_info + api222_ssh_certificate_authority_policies_arrays_delete_with_http_info = ssh_certificate_authority_policies_arrays_delete_with_http_info + api222_ssh_certificate_authority_policies_arrays_get_with_http_info = ssh_certificate_authority_policies_arrays_get_with_http_info + api222_ssh_certificate_authority_policies_arrays_post_with_http_info = ssh_certificate_authority_policies_arrays_post_with_http_info + api222_ssh_certificate_authority_policies_delete_with_http_info = ssh_certificate_authority_policies_delete_with_http_info + api222_ssh_certificate_authority_policies_get_with_http_info = ssh_certificate_authority_policies_get_with_http_info + api222_ssh_certificate_authority_policies_members_get_with_http_info = ssh_certificate_authority_policies_members_get_with_http_info + api222_ssh_certificate_authority_policies_patch_with_http_info = ssh_certificate_authority_policies_patch_with_http_info + api222_ssh_certificate_authority_policies_post_with_http_info = ssh_certificate_authority_policies_post_with_http_info + api223_admins_ssh_certificate_authority_policies_delete_with_http_info = admins_ssh_certificate_authority_policies_delete_with_http_info + api223_admins_ssh_certificate_authority_policies_get_with_http_info = admins_ssh_certificate_authority_policies_get_with_http_info + api223_admins_ssh_certificate_authority_policies_post_with_http_info = admins_ssh_certificate_authority_policies_post_with_http_info + api223_arrays_ssh_certificate_authority_policies_delete_with_http_info = arrays_ssh_certificate_authority_policies_delete_with_http_info + api223_arrays_ssh_certificate_authority_policies_get_with_http_info = arrays_ssh_certificate_authority_policies_get_with_http_info + api223_arrays_ssh_certificate_authority_policies_post_with_http_info = arrays_ssh_certificate_authority_policies_post_with_http_info + api223_ssh_certificate_authority_policies_admins_delete_with_http_info = ssh_certificate_authority_policies_admins_delete_with_http_info + api223_ssh_certificate_authority_policies_admins_get_with_http_info = ssh_certificate_authority_policies_admins_get_with_http_info + api223_ssh_certificate_authority_policies_admins_post_with_http_info = ssh_certificate_authority_policies_admins_post_with_http_info + api223_ssh_certificate_authority_policies_arrays_delete_with_http_info = ssh_certificate_authority_policies_arrays_delete_with_http_info + api223_ssh_certificate_authority_policies_arrays_get_with_http_info = ssh_certificate_authority_policies_arrays_get_with_http_info + api223_ssh_certificate_authority_policies_arrays_post_with_http_info = ssh_certificate_authority_policies_arrays_post_with_http_info + api223_ssh_certificate_authority_policies_delete_with_http_info = ssh_certificate_authority_policies_delete_with_http_info + api223_ssh_certificate_authority_policies_get_with_http_info = ssh_certificate_authority_policies_get_with_http_info + api223_ssh_certificate_authority_policies_members_get_with_http_info = ssh_certificate_authority_policies_members_get_with_http_info + api223_ssh_certificate_authority_policies_patch_with_http_info = ssh_certificate_authority_policies_patch_with_http_info + api223_ssh_certificate_authority_policies_post_with_http_info = ssh_certificate_authority_policies_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/public_keys_api_v_2_14.py b/pypureclient/flashblade/_common/apis/public_keys_api_v_2_14.py index 6be223d281..356dc8dce6 100644 --- a/pypureclient/flashblade/_common/apis/public_keys_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/public_keys_api_v_2_14.py @@ -629,43 +629,3 @@ def public_keys_uses_get_with_http_info( api216_public_keys_get_with_http_info = public_keys_get_with_http_info api216_public_keys_post_with_http_info = public_keys_post_with_http_info api216_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info - api217_public_keys_delete_with_http_info = public_keys_delete_with_http_info - api217_public_keys_get_with_http_info = public_keys_get_with_http_info - api217_public_keys_post_with_http_info = public_keys_post_with_http_info - api217_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info - api218_public_keys_delete_with_http_info = public_keys_delete_with_http_info - api218_public_keys_get_with_http_info = public_keys_get_with_http_info - api218_public_keys_post_with_http_info = public_keys_post_with_http_info - api218_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info - api219_public_keys_delete_with_http_info = public_keys_delete_with_http_info - api219_public_keys_get_with_http_info = public_keys_get_with_http_info - api219_public_keys_post_with_http_info = public_keys_post_with_http_info - api219_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info - api220_public_keys_delete_with_http_info = public_keys_delete_with_http_info - api220_public_keys_get_with_http_info = public_keys_get_with_http_info - api220_public_keys_post_with_http_info = public_keys_post_with_http_info - api220_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info - api221_public_keys_delete_with_http_info = public_keys_delete_with_http_info - api221_public_keys_get_with_http_info = public_keys_get_with_http_info - api221_public_keys_post_with_http_info = public_keys_post_with_http_info - api221_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info - api222_public_keys_delete_with_http_info = public_keys_delete_with_http_info - api222_public_keys_get_with_http_info = public_keys_get_with_http_info - api222_public_keys_post_with_http_info = public_keys_post_with_http_info - api222_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info - api223_public_keys_delete_with_http_info = public_keys_delete_with_http_info - api223_public_keys_get_with_http_info = public_keys_get_with_http_info - api223_public_keys_post_with_http_info = public_keys_post_with_http_info - api223_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info - api224_public_keys_delete_with_http_info = public_keys_delete_with_http_info - api224_public_keys_get_with_http_info = public_keys_get_with_http_info - api224_public_keys_post_with_http_info = public_keys_post_with_http_info - api224_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info - api225_public_keys_delete_with_http_info = public_keys_delete_with_http_info - api225_public_keys_get_with_http_info = public_keys_get_with_http_info - api225_public_keys_post_with_http_info = public_keys_post_with_http_info - api225_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info - api226_public_keys_delete_with_http_info = public_keys_delete_with_http_info - api226_public_keys_get_with_http_info = public_keys_get_with_http_info - api226_public_keys_post_with_http_info = public_keys_post_with_http_info - api226_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/public_keys_api_v_2_17.py b/pypureclient/flashblade/_common/apis/public_keys_api_v_2_17.py new file mode 100644 index 0000000000..15b00896e4 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/public_keys_api_v_2_17.py @@ -0,0 +1,659 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.public_key_get_response_v_2_14 import PublicKeyGetResponse +from pypureclient.flashblade._common.models.public_key_post_v_2_14 import PublicKeyPost +from pypureclient.flashblade._common.models.public_key_response_v_2_14 import PublicKeyResponse +from pypureclient.flashblade._common.models.public_key_use_get_response_v_2_14 import PublicKeyUseGetResponse + +class PublicKeysApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def public_keys_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete public key configurations + + Deletes public key configurations. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_public_keys_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/public-keys', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def public_keys_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List public key configurations + + List public key configurations. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PublicKeyGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_public_keys_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "PublicKeyGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/public-keys', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def public_keys_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="A comma-separated list of resource names.")], + public_key: PublicKeyPost, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create public key configurations + + Creates public key configurations. + + :param names: A comma-separated list of resource names. (required) + :type names: List[str] + :param public_key: (required) + :type public_key: PublicKeyPost + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PublicKeyResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'public_key', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_public_keys_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['public_key'] is not None: + _body_params = _params['public_key'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "PublicKeyResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/public-keys', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def public_keys_uses_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET public-keys/uses + + List how public keys are being used and by what. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(PublicKeyUseGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_public_keys_uses_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "PublicKeyUseGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/public-keys/uses', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_public_keys_delete_with_http_info = public_keys_delete_with_http_info + api217_public_keys_get_with_http_info = public_keys_get_with_http_info + api217_public_keys_post_with_http_info = public_keys_post_with_http_info + api217_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info + api218_public_keys_delete_with_http_info = public_keys_delete_with_http_info + api218_public_keys_get_with_http_info = public_keys_get_with_http_info + api218_public_keys_post_with_http_info = public_keys_post_with_http_info + api218_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info + api219_public_keys_delete_with_http_info = public_keys_delete_with_http_info + api219_public_keys_get_with_http_info = public_keys_get_with_http_info + api219_public_keys_post_with_http_info = public_keys_post_with_http_info + api219_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info + api220_public_keys_delete_with_http_info = public_keys_delete_with_http_info + api220_public_keys_get_with_http_info = public_keys_get_with_http_info + api220_public_keys_post_with_http_info = public_keys_post_with_http_info + api220_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info + api221_public_keys_delete_with_http_info = public_keys_delete_with_http_info + api221_public_keys_get_with_http_info = public_keys_get_with_http_info + api221_public_keys_post_with_http_info = public_keys_post_with_http_info + api221_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info + api222_public_keys_delete_with_http_info = public_keys_delete_with_http_info + api222_public_keys_get_with_http_info = public_keys_get_with_http_info + api222_public_keys_post_with_http_info = public_keys_post_with_http_info + api222_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info + api223_public_keys_delete_with_http_info = public_keys_delete_with_http_info + api223_public_keys_get_with_http_info = public_keys_get_with_http_info + api223_public_keys_post_with_http_info = public_keys_post_with_http_info + api223_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info + api224_public_keys_delete_with_http_info = public_keys_delete_with_http_info + api224_public_keys_get_with_http_info = public_keys_get_with_http_info + api224_public_keys_post_with_http_info = public_keys_post_with_http_info + api224_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info + api225_public_keys_delete_with_http_info = public_keys_delete_with_http_info + api225_public_keys_get_with_http_info = public_keys_get_with_http_info + api225_public_keys_post_with_http_info = public_keys_post_with_http_info + api225_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info + api226_public_keys_delete_with_http_info = public_keys_delete_with_http_info + api226_public_keys_get_with_http_info = public_keys_get_with_http_info + api226_public_keys_post_with_http_info = public_keys_post_with_http_info + api226_public_keys_uses_get_with_http_info = public_keys_uses_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/rdl_api_v_2_14.py b/pypureclient/flashblade/_common/apis/rdl_api_v_2_14.py index 9cb094da6f..7b8b5a3ce2 100644 --- a/pypureclient/flashblade/_common/apis/rdl_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/rdl_api_v_2_14.py @@ -500,43 +500,3 @@ def rapid_data_locking_test_get_with_http_info( api216_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info api216_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info api216_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info - api217_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info - api217_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info - api217_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info - api217_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info - api218_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info - api218_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info - api218_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info - api218_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info - api219_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info - api219_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info - api219_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info - api219_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info - api220_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info - api220_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info - api220_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info - api220_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info - api221_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info - api221_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info - api221_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info - api221_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info - api222_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info - api222_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info - api222_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info - api222_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info - api223_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info - api223_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info - api223_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info - api223_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info - api224_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info - api224_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info - api224_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info - api224_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info - api225_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info - api225_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info - api225_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info - api225_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info - api226_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info - api226_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info - api226_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info - api226_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/rdl_api_v_2_17.py b/pypureclient/flashblade/_common/apis/rdl_api_v_2_17.py new file mode 100644 index 0000000000..c6d2ee8cd5 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/rdl_api_v_2_17.py @@ -0,0 +1,530 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr +except ModuleNotFoundError: + from pydantic import Field, StrictStr + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.rapid_data_locking_response_v_2_1 import RapidDataLockingResponse +from pypureclient.flashblade._common.models.rapid_data_locking_v_2_1 import RapidDataLocking +from pypureclient.flashblade._common.models.test_result_response_v_2_0 import TestResultResponse + +class RDLApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def rapid_data_locking_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Get the status of the Rapid Data Locking feature. + + Displays the status of the Rapid Data Locking feature. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RapidDataLockingResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_rapid_data_locking_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "RapidDataLockingResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/rapid-data-locking', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def rapid_data_locking_patch_with_http_info( + self, + rapid_data_locking: RapidDataLocking, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modifies the Rapid Data Locking feature. + + Modifies the Rapid Data Locking feature. Note that the feature can only be enabled if there are no file systems nor buckets created on the array. Once enabled, the feature cannot be modified. + + :param rapid_data_locking: (required) + :type rapid_data_locking: RapidDataLocking + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RapidDataLockingResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'rapid_data_locking', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_rapid_data_locking_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['rapid_data_locking'] is not None: + _body_params = _params['rapid_data_locking'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "RapidDataLockingResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/rapid-data-locking', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def rapid_data_locking_rotate_post_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Rotates the external keys on the associated EKM appliance. + + Rotates the external keys on the associated EKM appliance. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_rapid_data_locking_rotate_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/rapid-data-locking/rotate', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def rapid_data_locking_test_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Displays Rapid Data Locking test results. + + Displays a detailed result of a Rapid Data Locking test. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TestResultResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_rapid_data_locking_test_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "TestResultResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/rapid-data-locking/test', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info + api217_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info + api217_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info + api217_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info + api218_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info + api218_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info + api218_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info + api218_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info + api219_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info + api219_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info + api219_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info + api219_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info + api220_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info + api220_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info + api220_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info + api220_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info + api221_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info + api221_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info + api221_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info + api221_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info + api222_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info + api222_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info + api222_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info + api222_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info + api223_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info + api223_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info + api223_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info + api223_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info + api224_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info + api224_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info + api224_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info + api224_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info + api225_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info + api225_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info + api225_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info + api225_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info + api226_rapid_data_locking_get_with_http_info = rapid_data_locking_get_with_http_info + api226_rapid_data_locking_patch_with_http_info = rapid_data_locking_patch_with_http_info + api226_rapid_data_locking_rotate_post_with_http_info = rapid_data_locking_rotate_post_with_http_info + api226_rapid_data_locking_test_get_with_http_info = rapid_data_locking_test_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/roles_api_v_2_14.py b/pypureclient/flashblade/_common/apis/roles_api_v_2_14.py index 842ab04ee9..9c0f82add3 100644 --- a/pypureclient/flashblade/_common/apis/roles_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/roles_api_v_2_14.py @@ -209,14 +209,3 @@ def roles_get_with_http_info( api214_roles_get_with_http_info = roles_get_with_http_info api215_roles_get_with_http_info = roles_get_with_http_info api216_roles_get_with_http_info = roles_get_with_http_info - api217_roles_get_with_http_info = roles_get_with_http_info - api218_roles_get_with_http_info = roles_get_with_http_info - api219_roles_get_with_http_info = roles_get_with_http_info - api220_roles_get_with_http_info = roles_get_with_http_info - api221_roles_get_with_http_info = roles_get_with_http_info - api222_roles_get_with_http_info = roles_get_with_http_info - api223_roles_get_with_http_info = roles_get_with_http_info - api224_roles_get_with_http_info = roles_get_with_http_info - api225_roles_get_with_http_info = roles_get_with_http_info - api226_roles_get_with_http_info = roles_get_with_http_info - api227_roles_get_with_http_info = roles_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/roles_api_v_2_17.py b/pypureclient/flashblade/_common/apis/roles_api_v_2_17.py new file mode 100644 index 0000000000..8edda6c8ec --- /dev/null +++ b/pypureclient/flashblade/_common/apis/roles_api_v_2_17.py @@ -0,0 +1,219 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.role_get_response_v_2_0 import RoleGetResponse + +class RolesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def roles_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET roles + + List roles and permission attributes for role-based access control (RBAC). + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(RoleGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_roles_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "RoleGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/roles', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_roles_get_with_http_info = roles_get_with_http_info + api218_roles_get_with_http_info = roles_get_with_http_info + api219_roles_get_with_http_info = roles_get_with_http_info + api220_roles_get_with_http_info = roles_get_with_http_info + api221_roles_get_with_http_info = roles_get_with_http_info + api222_roles_get_with_http_info = roles_get_with_http_info + api223_roles_get_with_http_info = roles_get_with_http_info + api224_roles_get_with_http_info = roles_get_with_http_info + api225_roles_get_with_http_info = roles_get_with_http_info + api226_roles_get_with_http_info = roles_get_with_http_info + api227_roles_get_with_http_info = roles_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/saml2_sso_api_v_2_16.py b/pypureclient/flashblade/_common/apis/saml2_sso_api_v_2_16.py index 71069f74ca..78fe66c6b6 100644 --- a/pypureclient/flashblade/_common/apis/saml2_sso_api_v_2_16.py +++ b/pypureclient/flashblade/_common/apis/saml2_sso_api_v_2_16.py @@ -886,63 +886,3 @@ def sso_saml2_idps_test_patch_with_http_info( api216_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info api216_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info api216_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info - api217_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info - api217_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info - api217_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info - api217_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info - api217_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info - api217_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info - api218_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info - api218_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info - api218_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info - api218_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info - api218_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info - api218_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info - api219_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info - api219_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info - api219_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info - api219_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info - api219_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info - api219_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info - api220_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info - api220_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info - api220_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info - api220_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info - api220_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info - api220_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info - api221_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info - api221_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info - api221_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info - api221_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info - api221_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info - api221_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info - api222_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info - api222_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info - api222_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info - api222_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info - api222_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info - api222_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info - api223_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info - api223_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info - api223_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info - api223_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info - api223_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info - api223_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info - api224_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info - api224_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info - api224_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info - api224_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info - api224_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info - api224_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info - api225_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info - api225_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info - api225_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info - api225_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info - api225_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info - api225_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info - api226_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info - api226_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info - api226_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info - api226_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info - api226_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info - api226_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/saml2_sso_api_v_2_17.py b/pypureclient/flashblade/_common/apis/saml2_sso_api_v_2_17.py new file mode 100644 index 0000000000..724e71175c --- /dev/null +++ b/pypureclient/flashblade/_common/apis/saml2_sso_api_v_2_17.py @@ -0,0 +1,942 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.saml2_sso_get_response_v_2_17 import Saml2SsoGetResponse +from pypureclient.flashblade._common.models.saml2_sso_post_v_2_17 import Saml2SsoPost +from pypureclient.flashblade._common.models.saml2_sso_response_v_2_17 import Saml2SsoResponse +from pypureclient.flashblade._common.models.saml2_sso_v_2_17 import Saml2Sso +from pypureclient.flashblade._common.models.test_result_response_v_2_0 import TestResultResponse + +class SAML2SSOApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def sso_saml2_idps_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Delete SAML2 SSO configurations + + Deletes SAML2 SSO configurations. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_sso_saml2_idps_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/sso/saml2/idps', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def sso_saml2_idps_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List SAML2 SSO configurations + + Displays the SAML2 SSO service provider and identity provider configuration settings in the array. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Saml2SsoGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_sso_saml2_idps_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "Saml2SsoGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/sso/saml2/idps', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def sso_saml2_idps_patch_with_http_info( + self, + idp: Saml2Sso, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Modify SAML2 SSO configurations + + Modifies one or more attributes of SAML2 SSO configurations. + + :param idp: (required) + :type idp: Saml2Sso + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Saml2SsoResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'idp', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_sso_saml2_idps_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['idp'] is not None: + _body_params = _params['idp'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "Saml2SsoResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/sso/saml2/idps', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def sso_saml2_idps_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="A comma-separated list of resource names.")], + idp: Saml2SsoPost, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create SAML2 SSO configurations + + Creates SAML2 SSO configurations. + + :param names: A comma-separated list of resource names. (required) + :type names: List[str] + :param idp: (required) + :type idp: Saml2SsoPost + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(Saml2SsoResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'idp', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_sso_saml2_idps_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['idp'] is not None: + _body_params = _params['idp'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "Saml2SsoResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/sso/saml2/idps', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def sso_saml2_idps_test_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET sso/saml2/idps/test + + Test the existing SAML2 SSO configurations in the array. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TestResultResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'filter', + 'ids', + 'limit', + 'names', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_sso_saml2_idps_test_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "TestResultResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/sso/saml2/idps/test', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def sso_saml2_idps_test_patch_with_http_info( + self, + idp: Saml2Sso, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH sso/saml2/idps/test + + Modifies and test the provided SAML2 SSO configurations. If the configurations with the specified `ids` or `names` exist, the provided configurations will overwrite the existing configurations, but will not be persisted in the array. + + :param idp: (required) + :type idp: Saml2Sso + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TestResultResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'idp', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_sso_saml2_idps_test_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['idp'] is not None: + _body_params = _params['idp'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "TestResultResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/sso/saml2/idps/test', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info + api217_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info + api217_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info + api217_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info + api217_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info + api217_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info + api218_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info + api218_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info + api218_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info + api218_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info + api218_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info + api218_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info + api219_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info + api219_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info + api219_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info + api219_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info + api219_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info + api219_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info + api220_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info + api220_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info + api220_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info + api220_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info + api220_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info + api220_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info + api221_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info + api221_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info + api221_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info + api221_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info + api221_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info + api221_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info + api222_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info + api222_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info + api222_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info + api222_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info + api222_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info + api222_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info + api223_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info + api223_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info + api223_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info + api223_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info + api223_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info + api223_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info + api224_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info + api224_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info + api224_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info + api224_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info + api224_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info + api224_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info + api225_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info + api225_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info + api225_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info + api225_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info + api225_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info + api225_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info + api226_sso_saml2_idps_delete_with_http_info = sso_saml2_idps_delete_with_http_info + api226_sso_saml2_idps_get_with_http_info = sso_saml2_idps_get_with_http_info + api226_sso_saml2_idps_patch_with_http_info = sso_saml2_idps_patch_with_http_info + api226_sso_saml2_idps_post_with_http_info = sso_saml2_idps_post_with_http_info + api226_sso_saml2_idps_test_get_with_http_info = sso_saml2_idps_test_get_with_http_info + api226_sso_saml2_idps_test_patch_with_http_info = sso_saml2_idps_test_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/sessions_api_v_2_14.py b/pypureclient/flashblade/_common/apis/sessions_api_v_2_14.py index 219f782483..0c101eb507 100644 --- a/pypureclient/flashblade/_common/apis/sessions_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/sessions_api_v_2_14.py @@ -209,13 +209,3 @@ def sessions_get_with_http_info( api214_sessions_get_with_http_info = sessions_get_with_http_info api215_sessions_get_with_http_info = sessions_get_with_http_info api216_sessions_get_with_http_info = sessions_get_with_http_info - api217_sessions_get_with_http_info = sessions_get_with_http_info - api218_sessions_get_with_http_info = sessions_get_with_http_info - api219_sessions_get_with_http_info = sessions_get_with_http_info - api220_sessions_get_with_http_info = sessions_get_with_http_info - api221_sessions_get_with_http_info = sessions_get_with_http_info - api222_sessions_get_with_http_info = sessions_get_with_http_info - api223_sessions_get_with_http_info = sessions_get_with_http_info - api224_sessions_get_with_http_info = sessions_get_with_http_info - api225_sessions_get_with_http_info = sessions_get_with_http_info - api226_sessions_get_with_http_info = sessions_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/sessions_api_v_2_17.py b/pypureclient/flashblade/_common/apis/sessions_api_v_2_17.py new file mode 100644 index 0000000000..b48056fc76 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/sessions_api_v_2_17.py @@ -0,0 +1,218 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.session_get_response_v_2_14 import SessionGetResponse + +class SessionsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def sessions_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List session data + + Displays session data for user login events performed in the Purity//FB GUI, CLI, and REST API. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SessionGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_sessions_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SessionGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/sessions', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_sessions_get_with_http_info = sessions_get_with_http_info + api218_sessions_get_with_http_info = sessions_get_with_http_info + api219_sessions_get_with_http_info = sessions_get_with_http_info + api220_sessions_get_with_http_info = sessions_get_with_http_info + api221_sessions_get_with_http_info = sessions_get_with_http_info + api222_sessions_get_with_http_info = sessions_get_with_http_info + api223_sessions_get_with_http_info = sessions_get_with_http_info + api224_sessions_get_with_http_info = sessions_get_with_http_info + api225_sessions_get_with_http_info = sessions_get_with_http_info + api226_sessions_get_with_http_info = sessions_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/smtp_api_v_2_14.py b/pypureclient/flashblade/_common/apis/smtp_api_v_2_14.py index 111cde0fa3..cbdc73b3d5 100644 --- a/pypureclient/flashblade/_common/apis/smtp_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/smtp_api_v_2_14.py @@ -336,23 +336,3 @@ def smtp_servers_patch_with_http_info( api215_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info api216_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info api216_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info - api217_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info - api217_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info - api218_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info - api218_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info - api219_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info - api219_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info - api220_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info - api220_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info - api221_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info - api221_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info - api222_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info - api222_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info - api223_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info - api223_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info - api224_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info - api224_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info - api225_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info - api225_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info - api226_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info - api226_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/smtp_api_v_2_17.py b/pypureclient/flashblade/_common/apis/smtp_api_v_2_17.py new file mode 100644 index 0000000000..af4547bfa9 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/smtp_api_v_2_17.py @@ -0,0 +1,352 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.smtp_server_get_response_v_2_15 import SmtpServerGetResponse +from pypureclient.flashblade._common.models.smtp_server_response_v_2_15 import SmtpServerResponse +from pypureclient.flashblade._common.models.smtp_server_v_2_15 import SmtpServer + +class SMTPApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def smtp_servers_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET smtp-servers + + List SMTP server attributes for the array network. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SmtpServerGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_smtp_servers_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SmtpServerGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/smtp-servers', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def smtp_servers_patch_with_http_info( + self, + smtp: SmtpServer, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH smtp-servers + + Modify SMTP server attributes such as the relay host and sender domain. + + :param smtp: (required) + :type smtp: SmtpServer + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SmtpServerResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'smtp', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_smtp_servers_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['smtp'] is not None: + _body_params = _params['smtp'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SmtpServerResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/smtp-servers', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info + api217_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info + api218_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info + api218_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info + api219_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info + api219_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info + api220_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info + api220_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info + api221_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info + api221_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info + api222_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info + api222_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info + api223_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info + api223_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info + api224_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info + api224_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info + api225_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info + api225_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info + api226_smtp_servers_get_with_http_info = smtp_servers_get_with_http_info + api226_smtp_servers_patch_with_http_info = smtp_servers_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/snmp_agents_api_v_2_14.py b/pypureclient/flashblade/_common/apis/snmp_agents_api_v_2_14.py index fe71960481..c845b7c40c 100644 --- a/pypureclient/flashblade/_common/apis/snmp_agents_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/snmp_agents_api_v_2_14.py @@ -448,33 +448,3 @@ def snmp_agents_patch_with_http_info( api216_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info api216_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info api216_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info - api217_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info - api217_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info - api217_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info - api218_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info - api218_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info - api218_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info - api219_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info - api219_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info - api219_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info - api220_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info - api220_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info - api220_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info - api221_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info - api221_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info - api221_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info - api222_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info - api222_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info - api222_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info - api223_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info - api223_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info - api223_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info - api224_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info - api224_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info - api224_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info - api225_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info - api225_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info - api225_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info - api226_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info - api226_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info - api226_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/snmp_agents_api_v_2_17.py b/pypureclient/flashblade/_common/apis/snmp_agents_api_v_2_17.py new file mode 100644 index 0000000000..57efd868b1 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/snmp_agents_api_v_2_17.py @@ -0,0 +1,471 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.snmp_agent_get_response_v_2_0 import SnmpAgentGetResponse +from pypureclient.flashblade._common.models.snmp_agent_mib_response_v_2_0 import SnmpAgentMibResponse +from pypureclient.flashblade._common.models.snmp_agent_response_v_2_0 import SnmpAgentResponse +from pypureclient.flashblade._common.models.snmp_agent_v_2_0 import SnmpAgent + +class SNMPAgentsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def snmp_agents_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET snmp-agents + + List SNMP agent attributes. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SnmpAgentGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_snmp_agents_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SnmpAgentGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/snmp-agents', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def snmp_agents_mib_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET snmp-agents-mib + + List the SNMP MIB text. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SnmpAgentMibResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_snmp_agents_mib_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SnmpAgentMibResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/snmp-agents/mib', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def snmp_agents_patch_with_http_info( + self, + snmp_agent: SnmpAgent, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH snmp-agents + + Modify SNMP agent attributes. + + :param snmp_agent: (required) + :type snmp_agent: SnmpAgent + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SnmpAgentResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'snmp_agent', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_snmp_agents_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['snmp_agent'] is not None: + _body_params = _params['snmp_agent'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SnmpAgentResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/snmp-agents', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info + api217_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info + api217_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info + api218_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info + api218_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info + api218_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info + api219_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info + api219_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info + api219_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info + api220_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info + api220_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info + api220_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info + api221_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info + api221_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info + api221_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info + api222_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info + api222_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info + api222_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info + api223_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info + api223_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info + api223_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info + api224_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info + api224_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info + api224_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info + api225_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info + api225_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info + api225_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info + api226_snmp_agents_get_with_http_info = snmp_agents_get_with_http_info + api226_snmp_agents_mib_get_with_http_info = snmp_agents_mib_get_with_http_info + api226_snmp_agents_patch_with_http_info = snmp_agents_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/snmp_managers_api_v_2_14.py b/pypureclient/flashblade/_common/apis/snmp_managers_api_v_2_14.py index 6a958d0cb7..d757bc264a 100644 --- a/pypureclient/flashblade/_common/apis/snmp_managers_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/snmp_managers_api_v_2_14.py @@ -771,53 +771,3 @@ def snmp_managers_test_get_with_http_info( api216_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info api216_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info api216_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info - api217_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info - api217_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info - api217_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info - api217_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info - api217_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info - api218_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info - api218_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info - api218_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info - api218_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info - api218_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info - api219_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info - api219_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info - api219_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info - api219_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info - api219_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info - api220_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info - api220_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info - api220_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info - api220_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info - api220_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info - api221_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info - api221_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info - api221_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info - api221_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info - api221_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info - api222_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info - api222_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info - api222_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info - api222_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info - api222_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info - api223_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info - api223_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info - api223_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info - api223_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info - api223_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info - api224_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info - api224_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info - api224_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info - api224_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info - api224_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info - api225_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info - api225_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info - api225_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info - api225_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info - api225_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info - api226_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info - api226_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info - api226_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info - api226_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info - api226_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/snmp_managers_api_v_2_17.py b/pypureclient/flashblade/_common/apis/snmp_managers_api_v_2_17.py new file mode 100644 index 0000000000..d941ae1a09 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/snmp_managers_api_v_2_17.py @@ -0,0 +1,808 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.snmp_manager_get_response_v_2_0 import SnmpManagerGetResponse +from pypureclient.flashblade._common.models.snmp_manager_post_v_2_0 import SnmpManagerPost +from pypureclient.flashblade._common.models.snmp_manager_response_v_2_0 import SnmpManagerResponse +from pypureclient.flashblade._common.models.snmp_manager_v_2_0 import SnmpManager +from pypureclient.flashblade._common.models.test_result_get_response_v_2_0 import TestResultGetResponse + +class SNMPManagersApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def snmp_managers_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE snmp-managers + + Remove an SNMP manager. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_snmp_managers_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/snmp-managers', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def snmp_managers_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET snmp-managers + + List SNMP managers and their attributes. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SnmpManagerGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_snmp_managers_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SnmpManagerGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/snmp-managers', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def snmp_managers_patch_with_http_info( + self, + snmp_manager: SnmpManager, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH snmp-managers + + Modify SNMP manager attributes such as versions. + + :param snmp_manager: (required) + :type snmp_manager: SnmpManager + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SnmpManagerResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'snmp_manager', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_snmp_managers_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['snmp_manager'] is not None: + _body_params = _params['snmp_manager'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SnmpManagerResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/snmp-managers', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def snmp_managers_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="A comma-separated list of resource names.")], + snmp_manager: SnmpManagerPost, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST snmp-managers + + Create an SNMP manager. + + :param names: A comma-separated list of resource names. (required) + :type names: List[str] + :param snmp_manager: (required) + :type snmp_manager: SnmpManagerPost + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SnmpManagerResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'snmp_manager', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_snmp_managers_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['snmp_manager'] is not None: + _body_params = _params['snmp_manager'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SnmpManagerResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/snmp-managers', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def snmp_managers_test_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET snmp-managers/test + + Test if the configuration of an SNMP manager is valid. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TestResultGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_snmp_managers_test_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "TestResultGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/snmp-managers/test', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info + api217_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info + api217_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info + api217_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info + api217_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info + api218_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info + api218_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info + api218_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info + api218_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info + api218_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info + api219_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info + api219_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info + api219_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info + api219_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info + api219_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info + api220_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info + api220_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info + api220_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info + api220_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info + api220_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info + api221_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info + api221_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info + api221_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info + api221_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info + api221_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info + api222_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info + api222_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info + api222_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info + api222_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info + api222_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info + api223_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info + api223_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info + api223_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info + api223_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info + api223_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info + api224_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info + api224_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info + api224_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info + api224_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info + api224_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info + api225_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info + api225_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info + api225_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info + api225_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info + api225_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info + api226_snmp_managers_delete_with_http_info = snmp_managers_delete_with_http_info + api226_snmp_managers_get_with_http_info = snmp_managers_get_with_http_info + api226_snmp_managers_patch_with_http_info = snmp_managers_patch_with_http_info + api226_snmp_managers_post_with_http_info = snmp_managers_post_with_http_info + api226_snmp_managers_test_get_with_http_info = snmp_managers_test_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/software_api_v_2_16.py b/pypureclient/flashblade/_common/apis/software_api_v_2_16.py index 83bcaad4d2..46e84edfee 100644 --- a/pypureclient/flashblade/_common/apis/software_api_v_2_16.py +++ b/pypureclient/flashblade/_common/apis/software_api_v_2_16.py @@ -343,17 +343,3 @@ def software_check_post_with_http_info( # Method Aliases api216_software_check_get_with_http_info = software_check_get_with_http_info api216_software_check_post_with_http_info = software_check_post_with_http_info - api217_software_check_get_with_http_info = software_check_get_with_http_info - api217_software_check_post_with_http_info = software_check_post_with_http_info - api218_software_check_get_with_http_info = software_check_get_with_http_info - api218_software_check_post_with_http_info = software_check_post_with_http_info - api219_software_check_get_with_http_info = software_check_get_with_http_info - api219_software_check_post_with_http_info = software_check_post_with_http_info - api220_software_check_get_with_http_info = software_check_get_with_http_info - api220_software_check_post_with_http_info = software_check_post_with_http_info - api221_software_check_get_with_http_info = software_check_get_with_http_info - api221_software_check_post_with_http_info = software_check_post_with_http_info - api222_software_check_get_with_http_info = software_check_get_with_http_info - api222_software_check_post_with_http_info = software_check_post_with_http_info - api223_software_check_get_with_http_info = software_check_get_with_http_info - api223_software_check_post_with_http_info = software_check_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/software_api_v_2_17.py b/pypureclient/flashblade/_common/apis/software_api_v_2_17.py new file mode 100644 index 0000000000..c5a6bbf0f9 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/software_api_v_2_17.py @@ -0,0 +1,357 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictBool, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictBool, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.software_checks_get_response_v_2_16 import SoftwareChecksGetResponse +from pypureclient.flashblade._common.models.software_checks_response_v_2_16 import SoftwareChecksResponse + +class SoftwareApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def software_check_get_with_http_info( + self, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + software_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of software names.")] = None, + software_versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of target software versions.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + total_item_count: Annotated[Optional[StrictBool], Field(description="If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """List software check tasks + + Displays a list of software check tasks. + + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param software_names: A comma-separated list of software names. + :type software_names: List[str] + :param software_versions: A comma-separated list of target software versions. + :type software_versions: List[str] + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param total_item_count: If set to `true`, the `total_item_count` matching the specified query parameters is calculated and returned in the response. If set to `false`, the `total_item_count` is `null` in the response. This may speed up queries where the `total_item_count` is large. If not specified, defaults to `false`. + :type total_item_count: bool + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SoftwareChecksGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'software_names', + 'software_versions', + 'sort', + 'total_item_count' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_software_check_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('software_names') is not None: # noqa: E501 + _query_params.append(('software_names', _params['software_names'])) + _collection_formats['software_names'] = 'csv' + + if _params.get('software_versions') is not None: # noqa: E501 + _query_params.append(('software_versions', _params['software_versions'])) + _collection_formats['software_versions'] = 'csv' + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('total_item_count') is not None: # noqa: E501 + _query_params.append(('total_item_count', _params['total_item_count'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SoftwareChecksGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/software-check', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def software_check_post_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + software_names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of software names.")] = None, + software_versions: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of target software versions.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Create a software check task + + Creates a software check task. To create a task, use a software name and version. If a task is already running, an error is returned. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param software_names: A comma-separated list of software names. + :type software_names: List[str] + :param software_versions: A comma-separated list of target software versions. + :type software_versions: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SoftwareChecksResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'software_names', + 'software_versions' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_software_check_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('software_names') is not None: # noqa: E501 + _query_params.append(('software_names', _params['software_names'])) + _collection_formats['software_names'] = 'csv' + + if _params.get('software_versions') is not None: # noqa: E501 + _query_params.append(('software_versions', _params['software_versions'])) + _collection_formats['software_versions'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SoftwareChecksResponse", + '403': None, + } + + return self.api_client.call_api( + f'/api/{self.version}/software-check', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_software_check_get_with_http_info = software_check_get_with_http_info + api217_software_check_post_with_http_info = software_check_post_with_http_info + api218_software_check_get_with_http_info = software_check_get_with_http_info + api218_software_check_post_with_http_info = software_check_post_with_http_info + api219_software_check_get_with_http_info = software_check_get_with_http_info + api219_software_check_post_with_http_info = software_check_post_with_http_info + api220_software_check_get_with_http_info = software_check_get_with_http_info + api220_software_check_post_with_http_info = software_check_post_with_http_info + api221_software_check_get_with_http_info = software_check_get_with_http_info + api221_software_check_post_with_http_info = software_check_post_with_http_info + api222_software_check_get_with_http_info = software_check_get_with_http_info + api222_software_check_post_with_http_info = software_check_post_with_http_info + api223_software_check_get_with_http_info = software_check_get_with_http_info + api223_software_check_post_with_http_info = software_check_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/subnets_api_v_2_14.py b/pypureclient/flashblade/_common/apis/subnets_api_v_2_14.py index 623a27f8a7..7e6e1d240f 100644 --- a/pypureclient/flashblade/_common/apis/subnets_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/subnets_api_v_2_14.py @@ -606,43 +606,3 @@ def subnets_post_with_http_info( api216_subnets_get_with_http_info = subnets_get_with_http_info api216_subnets_patch_with_http_info = subnets_patch_with_http_info api216_subnets_post_with_http_info = subnets_post_with_http_info - api217_subnets_delete_with_http_info = subnets_delete_with_http_info - api217_subnets_get_with_http_info = subnets_get_with_http_info - api217_subnets_patch_with_http_info = subnets_patch_with_http_info - api217_subnets_post_with_http_info = subnets_post_with_http_info - api218_subnets_delete_with_http_info = subnets_delete_with_http_info - api218_subnets_get_with_http_info = subnets_get_with_http_info - api218_subnets_patch_with_http_info = subnets_patch_with_http_info - api218_subnets_post_with_http_info = subnets_post_with_http_info - api219_subnets_delete_with_http_info = subnets_delete_with_http_info - api219_subnets_get_with_http_info = subnets_get_with_http_info - api219_subnets_patch_with_http_info = subnets_patch_with_http_info - api219_subnets_post_with_http_info = subnets_post_with_http_info - api220_subnets_delete_with_http_info = subnets_delete_with_http_info - api220_subnets_get_with_http_info = subnets_get_with_http_info - api220_subnets_patch_with_http_info = subnets_patch_with_http_info - api220_subnets_post_with_http_info = subnets_post_with_http_info - api221_subnets_delete_with_http_info = subnets_delete_with_http_info - api221_subnets_get_with_http_info = subnets_get_with_http_info - api221_subnets_patch_with_http_info = subnets_patch_with_http_info - api221_subnets_post_with_http_info = subnets_post_with_http_info - api222_subnets_delete_with_http_info = subnets_delete_with_http_info - api222_subnets_get_with_http_info = subnets_get_with_http_info - api222_subnets_patch_with_http_info = subnets_patch_with_http_info - api222_subnets_post_with_http_info = subnets_post_with_http_info - api223_subnets_delete_with_http_info = subnets_delete_with_http_info - api223_subnets_get_with_http_info = subnets_get_with_http_info - api223_subnets_patch_with_http_info = subnets_patch_with_http_info - api223_subnets_post_with_http_info = subnets_post_with_http_info - api224_subnets_delete_with_http_info = subnets_delete_with_http_info - api224_subnets_get_with_http_info = subnets_get_with_http_info - api224_subnets_patch_with_http_info = subnets_patch_with_http_info - api224_subnets_post_with_http_info = subnets_post_with_http_info - api225_subnets_delete_with_http_info = subnets_delete_with_http_info - api225_subnets_get_with_http_info = subnets_get_with_http_info - api225_subnets_patch_with_http_info = subnets_patch_with_http_info - api225_subnets_post_with_http_info = subnets_post_with_http_info - api226_subnets_delete_with_http_info = subnets_delete_with_http_info - api226_subnets_get_with_http_info = subnets_get_with_http_info - api226_subnets_patch_with_http_info = subnets_patch_with_http_info - api226_subnets_post_with_http_info = subnets_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/subnets_api_v_2_17.py b/pypureclient/flashblade/_common/apis/subnets_api_v_2_17.py new file mode 100644 index 0000000000..3d018152e2 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/subnets_api_v_2_17.py @@ -0,0 +1,636 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.subnet_get_response_v_2_17 import SubnetGetResponse +from pypureclient.flashblade._common.models.subnet_response_v_2_17 import SubnetResponse +from pypureclient.flashblade._common.models.subnet_v_2_17 import Subnet + +class SubnetsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def subnets_delete_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """DELETE subnets + + Remove an array subnet. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: None + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_subnets_delete" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = {} + + return self.api_client.call_api( + f'/api/{self.version}/subnets', 'DELETE', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def subnets_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET subnets + + List the array’s subnets. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SubnetGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_subnets_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SubnetGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/subnets', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def subnets_patch_with_http_info( + self, + subnet: Subnet, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH subnets + + Modify array subnet attributes. + + :param subnet: (required) + :type subnet: Subnet + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SubnetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'subnet', + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_subnets_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['subnet'] is not None: + _body_params = _params['subnet'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SubnetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/subnets', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def subnets_post_with_http_info( + self, + names: Annotated[conlist(StrictStr), Field(..., description="A comma-separated list of resource names.")], + subnet: Subnet, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """POST subnets + + Create an array subnet. + + :param names: A comma-separated list of resource names. (required) + :type names: List[str] + :param subnet: (required) + :type subnet: Subnet + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SubnetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'names', + 'subnet', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_subnets_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['subnet'] is not None: + _body_params = _params['subnet'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SubnetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/subnets', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_subnets_delete_with_http_info = subnets_delete_with_http_info + api217_subnets_get_with_http_info = subnets_get_with_http_info + api217_subnets_patch_with_http_info = subnets_patch_with_http_info + api217_subnets_post_with_http_info = subnets_post_with_http_info + api218_subnets_delete_with_http_info = subnets_delete_with_http_info + api218_subnets_get_with_http_info = subnets_get_with_http_info + api218_subnets_patch_with_http_info = subnets_patch_with_http_info + api218_subnets_post_with_http_info = subnets_post_with_http_info + api219_subnets_delete_with_http_info = subnets_delete_with_http_info + api219_subnets_get_with_http_info = subnets_get_with_http_info + api219_subnets_patch_with_http_info = subnets_patch_with_http_info + api219_subnets_post_with_http_info = subnets_post_with_http_info + api220_subnets_delete_with_http_info = subnets_delete_with_http_info + api220_subnets_get_with_http_info = subnets_get_with_http_info + api220_subnets_patch_with_http_info = subnets_patch_with_http_info + api220_subnets_post_with_http_info = subnets_post_with_http_info + api221_subnets_delete_with_http_info = subnets_delete_with_http_info + api221_subnets_get_with_http_info = subnets_get_with_http_info + api221_subnets_patch_with_http_info = subnets_patch_with_http_info + api221_subnets_post_with_http_info = subnets_post_with_http_info + api222_subnets_delete_with_http_info = subnets_delete_with_http_info + api222_subnets_get_with_http_info = subnets_get_with_http_info + api222_subnets_patch_with_http_info = subnets_patch_with_http_info + api222_subnets_post_with_http_info = subnets_post_with_http_info + api223_subnets_delete_with_http_info = subnets_delete_with_http_info + api223_subnets_get_with_http_info = subnets_get_with_http_info + api223_subnets_patch_with_http_info = subnets_patch_with_http_info + api223_subnets_post_with_http_info = subnets_post_with_http_info + api224_subnets_delete_with_http_info = subnets_delete_with_http_info + api224_subnets_get_with_http_info = subnets_get_with_http_info + api224_subnets_patch_with_http_info = subnets_patch_with_http_info + api224_subnets_post_with_http_info = subnets_post_with_http_info + api225_subnets_delete_with_http_info = subnets_delete_with_http_info + api225_subnets_get_with_http_info = subnets_get_with_http_info + api225_subnets_patch_with_http_info = subnets_patch_with_http_info + api225_subnets_post_with_http_info = subnets_post_with_http_info + api226_subnets_delete_with_http_info = subnets_delete_with_http_info + api226_subnets_get_with_http_info = subnets_get_with_http_info + api226_subnets_patch_with_http_info = subnets_patch_with_http_info + api226_subnets_post_with_http_info = subnets_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/support_api_v_2_14.py b/pypureclient/flashblade/_common/apis/support_api_v_2_14.py index a7242ee6a0..264981491a 100644 --- a/pypureclient/flashblade/_common/apis/support_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/support_api_v_2_14.py @@ -434,30 +434,3 @@ def support_test_get_with_http_info( api216_support_get_with_http_info = support_get_with_http_info api216_support_patch_with_http_info = support_patch_with_http_info api216_support_test_get_with_http_info = support_test_get_with_http_info - api217_support_get_with_http_info = support_get_with_http_info - api217_support_patch_with_http_info = support_patch_with_http_info - api217_support_test_get_with_http_info = support_test_get_with_http_info - api218_support_get_with_http_info = support_get_with_http_info - api218_support_patch_with_http_info = support_patch_with_http_info - api218_support_test_get_with_http_info = support_test_get_with_http_info - api219_support_get_with_http_info = support_get_with_http_info - api219_support_patch_with_http_info = support_patch_with_http_info - api219_support_test_get_with_http_info = support_test_get_with_http_info - api220_support_get_with_http_info = support_get_with_http_info - api220_support_patch_with_http_info = support_patch_with_http_info - api220_support_test_get_with_http_info = support_test_get_with_http_info - api221_support_get_with_http_info = support_get_with_http_info - api221_support_patch_with_http_info = support_patch_with_http_info - api221_support_test_get_with_http_info = support_test_get_with_http_info - api222_support_get_with_http_info = support_get_with_http_info - api222_support_patch_with_http_info = support_patch_with_http_info - api222_support_test_get_with_http_info = support_test_get_with_http_info - api223_support_get_with_http_info = support_get_with_http_info - api223_support_patch_with_http_info = support_patch_with_http_info - api223_support_test_get_with_http_info = support_test_get_with_http_info - api224_support_get_with_http_info = support_get_with_http_info - api224_support_patch_with_http_info = support_patch_with_http_info - api224_support_test_get_with_http_info = support_test_get_with_http_info - api225_support_get_with_http_info = support_get_with_http_info - api225_support_patch_with_http_info = support_patch_with_http_info - api225_support_test_get_with_http_info = support_test_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/support_api_v_2_17.py b/pypureclient/flashblade/_common/apis/support_api_v_2_17.py new file mode 100644 index 0000000000..2adc27939e --- /dev/null +++ b/pypureclient/flashblade/_common/apis/support_api_v_2_17.py @@ -0,0 +1,454 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.support_get_response_v_2_14 import SupportGetResponse +from pypureclient.flashblade._common.models.support_response_v_2_14 import SupportResponse +from pypureclient.flashblade._common.models.support_v_2_14 import Support +from pypureclient.flashblade._common.models.test_result_get_response_v_2_0 import TestResultGetResponse + +class SupportApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def support_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET support + + List Phone Home and Remote Assistance settings. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SupportGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'ids', + 'names' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_support_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SupportGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/support', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def support_patch_with_http_info( + self, + support: Support, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH support + + Modify Phone Home and Remote Assistance settings. + + :param support: (required) + :type support: Support + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SupportResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'support', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_support_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['support'] is not None: + _body_params = _params['support'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SupportResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/support', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def support_test_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + test_type: Annotated[Optional[StrictStr], Field(description="Specify the type of test. Valid values are `all`, `phonehome` and `remote-assist`. If not specified, defaults to `all`.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET support-test + + Test if the Phone Home and Remote Assistance settings are functioning properly. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param test_type: Specify the type of test. Valid values are `all`, `phonehome` and `remote-assist`. If not specified, defaults to `all`. + :type test_type: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(TestResultGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'filter', + 'sort', + 'test_type' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_support_test_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + if _params.get('test_type') is not None: # noqa: E501 + _query_params.append(('test_type', _params['test_type'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "TestResultGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/support/test', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_support_get_with_http_info = support_get_with_http_info + api217_support_patch_with_http_info = support_patch_with_http_info + api217_support_test_get_with_http_info = support_test_get_with_http_info + api218_support_get_with_http_info = support_get_with_http_info + api218_support_patch_with_http_info = support_patch_with_http_info + api218_support_test_get_with_http_info = support_test_get_with_http_info + api219_support_get_with_http_info = support_get_with_http_info + api219_support_patch_with_http_info = support_patch_with_http_info + api219_support_test_get_with_http_info = support_test_get_with_http_info + api220_support_get_with_http_info = support_get_with_http_info + api220_support_patch_with_http_info = support_patch_with_http_info + api220_support_test_get_with_http_info = support_test_get_with_http_info + api221_support_get_with_http_info = support_get_with_http_info + api221_support_patch_with_http_info = support_patch_with_http_info + api221_support_test_get_with_http_info = support_test_get_with_http_info + api222_support_get_with_http_info = support_get_with_http_info + api222_support_patch_with_http_info = support_patch_with_http_info + api222_support_test_get_with_http_info = support_test_get_with_http_info + api223_support_get_with_http_info = support_get_with_http_info + api223_support_patch_with_http_info = support_patch_with_http_info + api223_support_test_get_with_http_info = support_test_get_with_http_info + api224_support_get_with_http_info = support_get_with_http_info + api224_support_patch_with_http_info = support_patch_with_http_info + api224_support_test_get_with_http_info = support_test_get_with_http_info + api225_support_get_with_http_info = support_get_with_http_info + api225_support_patch_with_http_info = support_patch_with_http_info + api225_support_test_get_with_http_info = support_test_get_with_http_info diff --git a/pypureclient/flashblade/_common/apis/support_diagnostics_api_v_2_16.py b/pypureclient/flashblade/_common/apis/support_diagnostics_api_v_2_16.py index 4d77e927a6..aab6586e1b 100644 --- a/pypureclient/flashblade/_common/apis/support_diagnostics_api_v_2_16.py +++ b/pypureclient/flashblade/_common/apis/support_diagnostics_api_v_2_16.py @@ -493,24 +493,3 @@ def support_diagnostics_post_with_http_info( api216_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info api216_support_diagnostics_get_with_http_info = support_diagnostics_get_with_http_info api216_support_diagnostics_post_with_http_info = support_diagnostics_post_with_http_info - api217_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info - api217_support_diagnostics_get_with_http_info = support_diagnostics_get_with_http_info - api217_support_diagnostics_post_with_http_info = support_diagnostics_post_with_http_info - api218_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info - api218_support_diagnostics_get_with_http_info = support_diagnostics_get_with_http_info - api218_support_diagnostics_post_with_http_info = support_diagnostics_post_with_http_info - api219_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info - api219_support_diagnostics_get_with_http_info = support_diagnostics_get_with_http_info - api219_support_diagnostics_post_with_http_info = support_diagnostics_post_with_http_info - api220_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info - api220_support_diagnostics_get_with_http_info = support_diagnostics_get_with_http_info - api220_support_diagnostics_post_with_http_info = support_diagnostics_post_with_http_info - api221_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info - api221_support_diagnostics_get_with_http_info = support_diagnostics_get_with_http_info - api221_support_diagnostics_post_with_http_info = support_diagnostics_post_with_http_info - api222_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info - api222_support_diagnostics_get_with_http_info = support_diagnostics_get_with_http_info - api222_support_diagnostics_post_with_http_info = support_diagnostics_post_with_http_info - api223_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info - api223_support_diagnostics_get_with_http_info = support_diagnostics_get_with_http_info - api223_support_diagnostics_post_with_http_info = support_diagnostics_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/support_diagnostics_api_v_2_17.py b/pypureclient/flashblade/_common/apis/support_diagnostics_api_v_2_17.py new file mode 100644 index 0000000000..1831e86e88 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/support_diagnostics_api_v_2_17.py @@ -0,0 +1,513 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.support_diagnostics_details_get_response_v_2_16 import SupportDiagnosticsDetailsGetResponse +from pypureclient.flashblade._common.models.support_diagnostics_get_response_v_2_16 import SupportDiagnosticsGetResponse + +class SupportDiagnosticsApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def support_diagnostics_details_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET diagnostics details + + Lists the diagnostics tasks details. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SupportDiagnosticsDetailsGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_support_diagnostics_details_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SupportDiagnosticsDetailsGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/support-diagnostics/details', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def support_diagnostics_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + ids: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + names: Annotated[Optional[conlist(StrictStr)], Field(description="A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET diagnostics list + + Lists the support diagnostics tasks. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param ids: A comma-separated list of resource IDs. If after filtering, there is not at least one resource that matches each of the elements of `ids`, then an error is returned. This cannot be provided together with the `name` or `names` query parameters. + :type ids: List[str] + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param names: A comma-separated list of resource names. If there is not at least one resource that matches each of the elements of `names`, then an error is returned. + :type names: List[str] + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SupportDiagnosticsGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'ids', + 'limit', + 'names', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_support_diagnostics_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('ids') is not None: # noqa: E501 + _query_params.append(('ids', _params['ids'])) + _collection_formats['ids'] = 'csv' + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('names') is not None: # noqa: E501 + _query_params.append(('names', _params['names'])) + _collection_formats['names'] = 'csv' + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SupportDiagnosticsGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/support-diagnostics', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def support_diagnostics_post_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + analysis_period_end_time: Annotated[Optional[conint(strict=True, ge=0)], Field(description="When the analysis time window ends (in milliseconds since epoch).")] = None, + analysis_period_start_time: Annotated[Optional[conint(strict=True, ge=0)], Field(description="When the analysis time window starts (in milliseconds since epoch).")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """Start a diagnostic task + + Creates a diagnostics task for a given time interval. If `start_time` is not provided, defaults to Current System Time - 1 hour. If `end_time` is not provided, defaults to Current System Time. If a task is already running, an error is returned. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param analysis_period_end_time: When the analysis time window ends (in milliseconds since epoch). + :type analysis_period_end_time: int + :param analysis_period_start_time: When the analysis time window starts (in milliseconds since epoch). + :type analysis_period_start_time: int + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(SupportDiagnosticsGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'analysis_period_end_time', + 'analysis_period_start_time' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_support_diagnostics_post" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('analysis_period_end_time') is not None: # noqa: E501 + _query_params.append(('analysis_period_end_time', _params['analysis_period_end_time'])) + + if _params.get('analysis_period_start_time') is not None: # noqa: E501 + _query_params.append(('analysis_period_start_time', _params['analysis_period_start_time'])) + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "SupportDiagnosticsGetResponse", + '403': None, + } + + return self.api_client.call_api( + f'/api/{self.version}/support-diagnostics', 'POST', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info + api217_support_diagnostics_get_with_http_info = support_diagnostics_get_with_http_info + api217_support_diagnostics_post_with_http_info = support_diagnostics_post_with_http_info + api218_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info + api218_support_diagnostics_get_with_http_info = support_diagnostics_get_with_http_info + api218_support_diagnostics_post_with_http_info = support_diagnostics_post_with_http_info + api219_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info + api219_support_diagnostics_get_with_http_info = support_diagnostics_get_with_http_info + api219_support_diagnostics_post_with_http_info = support_diagnostics_post_with_http_info + api220_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info + api220_support_diagnostics_get_with_http_info = support_diagnostics_get_with_http_info + api220_support_diagnostics_post_with_http_info = support_diagnostics_post_with_http_info + api221_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info + api221_support_diagnostics_get_with_http_info = support_diagnostics_get_with_http_info + api221_support_diagnostics_post_with_http_info = support_diagnostics_post_with_http_info + api222_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info + api222_support_diagnostics_get_with_http_info = support_diagnostics_get_with_http_info + api222_support_diagnostics_post_with_http_info = support_diagnostics_post_with_http_info + api223_support_diagnostics_details_get_with_http_info = support_diagnostics_details_get_with_http_info + api223_support_diagnostics_get_with_http_info = support_diagnostics_get_with_http_info + api223_support_diagnostics_post_with_http_info = support_diagnostics_post_with_http_info diff --git a/pypureclient/flashblade/_common/apis/verification_keys_api_v_2_14.py b/pypureclient/flashblade/_common/apis/verification_keys_api_v_2_14.py index c52784bbf9..23c9903ed0 100644 --- a/pypureclient/flashblade/_common/apis/verification_keys_api_v_2_14.py +++ b/pypureclient/flashblade/_common/apis/verification_keys_api_v_2_14.py @@ -320,23 +320,3 @@ def support_verification_keys_patch_with_http_info( api215_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info api216_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info api216_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info - api217_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info - api217_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info - api218_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info - api218_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info - api219_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info - api219_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info - api220_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info - api220_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info - api221_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info - api221_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info - api222_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info - api222_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info - api223_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info - api223_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info - api224_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info - api224_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info - api225_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info - api225_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info - api226_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info - api226_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info diff --git a/pypureclient/flashblade/_common/apis/verification_keys_api_v_2_17.py b/pypureclient/flashblade/_common/apis/verification_keys_api_v_2_17.py new file mode 100644 index 0000000000..8cb2709f63 --- /dev/null +++ b/pypureclient/flashblade/_common/apis/verification_keys_api_v_2_17.py @@ -0,0 +1,336 @@ + +# coding: utf-8 + +""" + FlashBlade REST API + + A lightweight client for FlashBlade REST API 2.17, developed by Pure Storage, Inc. (http://www.purestorage.com/). + + The version of the OpenAPI document: 2.17 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import re # noqa: F401 +import io +import warnings + +from typing_extensions import Annotated +try: + from pydantic.v1 import Field, StrictStr, conint, conlist, constr, validator +except ModuleNotFoundError: + from pydantic import Field, StrictStr, conint, conlist, constr, validator + +from typing import Optional + +from typing import Optional +from pypureclient._transport.api_client import ApiClient as _TransportApiClient +from pypureclient._transport.api_response import ApiResponse +from pypureclient._transport.exceptions import ( # noqa: F401 + ApiTypeError, + ApiValueError +) +from pypureclient.reference_type import quote_string_parameter +from pypureclient.flashblade._common.models.verification_key_get_response_v_2_7 import VerificationKeyGetResponse +from pypureclient.flashblade._common.models.verification_key_patch_v_2_7 import VerificationKeyPatch +from pypureclient.flashblade._common.models.verification_key_response_v_2_7 import VerificationKeyResponse + +class VerificationKeysApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client: Optional[_TransportApiClient] = None, version: str = '2.0') -> None: + self.api_client = api_client if api_client else _TransportApiClient.get_default() + self.version = version + + def support_verification_keys_get_with_http_info( + self, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + continuation_token: Annotated[Optional[StrictStr], Field(description="An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result.")] = None, + filter: Annotated[Optional[StrictStr], Field(description="Exclude resources that don't match the specified criteria.")] = None, + limit: Annotated[Optional[conint(strict=True, ge=0)], Field(description="Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request.")] = None, + offset: Annotated[Optional[conint(strict=True, ge=0)], Field(description="The offset of the first resource to return from a collection.")] = None, + sort: Annotated[Optional[conlist(constr(strict=True))], Field(description="Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """GET verification-keys + + List the key used to verify the signed challenges that are used by Pure Support to access the FlashBlade. + + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param continuation_token: An opaque token used to iterate over a collection. The token to use on the next request is returned in the `continuation_token` field of the result. + :type continuation_token: str + :param filter: Exclude resources that don't match the specified criteria. + :type filter: str + :param limit: Limit the size of the response to the specified number of resources. A `limit` of `0` can be used to get the number of resources without getting all of the resources. It will be returned in the `total_item_count` field. If a client asks for a page size larger than the available number, the request is still valid. In that case the server just returns the available number of items, disregarding the client's page size request. + :type limit: int + :param offset: The offset of the first resource to return from a collection. + :type offset: int + :param sort: Sort the response by the specified fields (in descending order if '-' is appended to the field name). NOTE: If you provide a sort you will not get a `continuation_token` in the response. + :type sort: List[str] + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(VerificationKeyGetResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'x_request_id', + 'continuation_token', + 'filter', + 'limit', + 'offset', + 'sort' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_support_verification_keys_get" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + if _params.get('continuation_token') is not None: # noqa: E501 + _query_params.append(('continuation_token', _params['continuation_token'])) + + if _params.get('filter') is not None: # noqa: E501 + _query_params.append(('filter', _params['filter'])) + + if _params.get('limit') is not None: # noqa: E501 + _query_params.append(('limit', _params['limit'])) + + if _params.get('offset') is not None: # noqa: E501 + _query_params.append(('offset', _params['offset'])) + + if _params.get('sort') is not None: # noqa: E501 + _query_params.append(('sort', _params['sort'])) + _collection_formats['sort'] = 'csv' + + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "VerificationKeyGetResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/support/verification-keys', 'GET', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + def support_verification_keys_patch_with_http_info( + self, + key: VerificationKeyPatch, + x_request_id: Annotated[Optional[StrictStr], Field(description="Supplied by client during request or generated by server.")] = None, + **kwargs + ) -> ApiResponse: # noqa: E501 + """PATCH verification-keys + + Update the key used to verify the signed challenges that are used by Pure Support to access the FlashBlade. + + :param key: (required) + :type key: VerificationKeyPatch + :param x_request_id: Supplied by client during request or generated by server. + :type x_request_id: str + :param async_req: Whether to execute the request asynchronously. + :type async_req: bool, optional + :param _preload_content: if False, the ApiResponse.data will + be set to none and raw_data will store the + HTTP response body without reading/decoding. + Default is True. + :type _preload_content: bool, optional + :param _return_http_data_only: response data instead of ApiResponse + object with status code, headers, etc + :type _return_http_data_only: bool, optional + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the authentication + in the spec for a single request. + :type _request_auth: dict, optional + :type _content_type: string, optional: force content-type for the request + :return: Returns the result object. + If the method is called asynchronously, + returns the request thread. + :rtype: tuple(VerificationKeyResponse, status_code(int), headers(HTTPHeaderDict)) + """ + + _params = locals() + + _all_params = [ + 'key', + 'x_request_id' + ] + _all_params.extend( + [ + 'async_req', + '_return_http_data_only', + '_preload_content', + '_request_timeout', + '_request_auth', + '_content_type', + '_headers' + ] + ) + + # validate the arguments + for _key, _val in _params['kwargs'].items(): + if _key not in _all_params: + raise ApiTypeError( + "Got an unexpected keyword argument '%s'" + " to method api217_support_verification_keys_patch" % _key + ) + _params[_key] = _val + del _params['kwargs'] + + _collection_formats = {} + + # process the path parameters + _path_params = {} + + # process the query parameters + _query_params = [] + # process the header parameters + _header_params = dict(_params.get('_headers', {})) + if _params['x_request_id'] is not None: + _header_params['X-Request-ID'] = _params['x_request_id'] + + # process the form parameters + _form_params = [] + _files = {} + # process the body parameter + _body_params = None + if _params['key'] is not None: + _body_params = _params['key'] + + # set the HTTP header `Accept` + _header_params['Accept'] = self.api_client.select_header_accept( + ['application/json']) # noqa: E501 + + # set the HTTP header `Content-Type` + _content_types_list = _params.get('_content_type', + self.api_client.select_header_content_type( + ['application/json'])) + if _content_types_list: + _header_params['Content-Type'] = _content_types_list + + # authentication setting + _auth_settings = ['AuthorizationHeader'] # noqa: E501 + + _response_types_map = { + '200': "VerificationKeyResponse", + } + + return self.api_client.call_api( + f'/api/{self.version}/support/verification-keys', 'PATCH', + _path_params, + _query_params, + _header_params, + body=_body_params, + post_params=_form_params, + files=_files, + response_types_map=_response_types_map, + auth_settings=_auth_settings, + async_req=_params.get('async_req'), + _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501 + _preload_content=_params.get('_preload_content', True), + _request_timeout=_params.get('_request_timeout'), + collection_formats=_collection_formats, + _request_auth=_params.get('_request_auth')) + + # Method Aliases + api217_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info + api217_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info + api218_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info + api218_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info + api219_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info + api219_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info + api220_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info + api220_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info + api221_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info + api221_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info + api222_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info + api222_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info + api223_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info + api223_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info + api224_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info + api224_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info + api225_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info + api225_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info + api226_support_verification_keys_get_with_http_info = support_verification_keys_get_with_http_info + api226_support_verification_keys_patch_with_http_info = support_verification_keys_patch_with_http_info